From c27e697870f8d3a5136bf09e8132ad91ba5171a8 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Dec 2023 14:07:43 +0100 Subject: [PATCH 1/8] nvim: Refactor core setting loading into core module Move everything pertinent from init.lua to the core module init file itself. For now the only thing remaining in the init lua is requiring the core. --- nvim/.config/nvim/init.lua | 22 +--------------------- nvim/.config/nvim/lua/core/init.lua | 12 ++++++++++++ 2 files changed, 13 insertions(+), 21 deletions(-) create mode 100644 nvim/.config/nvim/lua/core/init.lua diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 7525255..d9a3b72 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -1,21 +1 @@ --- many ideas for this config come from --- https://github.com/elianiva/dotfiles/ - with much gratitude -local api = vim.api - -api.nvim_exec2("runtime abbrev.vim", {}) - -for _, source in ipairs({ - "core.settings", - "core.lazy", - "core.autocmds", - "core.mappings", - "core.look", -}) do - local status_ok, fault = pcall(require, source) - if not status_ok then - vim.api.nvim_err_writeln("Failed to load " .. source .. "\n\n" .. fault) - end -end - --- to include e.g. the spell dictionaries for vim -vim.opt.rtp:append(vim.fn.stdpath("data") .. "/site") +require("core") diff --git a/nvim/.config/nvim/lua/core/init.lua b/nvim/.config/nvim/lua/core/init.lua new file mode 100644 index 0000000..035fe11 --- /dev/null +++ b/nvim/.config/nvim/lua/core/init.lua @@ -0,0 +1,12 @@ +for _, source in ipairs({ + "core.settings", + "core.lazy", + "core.autocmds", + "core.mappings", + "core.look", +}) do + local status_ok, fault = pcall(require, source) + if not status_ok then + vim.api.nvim_err_writeln("Failed to load " .. source .. "\n\n" .. fault) + end +end From 75334e9e873e5734ee4b1b1ac284acf560e393c6 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Dec 2023 14:08:17 +0100 Subject: [PATCH 2/8] nvim: Improve spellfile download messages --- nvim/.config/sh/env.d/set-up-spellfile.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvim/.config/sh/env.d/set-up-spellfile.sh b/nvim/.config/sh/env.d/set-up-spellfile.sh index 39eac18..2ccdd31 100644 --- a/nvim/.config/sh/env.d/set-up-spellfile.sh +++ b/nvim/.config/sh/env.d/set-up-spellfile.sh @@ -2,10 +2,10 @@ # Set up a non-english spell dictionary if it doesn't exist yet. if [ ! -e "${XDG_DATA_HOME:-$HOME/.local/share}/nvim/site/spell/de.utf-8.spl" ]; then - echo "Neovim spell dictionary not yet installed, downloading..." + printf "Neovim spell dictionary not yet installed, downloading..." mkdir -p "${XDG_DATA_HOME:-$HOME/.local/share}/nvim/site/spell/" wget -q 'https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.spl' -O "${XDG_DATA_HOME:-$HOME/.local/share}/nvim/site/spell/de.utf-8.spl" - echo "Done." + printf " done!\n" fi From 0bdd406f5643d79a8a269cdf76f6c26c4d24bc49 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Dec 2023 14:40:58 +0100 Subject: [PATCH 3/8] nvim: Replace popup notifications with fidget Since I am already using fidget.nvim for lsp notifications, might as well use it for other, more explicit ones. Removed nvim-notify in favor of this since I like how unobtrusive the notifications are (and let's be honest, most you don't need to pay attention to, instead they just take you out of flow). --- nvim/.config/nvim/lazy-lock.json | 3 +-- nvim/.config/nvim/lua/plugins/ide.lua | 3 --- nvim/.config/nvim/lua/plugins/ui.lua | 18 ++++++++++++------ 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 4e44088..67a5aa9 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -26,7 +26,7 @@ "conform.nvim": { "branch": "master", "commit": "ce95e6b2a072d81fd312ff213f241cacab1eccef" }, "dial.nvim": { "branch": "master", "commit": "54b503f906bc9e5ab85288414840a1b86d40769f" }, "dressing.nvim": { "branch": "master", "commit": "8b7ae53d7f04f33be3439a441db8071c96092d19" }, - "fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" }, + "fidget.nvim": { "branch": "main", "commit": "300018af4abd00610a345e382ca1f4b7ba420f77" }, "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, "fwatch.nvim": { "branch": "main", "commit": "a691f7349dc66285cd75a1a698dd28bca45f2bf8" }, "git-conflict.nvim": { "branch": "main", "commit": "4e0191c9a0ae05d7fbdcdc7f15cd358f56d23bfb" }, @@ -54,7 +54,6 @@ "nvim-coverage": { "branch": "main", "commit": "cf4b5c61dfac977026a51a2bcad9173c272986ce" }, "nvim-lint": { "branch": "master", "commit": "849ccb610de3f6ce1a239ea1e68568ef1a53d5df" }, "nvim-lspconfig": { "branch": "master", "commit": "cf3dd4a290084a868fac0e2e876039321d57111c" }, - "nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" }, "nvim-surround": { "branch": "main", "commit": "703ec63aa798e5e07d309b35e42def34bebe0174" }, "nvim-toggleterm.lua": { "branch": "main", "commit": "faee9d60428afc7857e0927fdc18daa6c409fa64" }, "nvim-tree.lua": { "branch": "master", "commit": "7d1760f892951dd6a118dae1d7a1d8df5f029edf" }, diff --git a/nvim/.config/nvim/lua/plugins/ide.lua b/nvim/.config/nvim/lua/plugins/ide.lua index beb93cb..7c3730c 100644 --- a/nvim/.config/nvim/lua/plugins/ide.lua +++ b/nvim/.config/nvim/lua/plugins/ide.lua @@ -236,9 +236,6 @@ return { event = { "InsertEnter", "CmdlineEnter" }, }, - -- loading animations for some LSP - { "j-hui/fidget.nvim", config = true, tag = "legacy", event = "VeryLazy" }, - -- useful quickfix-like buffer { "folke/trouble.nvim", diff --git a/nvim/.config/nvim/lua/plugins/ui.lua b/nvim/.config/nvim/lua/plugins/ui.lua index d408847..4130eb6 100644 --- a/nvim/.config/nvim/lua/plugins/ui.lua +++ b/nvim/.config/nvim/lua/plugins/ui.lua @@ -8,13 +8,19 @@ return { end, event = "VeryLazy", }, - -- create a pretty pop-up notification + -- create pretty unobtrusive notifications { - "rcarriga/nvim-notify", - config = function() - vim.notify = require("notify") - end, - event = "VeryLazy", + "j-hui/fidget.nvim", + opts = { + progress = { + suppress_on_insert = true, + ignore_done_already = true, + }, + notification = { + override_vim_notify = true, + }, + }, + event = "VimEnter", }, -- make all vim.ui interfaces prettyy { "stevearc/dressing.nvim", config = true, event = "VeryLazy" }, From 0d017f774739fca376fad724faca817bac65b1ac Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Dec 2023 14:49:40 +0100 Subject: [PATCH 4/8] nvim: Unpin base16 plugin Since the newer versions are working well on my system again, we can unpint the pinned commit from base16. --- nvim/.config/nvim/lazy-lock.json | 2 +- nvim/.config/nvim/lua/plugins/core.lua | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 67a5aa9..9ee7476 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -48,8 +48,8 @@ "neotest": { "branch": "master", "commit": "009328955066ae6c170d24bb0de5f168d8760ff8" }, "neotest-python": { "branch": "master", "commit": "81d2265efac717bb567bc15cc652ae10801286b3" }, "nvim-FeMaco.lua": { "branch": "main", "commit": "6af458f0196215f397db31a6e1fb2df795811693" }, - "nvim-base16": { "branch": "master", "commit": "96e308958625a84940d5e443475465abf99c7bd9" }, "nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" }, + "nvim-base16": { "branch": "master", "commit": "010bedf0b7c01ab4d4e4e896a8527d97c222351d" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, "nvim-coverage": { "branch": "main", "commit": "cf4b5c61dfac977026a51a2bcad9173c272986ce" }, "nvim-lint": { "branch": "master", "commit": "849ccb610de3f6ce1a239ea1e68568ef1a53d5df" }, diff --git a/nvim/.config/nvim/lua/plugins/core.lua b/nvim/.config/nvim/lua/plugins/core.lua index 8bac49c..fb76d5a 100644 --- a/nvim/.config/nvim/lua/plugins/core.lua +++ b/nvim/.config/nvim/lua/plugins/core.lua @@ -41,7 +41,6 @@ return { lazy = false, priority = 1000, dependencies = { "rktjmp/fwatch.nvim" }, - commit = "96e3089", -- pin it to last commit before regression change }, -- try to avoid putting files in util buffers, e.g. filetree, aerial, undotree, .. { From 116cbe79befa0e7e8b8469b2675b3242418c4cbd Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Dec 2023 15:11:14 +0100 Subject: [PATCH 5/8] nvim: Refactor lualine configuration Configure in its lazy loading file to not have an extra file flying around. --- .../nvim/lua/plugins/config/lualine.lua | 28 ---------------- nvim/.config/nvim/lua/plugins/ui.lua | 33 ++++++++++++++++--- 2 files changed, 29 insertions(+), 32 deletions(-) delete mode 100644 nvim/.config/nvim/lua/plugins/config/lualine.lua diff --git a/nvim/.config/nvim/lua/plugins/config/lualine.lua b/nvim/.config/nvim/lua/plugins/config/lualine.lua deleted file mode 100644 index e978425..0000000 --- a/nvim/.config/nvim/lua/plugins/config/lualine.lua +++ /dev/null @@ -1,28 +0,0 @@ -require("lualine").setup({ - options = { - icons_enabled = true, - theme = "auto", - component_separators = { left = "", right = "" }, - section_separators = { left = "", right = "" }, - disabled_filetypes = {}, - always_divide_middle = true, - }, - sections = { - lualine_a = { "mode" }, - lualine_b = { "branch", "diff", "diagnostics" }, - lualine_c = { "filename" }, - lualine_x = { "encoding", "fileformat", "filetype" }, - lualine_y = { "progress", "location" }, - lualine_z = { "hostname" }, - }, - inactive_sections = { - lualine_a = {}, - lualine_b = { "branch", "diff" }, - lualine_c = { "filename" }, - lualine_x = {}, - lualine_y = { "location" }, - lualine_z = {}, - }, - tabline = {}, - extensions = { "quickfix", "toggleterm" }, -}) diff --git a/nvim/.config/nvim/lua/plugins/ui.lua b/nvim/.config/nvim/lua/plugins/ui.lua index 4130eb6..e9b3477 100644 --- a/nvim/.config/nvim/lua/plugins/ui.lua +++ b/nvim/.config/nvim/lua/plugins/ui.lua @@ -3,10 +3,35 @@ return { { "nvim-lualine/lualine.nvim", requires = { "nvim-tree/nvim-web-devicons", config = true }, - config = function() - require("plugins.config.lualine") - end, - event = "VeryLazy", + opts = { + options = { + icons_enabled = true, + theme = "auto", + component_separators = { left = "", right = "" }, + section_separators = { left = "", right = "" }, + disabled_filetypes = {}, + always_divide_middle = true, + }, + sections = { + lualine_a = { "mode" }, + lualine_b = { "branch", "diff", "diagnostics" }, + lualine_c = { "filename" }, + lualine_x = { "encoding", "fileformat", "filetype" }, + lualine_y = { "progress", "location" }, + lualine_z = { "hostname" }, + }, + inactive_sections = { + lualine_a = {}, + lualine_b = { "branch", "diff" }, + lualine_c = { "filename" }, + lualine_x = {}, + lualine_y = { "location" }, + lualine_z = {}, + }, + tabline = {}, + extensions = { "quickfix", "toggleterm" }, + }, + event = { "BufNewFile", "BufAdd", "BufWinEnter" }, }, -- create pretty unobtrusive notifications { From ca7d43ba51f7d4068e4ade0ac55fc2a0f4dfd3ca Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Dec 2023 15:43:44 +0100 Subject: [PATCH 6/8] nvim: Update plugins and lazy loading --- nvim/.config/nvim/lazy-lock.json | 23 ++++++++++---------- nvim/.config/nvim/lua/core/mappings.lua | 8 ------- nvim/.config/nvim/lua/plugins/config/cmp.lua | 23 ++++++++++---------- nvim/.config/nvim/lua/plugins/core.lua | 22 ++++++++++--------- nvim/.config/nvim/lua/plugins/git.lua | 3 ++- nvim/.config/nvim/lua/plugins/ui.lua | 19 +++++++++++++--- 6 files changed, 54 insertions(+), 44 deletions(-) diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 9ee7476..2110ae4 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -6,13 +6,14 @@ "Navigator.nvim": { "branch": "master", "commit": "91d86506ac2a039504d5205d32a1d4bc7aa57072" }, "aerial.nvim": { "branch": "master", "commit": "63ec2bfc3d9b8ce1fd943fff14781504d8ee250e" }, "bats.vim": { "branch": "master", "commit": "6a5d2ef22b0ede503d867770afd02ebb1f97b709" }, + "bigfile.nvim": { "branch": "main", "commit": "33eb067e3d7029ac77e081cfe7c45361887a311a" }, "cmp-beancount": { "branch": "main", "commit": "da154ea94d598e6649d6ad01efa0a8611eff460d" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-calc": { "branch": "main", "commit": "ce91d14d2e7a8b3f6ad86d85e34d41c1ae6268d9" }, "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, "cmp-digraphs": { "branch": "master", "commit": "5efc1f0078d7c5f3ea1c8e3aad04da3fd6e081a9" }, "cmp-latex-symbols": { "branch": "main", "commit": "165fb66afdbd016eaa1570e41672c4c557b57124" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-pandoc-references": { "branch": "master", "commit": "2c808dff631a783ddd2c554c4c6033907589baf6" }, @@ -20,8 +21,9 @@ "cmp-rg": { "branch": "master", "commit": "677a7874ee8f1afc648c2e7d63a97bc21a7663c5" }, "cmp-spell": { "branch": "master", "commit": "32a0867efa59b43edbb2db67b0871cfad90c9b66" }, "cmp-tmux": { "branch": "main", "commit": "97ec06b8030b8bf6d1fd83d49bdd16c98e04c845" }, - "cmp-treesitter": { "branch": "master", "commit": "b8bc760dfcc624edd5454f0982b63786a822eed9" }, + "cmp-treesitter": { "branch": "master", "commit": "13e4ef8f4dd5639fca2eb9150e68f47639a9b37d" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, + "codeium.nvim": { "branch": "main", "commit": "a0d43300f9a17a6ac775947ae4fb6b99ac5a92d0" }, "completion-vcard": { "branch": "master", "commit": "2220fd517a985ececed1adcf0e5be8f2815564c7" }, "conform.nvim": { "branch": "master", "commit": "ce95e6b2a072d81fd312ff213f241cacab1eccef" }, "dial.nvim": { "branch": "master", "commit": "54b503f906bc9e5ab85288414840a1b86d40769f" }, @@ -44,27 +46,27 @@ "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, "mdeval.nvim": { "branch": "master", "commit": "2654caf8ecaad702b50199d18e39cff23d81e0ba" }, "mini.nvim": { "branch": "main", "commit": "b5645ac6eefce8e7af9d7dd4e5e296a81cba8a10" }, - "molten-nvim": { "branch": "main", "commit": "93f2f168e77cbd82a881e07030cdbd45a48ed070" }, + "molten-nvim": { "branch": "main", "commit": "883ecb358e3b4dca9a83daa05b51f22b81f878e9" }, "neotest": { "branch": "master", "commit": "009328955066ae6c170d24bb0de5f168d8760ff8" }, "neotest-python": { "branch": "master", "commit": "81d2265efac717bb567bc15cc652ae10801286b3" }, "nvim-FeMaco.lua": { "branch": "main", "commit": "6af458f0196215f397db31a6e1fb2df795811693" }, - "nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" }, "nvim-base16": { "branch": "master", "commit": "010bedf0b7c01ab4d4e4e896a8527d97c222351d" }, + "nvim-cmp": { "branch": "main", "commit": "41d7633e4146dce1072de32cea31ee31b056a131" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, "nvim-coverage": { "branch": "main", "commit": "cf4b5c61dfac977026a51a2bcad9173c272986ce" }, "nvim-lint": { "branch": "master", "commit": "849ccb610de3f6ce1a239ea1e68568ef1a53d5df" }, - "nvim-lspconfig": { "branch": "master", "commit": "cf3dd4a290084a868fac0e2e876039321d57111c" }, + "nvim-lspconfig": { "branch": "master", "commit": "f451052bd6804e9e5ccd0ac874d7df8d3d4c55b9" }, "nvim-surround": { "branch": "main", "commit": "703ec63aa798e5e07d309b35e42def34bebe0174" }, - "nvim-toggleterm.lua": { "branch": "main", "commit": "faee9d60428afc7857e0927fdc18daa6c409fa64" }, - "nvim-tree.lua": { "branch": "master", "commit": "7d1760f892951dd6a118dae1d7a1d8df5f029edf" }, + "nvim-toggleterm.lua": { "branch": "main", "commit": "cbd041d91b90cd3c02df03fe6133208888f8e008" }, + "nvim-tree.lua": { "branch": "master", "commit": "141c0f97c35f274031294267808ada59bb5fb08e" }, "nvim-treesitter": { "branch": "master", "commit": "63260da18bf273c76b8e2ea0db84eb901cab49ce" }, - "nvim-treesitter-context": { "branch": "master", "commit": "bf4d15ee4e96ff5201f16a4ed14443670662eb90" }, + "nvim-treesitter-context": { "branch": "master", "commit": "cfa8ee19ac9bae9b7fb2958eabe2b45b70c56ccb" }, "nvim-treesitter-endwise": { "branch": "master", "commit": "4c344ffc8d54d7e1ba2cefaaa2c10ea93aa1cc2d" }, "nvim-treesitter-textsubjects": { "branch": "master", "commit": "011c09784f1a95cf469a48c1993b664190440391" }, - "nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" }, + "nvim-ts-autotag": { "branch": "main", "commit": "8515e48a277a2f4947d91004d9aa92c29fdc5e18" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "1277b4a1f451b0f18c0790e1a7f12e1e5fdebfee" }, "nvim-ts-rainbow2": { "branch": "master", "commit": "b3120cd5ae9ca524af9cb602f41e12e301fa985f" }, - "nvim-web-devicons": { "branch": "master", "commit": "5efb8bd06841f91f97c90e16de85e96d57e9c862" }, + "nvim-web-devicons": { "branch": "master", "commit": "8b2e5ef9eb8a717221bd96cb8422686d65a09ed5" }, "otter.nvim": { "branch": "main", "commit": "9a3db06bf3abadafb93279648317984ca789b888" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, "popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" }, @@ -81,7 +83,6 @@ "vim-easy-align": { "branch": "master", "commit": "0db4ea6132110631ec678a99a82aa49a0686ae65" }, "vim-exchange": { "branch": "master", "commit": "784d63083ad7d613aa96f00021cd0dfb126a781a" }, "vim-numbertoggle": { "branch": "main", "commit": "df9b1fe616507340718716204ba7f434125bdf7a" }, - "vim-oscyank": { "branch": "main", "commit": "ffe827a27dae98aa826e2295336c650c9a434da0" }, "vim-pandoc-syntax": { "branch": "master", "commit": "16939cda184ff555938cc895cc62477c172997f9" }, "vim-spellsync": { "branch": "master", "commit": "3d6dd50de9c4d953cc16638112a6ae196df41463" }, "which-key.nvim": { "branch": "main", "commit": "ce741eb559c924d72e3a67d2189ad3771a231414" }, diff --git a/nvim/.config/nvim/lua/core/mappings.lua b/nvim/.config/nvim/lua/core/mappings.lua index bea44c1..3b3d39b 100644 --- a/nvim/.config/nvim/lua/core/mappings.lua +++ b/nvim/.config/nvim/lua/core/mappings.lua @@ -266,11 +266,3 @@ map( [[:lua require('wrapping').toggle_wrap_mode() ]], { silent = true, desc = "toggle wrap mode" } ) --- PLUGIN: nvim-colorizer -map("n", "sc", "ColorizerToggle", { silent = true, desc = "toggle colorizer" }) -map( - "n", - "sC", - 'lua require("colorizer").attach_to_buffer(0, {mode = "background"} )', - { silent = true, desc = "colorize background" } -) diff --git a/nvim/.config/nvim/lua/plugins/config/cmp.lua b/nvim/.config/nvim/lua/plugins/config/cmp.lua index ccb80af..31db206 100644 --- a/nvim/.config/nvim/lua/plugins/config/cmp.lua +++ b/nvim/.config/nvim/lua/plugins/config/cmp.lua @@ -57,11 +57,11 @@ cmp.setup({ { name = "calc" }, { name = "path" }, { name = "buffer", keyword_length = 3 }, - { name = "digraphs" }, { name = "latex_symbols" }, { name = "spell", keyword_length = 3 }, { name = "tmux" }, -- { name = 'rg', keyword_length = 5 }, { name = "vCard" }, + { name = "digraphs" }, }, mapping = cmp.mapping.preset.insert({ [""] = cmp.mapping.scroll_docs(-4), @@ -112,18 +112,19 @@ cmp.setup({ -- Kind icons, removing kind text leaving only icon -- vim_item.kind = string.format('%s %s', kind_icons[vim_item.kind], vim_item.kind) vim_item.kind = string.format("%s", kind_icons[vim_item.kind]) + -- Source vim_item.menu = ({ - buffer = "[Buf]", - calc = "[Cal]", - digraphs = "[Dig]", - latex_symbols = "[LaTeX]", - luasnip = "[Snip]", - nvim_lsp = "[Lsp]", - nvim_lua = "[Lua]", - pandoc_references = "[Bib]", - spell = "[Spl]", - vCard = "[vCrd]", + buffer = "", + calc = "󰃬", + digraphs = "", + latex_symbols = "󰊄", + luasnip = "", + nvim_lsp = "", + nvim_lua = "󰢱", + pandoc_references = "", + spell = "󰓆", + vCard = "󰛋", })[entry.source.name] return vim_item end, diff --git a/nvim/.config/nvim/lua/plugins/core.lua b/nvim/.config/nvim/lua/plugins/core.lua index fb76d5a..7162fd1 100644 --- a/nvim/.config/nvim/lua/plugins/core.lua +++ b/nvim/.config/nvim/lua/plugins/core.lua @@ -7,16 +7,14 @@ return { event = "VeryLazy", }, -- jump between letters with improved fFtT quicksearch, mimics sneak - { "ggandor/lightspeed.nvim", event = "VeryLazy" }, + { "ggandor/lightspeed.nvim", event = "BufEnter" }, - -- yank from *anywhere* (even ssh session) to clipboard, using :OSCYank - { "ojroques/vim-oscyank", event = "VeryLazy" }, -- personal dict improvements for git sync { "micarmst/vim-spellsync", event = "VeryLazy" }, { "folke/which-key.nvim", config = true, - event = "VeryLazy", + event = "CursorHold", }, -- collection of plugins { @@ -42,10 +40,14 @@ return { priority = 1000, dependencies = { "rktjmp/fwatch.nvim" }, }, - -- try to avoid putting files in util buffers, e.g. filetree, aerial, undotree, .. - { - 'stevearc/stickybuf.nvim', - config = true, - } - + -- try to avoid putting files in util buffers, e.g. filetree, aerial, undotree, .. + { + "stevearc/stickybuf.nvim", + config = true, + }, + -- make it a little less painful to open really big (>2mb) files by disabling features + { + "LunarVim/bigfile.nvim", + lazy = false, + }, } diff --git a/nvim/.config/nvim/lua/plugins/git.lua b/nvim/.config/nvim/lua/plugins/git.lua index 3c52bad..b5414d1 100644 --- a/nvim/.config/nvim/lua/plugins/git.lua +++ b/nvim/.config/nvim/lua/plugins/git.lua @@ -18,7 +18,8 @@ return { }, { "lewis6991/gitsigns.nvim", -- show vcs changes on left-hand gutter - event = "VeryLazy", + event = { "InsertEnter", "CursorHold" }, + cmd = "Gitsigns", config = function() require("gitsigns").setup({ numhl = true, diff --git a/nvim/.config/nvim/lua/plugins/ui.lua b/nvim/.config/nvim/lua/plugins/ui.lua index e9b3477..90ac1ee 100644 --- a/nvim/.config/nvim/lua/plugins/ui.lua +++ b/nvim/.config/nvim/lua/plugins/ui.lua @@ -51,11 +51,11 @@ return { { "stevearc/dressing.nvim", config = true, event = "VeryLazy" }, -- numbers to absolute for all buffers but the current which is relative - { "jeffkreeftmeijer/vim-numbertoggle", event = "VeryLazy" }, + { "jeffkreeftmeijer/vim-numbertoggle", event = "BufEnter" }, -- auto-hiding colorcolumn { "m4xshen/smartcolumn.nvim", - event = "VeryLazy", + event = "BufEnter", opts = { colorcolumn = { "100" }, scope = "window", @@ -79,7 +79,20 @@ return { user_default_options = { mode = "virtualtext" }, }) end, - event = "VeryLazy", + cmd = { + "ColorizerToggle", + "ColorizerAttachToBuffer", + "ColorizerDetachFromBuffer", + "ColorizerReloadAllBuffers", + }, + keys = { + { "sc", "ColorizerToggle", { silent = true, desc = "toggle colorizer" } }, + { + "sC", + 'lua require("colorizer").attach_to_buffer(0, {mode = "background"} )', + { silent = true, desc = "colorize background" }, + }, + }, }, { "jiaoshijie/undotree", From 747e9bc2f568df066c9f19c83c1d2b0e89e9a30a Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Dec 2023 16:32:00 +0100 Subject: [PATCH 7/8] repo: Turn mail account files into templates Since we have extracted changes into private repository, change the files containing them into templates so they do not get overwritten by branch changes. --- .dotter/global.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.dotter/global.toml b/.dotter/global.toml index 8e674b4..fbfa7e1 100644 --- a/.dotter/global.toml +++ b/.dotter/global.toml @@ -51,6 +51,11 @@ pass = "~" [office.files] "office/README.md" = { target = "~/NOWHERE", type = "symbolic", if = "false" } "office/.config/glow/email.json" = { target = "~/.config/glow/email.json", type = "symbolic" } +"office/.config/isync/mbsyncrc" = { target = "~/.config/isync/mbsyncrc", type = "template" } +"office/.config/msmtp/config" = { target = "~/.config/msmtp/config", type = "template" } +"office/.config/neomutt/account" = { target = "~/.config/neomutt/account", type = "template" } +"office/.config/neomutt/profile.gmail" = { target = "~/.config/neomutt/profile.gmail", type = "template" } +"office/.config/neomutt/profile.private" = { target = "~/.config/neomutt/profile.private", type = "template" } office = "~" [services.files] From 8aec761a20b458ed9b543b17d4c04b223248d340 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Dec 2023 16:35:55 +0100 Subject: [PATCH 8/8] git: Fix diff dark light setting automation --- git/.config/git/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/.config/git/config b/git/.config/git/config index fa694ae..19ae355 100644 --- a/git/.config/git/config +++ b/git/.config/git/config @@ -27,7 +27,7 @@ diffword = "!git diff --word-diff=color --word-diff-regex='[0-9A-Za-z_]+'" # word-wise diff, good for prose diffsyn = "!git difftool --tool difftastic" # add syntax-driven diff using treesitter diffside = "!DELTA_FEATURES='+side-by-side' git diff" # add side-by-side diffing - delta = "![ $TERM_DARK=false ] && delta --light || delta" # Take care that we always display right color scheme + delta = "![ $TERM_DARK = false ] && delta --light || delta" # Take care that we always display right color scheme [commit] gpgsign = true # sign commits as me verbose = true # Always show diff when preparing commit message