diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-05-29 16:21:27 +0200 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-05-29 16:21:27 +0200 |
| commit | 2c790a4b7abe1473f802cc5e408a1291e6ebb8ee (patch) | |
| tree | 59a654c74da65b7f0700ddc92e9f00ba29222869 | |
| parent | b875b7f877a08c20c6a903f57a6cb253057e6ab7 (diff) | |
| download | dotfiles-2c790a4b7abe1473f802cc5e408a1291e6ebb8ee.tar.gz dotfiles-2c790a4b7abe1473f802cc5e408a1291e6ebb8ee.zip | |
refactor(nvim): group vim.pack.add() calls
This is to avoid getting many prompts when launching nvim and installing
the packages initially.
| -rw-r--r-- | .config/nvim/after/ftplugin/markdown.lua | 2 | ||||
| -rw-r--r-- | .config/nvim/init.lua | 6 | ||||
| -rw-r--r-- | .config/nvim/plugin/00-plugins.lua | 19 | ||||
| -rw-r--r-- | .config/nvim/plugin/10-treesitter.lua | 2 | ||||
| -rw-r--r-- | .config/nvim/plugin/40-colors.lua | 1 | ||||
| -rw-r--r-- | .config/nvim/plugin/50-autopairs.lua | 2 | ||||
| -rw-r--r-- | .config/nvim/plugin/50-dap.lua | 2 | ||||
| -rw-r--r-- | .config/nvim/plugin/50-fzf-lua.lua | 5 | ||||
| -rw-r--r-- | .config/nvim/plugin/50-git.lua | 2 | ||||
| -rw-r--r-- | .config/nvim/plugin/50-lsp.lua | 2 | ||||
| -rw-r--r-- | .config/nvim/plugin/50-markdown.lua | 6 | ||||
| -rw-r--r-- | .config/nvim/plugin/50-statusline.lua | 4 |
12 files changed, 19 insertions, 34 deletions
diff --git a/.config/nvim/after/ftplugin/markdown.lua b/.config/nvim/after/ftplugin/markdown.lua index 2de456f..f897606 100644 --- a/.config/nvim/after/ftplugin/markdown.lua +++ b/.config/nvim/after/ftplugin/markdown.lua @@ -1,5 +1,3 @@ -vim.pack.add({ "https://github.com/qadzek/link.vim" }) -- Tidy URLs into a dedicated section - local function format() local view = vim.fn.winsaveview() local buf_str = table.concat(vim.api.nvim_buf_get_lines(0, 0, -1, false), "\n") .. "\n" diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 62dbac7..e1140f0 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -95,12 +95,6 @@ vim.api.nvim_create_autocmd({ "FileChangedShellPost" }, { }) ------------------------------------------------------------------------------------------------------------------------ --- Plugins ------------------------------------------------------------------------------------------------------------------------- - -vim.pack.add({ "https://github.com/tpope/vim-surround" }) -- Manipulate delimiters - ------------------------------------------------------------------------------------------------------------------------- -- Commands (there's more in the different plugins) ------------------------------------------------------------------------------------------------------------------------ diff --git a/.config/nvim/plugin/00-plugins.lua b/.config/nvim/plugin/00-plugins.lua new file mode 100644 index 0000000..9792db1 --- /dev/null +++ b/.config/nvim/plugin/00-plugins.lua @@ -0,0 +1,19 @@ +-- +-- Plugin declarations +-- + +vim.pack.add({ + "https://github.com/tpope/vim-surround", -- Manipulate delimiters + "https://github.com/nvim-treesitter/nvim-treesitter", -- Parsers, highlighting (treesitter, markdown) + "https://github.com/maxmx03/solarized.nvim", -- Solarized color scheme + "https://github.com/neovim/nvim-lspconfig", -- LSP server configurations + "https://github.com/mfussenegger/nvim-dap", -- DAP (Debug Adapter Protocol) client + "https://github.com/jbyuki/one-small-step-for-vimkind", -- DAP adapter for Neovim Lua + "https://github.com/nvim-tree/nvim-web-devicons", -- File-type icons (lualine, fzf-lua, render-markdown) + "https://github.com/nvim-lualine/lualine.nvim", -- Status line + "https://github.com/windwp/nvim-autopairs", -- Insert matching delimiters + "https://github.com/airblade/vim-gitgutter", -- Show git status in the gutter + "https://github.com/MeanderingProgrammer/render-markdown.nvim", -- Markdown rendering + "https://github.com/ibhagwan/fzf-lua", -- Fuzzy finder + "https://github.com/qadzek/link.vim", -- Tidy URLs into a dedicated section (markdown) +}) diff --git a/.config/nvim/plugin/10-treesitter.lua b/.config/nvim/plugin/10-treesitter.lua index 2a453c3..401aa23 100644 --- a/.config/nvim/plugin/10-treesitter.lua +++ b/.config/nvim/plugin/10-treesitter.lua @@ -2,8 +2,6 @@ -- Treesitter parsers -- -vim.pack.add({ "https://github.com/nvim-treesitter/nvim-treesitter" }) - require("nvim-treesitter").install({ "bash", "diff", diff --git a/.config/nvim/plugin/40-colors.lua b/.config/nvim/plugin/40-colors.lua index f7abd94..a57ae4e 100644 --- a/.config/nvim/plugin/40-colors.lua +++ b/.config/nvim/plugin/40-colors.lua @@ -1,7 +1,6 @@ -- -- Color scheme, custom highlights & per-window highlight namespaces -- -vim.pack.add({ "https://github.com/maxmx03/solarized.nvim" }) -- Solarized color scheme local solarized_colors = { base03 = "#002b36", diff --git a/.config/nvim/plugin/50-autopairs.lua b/.config/nvim/plugin/50-autopairs.lua index 2ab41c8..5f976db 100644 --- a/.config/nvim/plugin/50-autopairs.lua +++ b/.config/nvim/plugin/50-autopairs.lua @@ -3,8 +3,6 @@ -- -- See https://github.com/windwp/nvim-autopairs -vim.pack.add({ "https://github.com/windwp/nvim-autopairs" }) - local Rule = require("nvim-autopairs.rule") local npairs = require("nvim-autopairs") local cond = require("nvim-autopairs.conds") diff --git a/.config/nvim/plugin/50-dap.lua b/.config/nvim/plugin/50-dap.lua index 683984c..6e6eea1 100644 --- a/.config/nvim/plugin/50-dap.lua +++ b/.config/nvim/plugin/50-dap.lua @@ -2,11 +2,9 @@ -- DAP client/adapter configurations -- -vim.pack.add({ "https://github.com/mfussenegger/nvim-dap" }) -- DAP (Debug Adapter Protocol) client local dap = require("dap") -- OSV configuration -vim.pack.add({ "https://github.com/jbyuki/one-small-step-for-vimkind" }) -- DAP adapter for Neovim Lua local osv = require("osv") dap.configurations.lua = { diff --git a/.config/nvim/plugin/50-fzf-lua.lua b/.config/nvim/plugin/50-fzf-lua.lua index 2275a2d..f2ced3d 100644 --- a/.config/nvim/plugin/50-fzf-lua.lua +++ b/.config/nvim/plugin/50-fzf-lua.lua @@ -6,11 +6,6 @@ -- Avoid conflicts with the already existing fzf configuration at ~/.config/fzf/fzf.bash vim.env.FZF_DEFAULT_OPTS = nil -vim.pack.add({ - "https://github.com/nvim-tree/nvim-web-devicons", -- File-type icons (also used by lualine) - "https://github.com/ibhagwan/fzf-lua", -}) - local fzf = require("fzf-lua") fzf.setup({}) diff --git a/.config/nvim/plugin/50-git.lua b/.config/nvim/plugin/50-git.lua index 64e6cd0..c7177b2 100644 --- a/.config/nvim/plugin/50-git.lua +++ b/.config/nvim/plugin/50-git.lua @@ -2,8 +2,6 @@ -- Git-related utilities -- -vim.pack.add({ "https://github.com/airblade/vim-gitgutter" }) -- Show git status in the gutter - vim.keymap.set("n", "<Leader>gt", "<Cmd>GitGutterLineHighlightsToggle<CR>", { desc = "Toggle git line highlighting" }) vim.keymap.set("n", "<Leader>gg", "<Cmd>GitGutter<CR>", { desc = "Refresh GitGutter" }) vim.keymap.set("n", "<Leader>gq", "<Cmd>GitGutterQuickFix<CR>", { desc = "Git hunks to quickfix list" }) diff --git a/.config/nvim/plugin/50-lsp.lua b/.config/nvim/plugin/50-lsp.lua index 938cc64..5f22b37 100644 --- a/.config/nvim/plugin/50-lsp.lua +++ b/.config/nvim/plugin/50-lsp.lua @@ -11,8 +11,6 @@ local function inspect_lsp() vim.notify(vim.inspect(client.server_capabilities), vim.log.levels.INFO) end -vim.pack.add({ "https://github.com/neovim/nvim-lspconfig" }) - vim.api.nvim_create_user_command("LspInspect", inspect_lsp, { desc = "Inspect LSP client" }) -- Enable LSP server capabilities if available when attaching, see `:help lsp-attach` diff --git a/.config/nvim/plugin/50-markdown.lua b/.config/nvim/plugin/50-markdown.lua index 87a7838..ac8f7b3 100644 --- a/.config/nvim/plugin/50-markdown.lua +++ b/.config/nvim/plugin/50-markdown.lua @@ -3,12 +3,6 @@ -- -- Uses `render-markdown`, see https://github.com/MeanderingProgrammer/render-markdown.nvim -vim.pack.add({ - "https://github.com/nvim-treesitter/nvim-treesitter", - "https://github.com/nvim-tree/nvim-web-devicons", - "https://github.com/MeanderingProgrammer/render-markdown.nvim", -}) - require("nvim-treesitter").install({ "html", "latex", diff --git a/.config/nvim/plugin/50-statusline.lua b/.config/nvim/plugin/50-statusline.lua index 10c88f6..eea1291 100644 --- a/.config/nvim/plugin/50-statusline.lua +++ b/.config/nvim/plugin/50-statusline.lua @@ -3,10 +3,6 @@ -- -- I use lualine, see https://github.com/nvim-lualine/lualine.nvim#configuring-lualine-in-initvim -vim.pack.add({ - "https://github.com/nvim-tree/nvim-web-devicons", - "https://github.com/nvim-lualine/lualine.nvim", -}) local lualine = require("lualine") local function spell_status() |
