From e418e2508f901e174497228ae6170cadcbd376b3 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 25 Nov 2022 16:42:34 +0100 Subject: [PATCH 1/5] git: Add sendmail configuration Added configuration to use git for direct patch contributions through mail. Uses msmtp for mail agent. --- git/.config/git/config | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git/.config/git/config b/git/.config/git/config index 361923b..a39d586 100644 --- a/git/.config/git/config +++ b/git/.config/git/config @@ -3,7 +3,10 @@ name = Marty Oehme signingkey = 73BA40D5AFAF49C9 [init] - defaultBranch = main + defaultBranch = main +[sendemail] + smtpserver = "/usr/bin/msmtp" + annotate = yes [alias] ignore = "!gitignore -f" pushmerge = "push -o merge_request.merge_when_pipeline_succeeds" # see https://docs.gitlab.com/ce/user/project/push_options.html # merge-when-pipeline-succeeds-alias From ff6dab2c8f1637ac4fd3ac40d958a1b45f205e6c Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 25 Nov 2022 16:45:28 +0100 Subject: [PATCH 2/5] qutebrowser: Add docker hub to search engines Added docker hub search by prefixing search with `docker `. --- qutebrowser/.config/qutebrowser/url.py | 1 + 1 file changed, 1 insertion(+) diff --git a/qutebrowser/.config/qutebrowser/url.py b/qutebrowser/.config/qutebrowser/url.py index 01bc9df..f09f43f 100644 --- a/qutebrowser/.config/qutebrowser/url.py +++ b/qutebrowser/.config/qutebrowser/url.py @@ -8,6 +8,7 @@ c.url.searchengines = { "aur": "https://aur.archlinux.org/packages/?K={}", "d": "https://www.dict.cc/?s={}", "ddg": "https://duckduckgo.com/?q={}", + "docker": "https://hub.docker.com/search?q={}", "dt": "https://www.deepl.com/translator#en/de/{}", "g": "https://www.google.com/search?q={}", "gh": "https://github.com/search?q={}", From 2b9981482f55aa44c2b9d9c026ef7da2e2c00154 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 25 Nov 2022 16:49:40 +0100 Subject: [PATCH 3/5] nvim: Switch to zen-mode and twilight plugins Switched out the old distraction-free writing plugins for neovim variants zen-mode and twilight by folke - they are simple (one command to invoke zen-mode, mapped to `F11`, and that's it), they are written in lua and they work together beautifully (invoking zen-mode also invokes twilight paragraph highlighting). --- nvim/.config/nvim/lua/maps.lua | 3 +-- nvim/.config/nvim/lua/plugins.lua | 16 ++-------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/nvim/.config/nvim/lua/maps.lua b/nvim/.config/nvim/lua/maps.lua index 8234d08..0869e73 100644 --- a/nvim/.config/nvim/lua/maps.lua +++ b/nvim/.config/nvim/lua/maps.lua @@ -183,8 +183,7 @@ map.x.nore.silent['q'] = 'gq' map.n.nore.silent['Q'] = 'vapJgqap' -- Enter distraction free prose mode with F11 -map.n.nore.silent[''] = ':TZAtaraxis' -map.n.nore.silent[''] = ':TZMinimalist' +map.n.nore.silent[''] = ':ZenMode' -- PLUGIN: fzf-bibtex -- map @@ to automatically insert citation reference at cursor diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index 3f11bdc..5bc3c37 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -102,20 +102,8 @@ require("packer").startup(function() ft = { "quarto" } } use 'micarmst/vim-spellsync' -- personal dict improvements for git sync - use { -- provide distraction free writing - 'Pocco81/TrueZen.nvim', - config = function() - require("true-zen").setup({ - integrations = { - gitsigns = true, - lualine = true, - tmux = { global = false }, - limelight = true - } - }) - end - } - use { 'junegunn/limelight.vim', event = 'BufRead' } -- provide even distraction free-er writing (lowlight paragraphs) + use { 'folke/zen-mode.nvim', config = require('zen-mode').setup() } -- provide distraction free writing + use 'folke/twilight.nvim' -- provide even distraction free-er writing (lowlight paragraphs) use 'alok/notational-fzf-vim' -- quickly search through the wiki -- languages From 8f6e1994dfa940371fb32a8058f617e298f73419 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 25 Nov 2022 16:53:40 +0100 Subject: [PATCH 4/5] nvim: File formatting --- nvim/.config/nvim/lua/maps.lua | 26 ++++++++++++++------------ nvim/.config/nvim/lua/plug/_format.lua | 13 ++++++------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/nvim/.config/nvim/lua/maps.lua b/nvim/.config/nvim/lua/maps.lua index 0869e73..9db21d3 100644 --- a/nvim/.config/nvim/lua/maps.lua +++ b/nvim/.config/nvim/lua/maps.lua @@ -38,10 +38,12 @@ local function wrap_up() if vim.v.count == 0 then return 'gk' end return 'k' end + local function wrap_down() if vim.v.count == 0 then return 'gj' end return 'j' end + map.n.nore.expr['k'] = wrap_up map.n.nore.expr['j'] = wrap_down @@ -54,7 +56,7 @@ map.i.nore[''] = 'guiw`]a' -- let me save stuff as sudo when I forget to call vim with it map.c.nore['w!!'] = - [[execute 'silent! write !sudo tee % >/dev/null' edit!]] +[[execute 'silent! write !sudo tee % >/dev/null' edit!]] -- yank current filename/filepath to f buffer map.n.nore['yp'] = ':let @p = expand("%")' @@ -123,16 +125,16 @@ map.n.nore['E'] = ':Vifm getcwd()' -- PLUGIN: Telescope GLOBAL FUZZY FINDING -- buffers and files in current workdir map.n.nore['s'] = - [[:lua require 'telescope.builtin'.buffers(require 'telescope.themes'.get_ivy())]] +[[:lua require 'telescope.builtin'.buffers(require 'telescope.themes'.get_ivy())]] -- most recently used / MRU, bound to S since it is essentially a larger -- go-back intention than just buffers map.n.nore['S'] = - [[:lua require 'telescope.builtin'.oldfiles(require 'telescope.themes'.get_ivy())]] +[[:lua require 'telescope.builtin'.oldfiles(require 'telescope.themes'.get_ivy())]] -- fuzzy find files in cwd map.n.nore['f'] = [[:lua require 'telescope.builtin'.find_files()]] -- fuzzy find hidden files in cwd map.n.nore[''] = - [[:lua require 'telescope.builtin'.find_files({hidden=true})]] +[[:lua require 'telescope.builtin'.find_files({hidden=true})]] -- general full-text search in cwd with rg map.n.nore['F'] = [[:lua require 'telescope.builtin'.live_grep()]] @@ -140,25 +142,25 @@ map.n.nore['F'] = [[:lua require 'telescope.builtin'.live_grep()]] map.n.nore['gs'] = [[:lua require 'telescope.builtin'.git_status()]] -- git buffercommits map.n.nore['gb'] = - [[:lua require 'telescope.builtin'.git_bcommits()]] +[[:lua require 'telescope.builtin'.git_bcommits()]] -- git commitlog map.n.nore['gl'] = - [[:lua require 'telescope.builtin'.git_commits()]] +[[:lua require 'telescope.builtin'.git_commits()]] -- helptags map.n.nore[''] = - [[:lua require 'telescope.builtin'.help_tags()]] +[[:lua require 'telescope.builtin'.help_tags()]] -- manpages map.n.nore[''] = - [[:lua require 'telescope.builtin'.man_pages()]] +[[:lua require 'telescope.builtin'.man_pages()]] -- colorschemes map.n.nore[''] = - [[:lua require 'telescope.builtin'.colorscheme(require 'telescope.themes'.get_ivy())]] +[[:lua require 'telescope.builtin'.colorscheme(require 'telescope.themes'.get_ivy())]] -- spell suggestions map.n.nore['z='] = - [[:lua require 'telescope.builtin'.spell_suggest(require 'telescope.themes'.get_ivy())]] +[[:lua require 'telescope.builtin'.spell_suggest(require 'telescope.themes'.get_ivy())]] -- PLUGIN: betterdigraphs -- allow normal digraph insertion on c-k, telescope search on c-k c-k @@ -225,9 +227,9 @@ map.n.nore.silent[''] = "lua require('Navigator').previous()" -- lsp keymaps are set in lsp settings, only for lsp buffers map.i.nore.expr.silent[''] = 'compe#complete()' map.i.expr[''] = - [[vsnip#jumpable(1) ? '(vsnip-jump-next)' : '']] +[[vsnip#jumpable(1) ? '(vsnip-jump-next)' : '']] map.i.expr[''] = - [[vsnip#jumpable(-1) ? '(vsnip-jump-next)' : '']] +[[vsnip#jumpable(-1) ? '(vsnip-jump-next)' : '']] -- PLUGIN: symbols-outline.nvim map.n.nore.silent['o'] = "SymbolsOutline" diff --git a/nvim/.config/nvim/lua/plug/_format.lua b/nvim/.config/nvim/lua/plug/_format.lua index 487b57e..e4cdeac 100644 --- a/nvim/.config/nvim/lua/plug/_format.lua +++ b/nvim/.config/nvim/lua/plug/_format.lua @@ -14,7 +14,7 @@ local prettierfmt = { end } local shfmt = { - function() return {exe = "shfmt", args = {"-i 4"}, stdin = true} end + function() return { exe = "shfmt", args = { "-i 4" }, stdin = true } end } local formatters = { @@ -29,20 +29,19 @@ local formatters = { } end }, - go = {function() return {exe = "goimports", stdin = true} end}, + go = { function() return { exe = "goimports", stdin = true } end }, html = prettierfmt, javascript = prettierfmt, json = prettierfmt, lua = { function() - return - {exe = "lua-format", args = {"--indent-width", 4}, stdin = true} + return { exe = "lua-format", args = { "--indent-width", 4 }, stdin = true } end }, - python = {function() return {exe = "black", args = {"-"}, stdin = true} end}, + python = { function() return { exe = "black", args = { "-" }, stdin = true } end }, rust = { function() - return {exe = "rustfmt", args = {"--emit=stdout"}, stdin = true} + return { exe = "rustfmt", args = { "--emit=stdout" }, stdin = true } end }, sh = shfmt, @@ -50,7 +49,7 @@ local formatters = { zsh = shfmt } -require('formatter').setup({logging = false, filetype = formatters}) +require('formatter').setup({ logging = false, filetype = formatters }) -- Format on save: -- gather filetypes to autocorrect for each activated formatter above From 078578b1737806a91ae15b7e683ffc5fa27aa105 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 25 Nov 2022 16:56:26 +0100 Subject: [PATCH 5/5] nvim: Update buffer navigation maps Updated buffer navigation to make use of the hjkl paradigm instead of the since it adheres closer to vanilla nvim and works better with the new navigation features of Navigator.nvim. --- nvim/.config/nvim/lua/maps.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nvim/.config/nvim/lua/maps.lua b/nvim/.config/nvim/lua/maps.lua index 9db21d3..cc8a371 100644 --- a/nvim/.config/nvim/lua/maps.lua +++ b/nvim/.config/nvim/lua/maps.lua @@ -217,11 +217,11 @@ map.x['ga'] = '(EasyAlign)' map.n['ga'] = '(EasyAlign)' -- PLUGIN: Navigator.nvim -map.n.nore.silent[''] = "lua require('Navigator').left()" -map.n.nore.silent[''] = "lua require('Navigator').up()" -map.n.nore.silent[''] = "lua require('Navigator').right()" -map.n.nore.silent[''] = "lua require('Navigator').down()" -map.n.nore.silent[''] = "lua require('Navigator').previous()" +map.n.nore.silent['h'] = "lua require('Navigator').left()" +map.n.nore.silent['k'] = "lua require('Navigator').up()" +map.n.nore.silent['l'] = "lua require('Navigator').right()" +map.n.nore.silent['j'] = "lua require('Navigator').down()" +map.n.nore.silent['p'] = "lua require('Navigator').previous()" -- PLUGIN: compe.nvim -- lsp keymaps are set in lsp settings, only for lsp buffers