From aa0432684fd9c71b7a20414ca767ac33b11b882a Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Wed, 1 Oct 2025 22:01:58 +0100 Subject: [PATCH 01/32] Update configuration --- init.lua | 14 +++++------ lua/custom/plugins/comment.lua | 14 +++++++++++ lua/custom/plugins/copilot.lua | 26 +++++++++++++++++++++ lua/custom/plugins/init.lua | 8 ++++++- lua/custom/plugins/masonconfig.lua | 31 +++++++++++++++++++++++++ lua/custom/plugins/neo-tree-config.lua | 32 ++++++++++++++++++++++++++ lua/custom/plugins/tabs.lua | 26 +++++++++++++++++++++ 7 files changed, 143 insertions(+), 8 deletions(-) create mode 100644 lua/custom/plugins/comment.lua create mode 100644 lua/custom/plugins/copilot.lua create mode 100644 lua/custom/plugins/masonconfig.lua create mode 100644 lua/custom/plugins/neo-tree-config.lua create mode 100644 lua/custom/plugins/tabs.lua diff --git a/init.lua b/init.lua index b98ffc6198a..219095de5bc 100644 --- a/init.lua +++ b/init.lua @@ -91,7 +91,7 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = false +vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.o` @@ -102,7 +102,7 @@ vim.g.have_nerd_font = false vim.o.number = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.o.relativenumber = true +vim.o.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! vim.o.mouse = 'a' @@ -975,16 +975,16 @@ require('lazy').setup({ -- -- require 'kickstart.plugins.debug', -- require 'kickstart.plugins.indent_line', - -- require 'kickstart.plugins.lint', - -- require 'kickstart.plugins.autopairs', - -- require 'kickstart.plugins.neo-tree', - -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps + require 'kickstart.plugins.lint', + require 'kickstart.plugins.autopairs', + require 'kickstart.plugins.neo-tree', + require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, -- -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- Or use telescope! diff --git a/lua/custom/plugins/comment.lua b/lua/custom/plugins/comment.lua new file mode 100644 index 00000000000..b610b7f34c3 --- /dev/null +++ b/lua/custom/plugins/comment.lua @@ -0,0 +1,14 @@ +return { + { + 'numToStr/Comment.nvim', + config = function(_, opts) + require('Comment').setup(opts) + + vim.keymap.set('n', '/', function() + require('Comment.api').toggle.linewise.current() + end, { desc = 'comment toggle' }) + + vim.keymap.set('v', '/', "lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", { desc = 'comment toggle' }) + end, + }, +} diff --git a/lua/custom/plugins/copilot.lua b/lua/custom/plugins/copilot.lua new file mode 100644 index 00000000000..203bda613d0 --- /dev/null +++ b/lua/custom/plugins/copilot.lua @@ -0,0 +1,26 @@ +return { + { + 'zbirenbaum/copilot.lua', + cmd = 'Copilot', + event = 'InsertEnter', + config = function() + require('copilot').setup { + suggestion = { + enabled = true, + auto_trigger = true, + keymap = { + accept = '', + }, + }, + panel = { + enabled = true, + auto_refresh = true, + }, + filetypes = { + ['*'] = true, + typescript = true, + }, + } + end, + }, +} diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8d7a..fbc067bcaa0 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,10 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information -return {} +return { + require 'custom.plugins.comment', + require 'custom.plugins.tabs', + require 'custom.plugins.copilot', + require 'custom.plugins.masonconfig', + require 'custom.plugins.neo-tree-config', +} diff --git a/lua/custom/plugins/masonconfig.lua b/lua/custom/plugins/masonconfig.lua new file mode 100644 index 00000000000..d4fa5be9bff --- /dev/null +++ b/lua/custom/plugins/masonconfig.lua @@ -0,0 +1,31 @@ +return { + { + 'williamboman/mason.nvim', + opts = function(_, opts) + -- Ensure these tools are installed + opts.ensure_installed = opts.ensure_installed or {} + + local ensure_installed = { + 'ts_ls', + 'biome', + 'docker_compose_language_service', + 'dockerls', + 'graphql', + 'jsonls', + 'sqlls', + 'yamlls', + 'eslint', + 'bashls', + } + + -- Merge with existing ensure_installed if any + for _, tool in ipairs(ensure_installed) do + if not vim.tbl_contains(opts.ensure_installed, tool) then + table.insert(opts.ensure_installed, tool) + end + end + + return opts + end, + }, +} diff --git a/lua/custom/plugins/neo-tree-config.lua b/lua/custom/plugins/neo-tree-config.lua new file mode 100644 index 00000000000..6e0394a7062 --- /dev/null +++ b/lua/custom/plugins/neo-tree-config.lua @@ -0,0 +1,32 @@ +return { + { + 'nvim-neo-tree/neo-tree.nvim', + branch = 'v3.x', + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-tree/nvim-web-devicons', + 'MunifTanjim/nui.nvim', + }, + keys = { + { 'e', desc = 'Open NeoTree' }, + { 'n', desc = 'Focus NeoTree' }, + }, + config = function() + local toggle_tree = function() + vim.cmd 'Neotree toggle' + vim.opt.relativenumber = true -- Use relative line numbers + end + + -- Set up your custom keymaps + vim.keymap.set('n', 'e', toggle_tree, { desc = 'Open NeoTree' }) + vim.keymap.set('n', 'n', function() + vim.cmd 'Neotree focus' + end, { desc = 'Focus NeoTree' }) + + -- Setup neo-tree + require('neo-tree').setup { + -- Add any neo-tree options here if needed + } + end, + }, +} diff --git a/lua/custom/plugins/tabs.lua b/lua/custom/plugins/tabs.lua new file mode 100644 index 00000000000..88c00344ddf --- /dev/null +++ b/lua/custom/plugins/tabs.lua @@ -0,0 +1,26 @@ +return { + { + 'romgrk/barbar.nvim', + dependencies = { + 'lewis6991/gitsigns.nvim', -- OPTIONAL: for git status + 'nvim-tree/nvim-web-devicons', -- OPTIONAL: for file icons + }, + init = function() + local map = vim.api.nvim_set_keymap + local opts = { noremap = true, silent = true } + vim.g.barbar_auto_setup = false + map('n', '', 'BufferNext', opts) + map('n', '', 'BufferPrevious', opts) + map('n', 'xx', 'BufferClose', opts) + map('n', 'xl', 'BufferCloseBuffersRight', opts) + map('n', 'xh', 'BufferCloseBuffersLeft', opts) + end, + opts = { + -- lazy.nvim will automatically call setup for you. put your options here, anything missing will use the default: + animation = true, + -- insert_at_start = true, + -- …etc. + }, + version = '^1.0.0', -- optional: only update when a new 1.x version is released + }, +} From bbda49daf5c3242e397740a78445f59a320d0268 Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Thu, 2 Oct 2025 00:06:55 +0100 Subject: [PATCH 02/32] Upate Mason Config --- init.lua | 10 +++++++++ lua/custom/plugins/init.lua | 1 - lua/custom/plugins/masonconfig.lua | 31 -------------------------- lua/custom/plugins/neo-tree-config.lua | 4 +--- 4 files changed, 11 insertions(+), 35 deletions(-) delete mode 100644 lua/custom/plugins/masonconfig.lua diff --git a/init.lua b/init.lua index 219095de5bc..20ae6563e5a 100644 --- a/init.lua +++ b/init.lua @@ -716,6 +716,16 @@ require('lazy').setup({ local ensure_installed = vim.tbl_keys(servers or {}) vim.list_extend(ensure_installed, { 'stylua', -- Used to format Lua code + 'ts_ls', + 'biome', + 'docker_compose_language_service', + 'dockerls', + 'graphql', + 'jsonls', + 'sqlls', + 'yamlls', + 'eslint', + 'bashls', }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index fbc067bcaa0..846e264a413 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -6,6 +6,5 @@ return { require 'custom.plugins.comment', require 'custom.plugins.tabs', require 'custom.plugins.copilot', - require 'custom.plugins.masonconfig', require 'custom.plugins.neo-tree-config', } diff --git a/lua/custom/plugins/masonconfig.lua b/lua/custom/plugins/masonconfig.lua deleted file mode 100644 index d4fa5be9bff..00000000000 --- a/lua/custom/plugins/masonconfig.lua +++ /dev/null @@ -1,31 +0,0 @@ -return { - { - 'williamboman/mason.nvim', - opts = function(_, opts) - -- Ensure these tools are installed - opts.ensure_installed = opts.ensure_installed or {} - - local ensure_installed = { - 'ts_ls', - 'biome', - 'docker_compose_language_service', - 'dockerls', - 'graphql', - 'jsonls', - 'sqlls', - 'yamlls', - 'eslint', - 'bashls', - } - - -- Merge with existing ensure_installed if any - for _, tool in ipairs(ensure_installed) do - if not vim.tbl_contains(opts.ensure_installed, tool) then - table.insert(opts.ensure_installed, tool) - end - end - - return opts - end, - }, -} diff --git a/lua/custom/plugins/neo-tree-config.lua b/lua/custom/plugins/neo-tree-config.lua index 6e0394a7062..925a5a846f3 100644 --- a/lua/custom/plugins/neo-tree-config.lua +++ b/lua/custom/plugins/neo-tree-config.lua @@ -24,9 +24,7 @@ return { end, { desc = 'Focus NeoTree' }) -- Setup neo-tree - require('neo-tree').setup { - -- Add any neo-tree options here if needed - } + require('neo-tree').setup {} end, }, } From ba8725e5fed363c9c1e056655df4f098349de09e Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Thu, 2 Oct 2025 01:02:40 +0100 Subject: [PATCH 03/32] Add copilot chat and other nice things --- lua/custom/plugins/copilot-chat.lua | 18 ++++++++++++++++++ lua/custom/plugins/copilot.lua | 2 +- lua/custom/plugins/init.lua | 1 + lua/custom/plugins/neo-tree-config.lua | 8 +++++++- lua/custom/plugins/sleuth.lua | 7 +++++++ 5 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 lua/custom/plugins/copilot-chat.lua create mode 100644 lua/custom/plugins/sleuth.lua diff --git a/lua/custom/plugins/copilot-chat.lua b/lua/custom/plugins/copilot-chat.lua new file mode 100644 index 00000000000..1fc3dad331e --- /dev/null +++ b/lua/custom/plugins/copilot-chat.lua @@ -0,0 +1,18 @@ +return { + { + 'CopilotC-Nvim/CopilotChat.nvim', + dependencies = { + { 'nvim-lua/plenary.nvim', branch = 'master' }, + }, + build = 'make tiktoken', + init = function() + local map = vim.api.nvim_set_keymap + local opts = { noremap = true, silent = true } + + map('n', 'ch', 'CopilotChatToggle', opts) + end, + opts = { + -- See Configuration section for options + }, + }, +} diff --git a/lua/custom/plugins/copilot.lua b/lua/custom/plugins/copilot.lua index 203bda613d0..0e67f891e8a 100644 --- a/lua/custom/plugins/copilot.lua +++ b/lua/custom/plugins/copilot.lua @@ -6,7 +6,7 @@ return { config = function() require('copilot').setup { suggestion = { - enabled = true, + enabled = false, auto_trigger = true, keymap = { accept = '', diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 846e264a413..a65d8b465e9 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -7,4 +7,5 @@ return { require 'custom.plugins.tabs', require 'custom.plugins.copilot', require 'custom.plugins.neo-tree-config', + require 'custom.plugins.sleuth', } diff --git a/lua/custom/plugins/neo-tree-config.lua b/lua/custom/plugins/neo-tree-config.lua index 925a5a846f3..1492b22ec0c 100644 --- a/lua/custom/plugins/neo-tree-config.lua +++ b/lua/custom/plugins/neo-tree-config.lua @@ -24,7 +24,13 @@ return { end, { desc = 'Focus NeoTree' }) -- Setup neo-tree - require('neo-tree').setup {} + require('neo-tree').setup { + filesystem = { + follow_current_file = { + enabled = true, + }, + }, + } end, }, } diff --git a/lua/custom/plugins/sleuth.lua b/lua/custom/plugins/sleuth.lua new file mode 100644 index 00000000000..48bc789ade6 --- /dev/null +++ b/lua/custom/plugins/sleuth.lua @@ -0,0 +1,7 @@ +return { + { + 'tpope/vim-sleuth', + config = function() end, + opts = {}, + }, +} From 812c1e9b3cc21f4d98b8b19dcdad64b6922ae693 Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Thu, 13 Nov 2025 11:41:54 +0000 Subject: [PATCH 04/32] Update theme --- init.lua | 49 ++++++++++---------- lua/custom/plugins/init.lua | 2 + lua/custom/plugins/theme.lua | 86 ++++++++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+), 24 deletions(-) create mode 100644 lua/custom/plugins/theme.lua diff --git a/init.lua b/init.lua index 20ae6563e5a..f2cbbdc6af2 100644 --- a/init.lua +++ b/init.lua @@ -537,7 +537,7 @@ require('lazy').setup({ -- Rename the variable under your cursor. -- Most Language Servers support renaming across files, etc. - map('grn', vim.lsp.buf.rename, '[R]e[n]ame') + map('rn', vim.lsp.buf.rename, '[R]e[n]ame') -- Execute a code action, usually your cursor needs to be on top of an error -- or a suggestion from your LSP for this to activate. @@ -553,7 +553,7 @@ require('lazy').setup({ -- Jump to the definition of the word under your cursor. -- This is where a variable was first declared, or where a function is defined, etc. -- To jump back, press . - map('grd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') + map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') -- WARN: This is not Goto Definition, this is Goto Declaration. -- For example, in C this would take you to the header. @@ -722,7 +722,6 @@ require('lazy').setup({ 'dockerls', 'graphql', 'jsonls', - 'sqlls', 'yamlls', 'eslint', 'bashls', @@ -886,27 +885,29 @@ require('lazy').setup({ }, }, - { -- You can easily change to a different colorscheme. - -- Change the name of the colorscheme plugin below, and then - -- change the command in the config to whatever the name of that colorscheme is. - -- - -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`. - 'folke/tokyonight.nvim', - priority = 1000, -- Make sure to load this before all the other start plugins. - config = function() - ---@diagnostic disable-next-line: missing-fields - require('tokyonight').setup { - styles = { - comments = { italic = false }, -- Disable italics in comments - }, - } - - -- Load the colorscheme here. - -- Like many other themes, this one has different styles, and you could load - -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'tokyonight-night' - end, - }, + -- { -- You can easily change to a different colorscheme. + -- -- Change the name of the colorscheme plugin below, and then + -- -- change the command in the config to whatever the name of that colorscheme is. + -- -- + -- -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`. + -- 'folke/tokyonight.nvim', + -- priority = 1000, -- Make sure to load this before all the other start plugins. + -- config = function() + -- ---@diagnostic disable-next-line: missing-fields + -- require('tokyonight').setup { + -- styles = { + -- comments = { italic = false }, -- Disable italics in comments + -- }, + -- } + -- + -- -- Load the colorscheme here. + -- -- Like many other themes, this one has different styles, and you could load + -- -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. + -- -- vim.cmd.colorscheme 'tokyonight-night' + -- -- vim.cmd.colorscheme 'aliqyan-21/darkvoid.nvim' + -- vim.cmd.colorscheme 'nordic' + -- end, + -- }, -- Highlight todo, notes, etc in comments { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index a65d8b465e9..bf56c776e96 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -6,6 +6,8 @@ return { require 'custom.plugins.comment', require 'custom.plugins.tabs', require 'custom.plugins.copilot', + require 'custom.plugins.copilot-chat', require 'custom.plugins.neo-tree-config', require 'custom.plugins.sleuth', + require 'custom.plugins.theme', } diff --git a/lua/custom/plugins/theme.lua b/lua/custom/plugins/theme.lua new file mode 100644 index 00000000000..90d3f78de44 --- /dev/null +++ b/lua/custom/plugins/theme.lua @@ -0,0 +1,86 @@ +-- return { +-- 'AlexvZyl/nordic.nvim', +-- lazy = false, +-- priority = 1000, +-- config = function() +-- require('nordic').load() +-- vim.cmd.colorscheme 'nordic' +-- end, +-- } + +return { + 'rebelot/kanagawa.nvim', + lazy = false, + priority = 1000, + config = function() + require('kanagawa').setup { + commentStyle = { + italic = true, + }, + -- optional: your custom config here + } + vim.cmd 'colorscheme kanagawa-dragon' + end, +} + +-- return { +-- 'aliqyan-21/darkvoid.nvim', +-- priority = 1000, +-- lazy = false, +-- init = function() +-- require('darkvoid').setup { +-- glow = true, +-- transparent = true, +-- colors = { +-- fg = '#c0c0c0', +-- bg = '#1c1c1c', +-- cursor = '#fdd41b', +-- line_nr = '#404040', +-- visual = '#303030', +-- comment = '#737373', +-- string = '#66b2b2', +-- func = '#1bfd9c', +-- kw = '#fe5e58', +-- identifier = '#b1b1b1', +-- type = '#a1a1a1', +-- search_highlight = '#fdd41b', +-- operator = '#1bfd9c', +-- bracket = '#e6e6e6', +-- preprocessor = '#4b8902', +-- bool = '#d1d1d1', +-- constant = '#b2d8d8', +-- +-- -- gitsigns colors +-- added = '#baffc9', +-- changed = '#ffffba', +-- removed = '#ffb3ba', +-- +-- -- Pmenu colors +-- pmenu_bg = '#1c1c1c', +-- pmenu_sel_bg = '#1bfd9c', +-- pmenu_fg = '#c0c0c0', +-- +-- -- EndOfBuffer color +-- eob = '#3c3c3c', +-- +-- -- Telescope specific colors +-- border = '#fe5e58', +-- title = '#ffffff', +-- +-- -- bufferline specific colors +-- bufferline_selection = '#1bfd9c', +-- +-- -- LSP diagnostics colors +-- error = '#dea6a0', +-- warning = '#d6efd8', +-- hint = '#bedc74', +-- info = '#7fa1c3', +-- }, +-- } +-- -- You can configure highlights by doing something like: +-- vim.cmd.hi 'Comment gui=none' +-- vim.cmd.hi 'Normal guibg=none' +-- vim.cmd.hi 'Normal guibg=none' +-- vim.cmd.colorscheme 'darkvoid' +-- end, +-- } From 38f5f2ccaebc19d2d84dead0c154e971b39b76f3 Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Mon, 16 Feb 2026 11:39:28 +0000 Subject: [PATCH 05/32] Enable copilot by default --- lua/custom/plugins/copilot.lua | 2 +- lua/custom/plugins/theme.lua | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lua/custom/plugins/copilot.lua b/lua/custom/plugins/copilot.lua index 0e67f891e8a..203bda613d0 100644 --- a/lua/custom/plugins/copilot.lua +++ b/lua/custom/plugins/copilot.lua @@ -6,7 +6,7 @@ return { config = function() require('copilot').setup { suggestion = { - enabled = false, + enabled = true, auto_trigger = true, keymap = { accept = '', diff --git a/lua/custom/plugins/theme.lua b/lua/custom/plugins/theme.lua index 90d3f78de44..4204ff95b9a 100644 --- a/lua/custom/plugins/theme.lua +++ b/lua/custom/plugins/theme.lua @@ -20,6 +20,15 @@ return { -- optional: your custom config here } vim.cmd 'colorscheme kanagawa-dragon' + + vim.cmd [[ + hi Normal guibg=NONE ctermbg=NONE + hi NormalNC guibg=NONE ctermbg=NONE + hi SignColumn guibg=NONE ctermbg=NONE + hi VertSplit guibg=NONE ctermbg=NONE + hi StatusLine guibg=NONE ctermbg=NONE + hi LineNr guibg=NONE ctermbg=NONE + ]] end, } From 1868d1b9794d5c81aa928def9254828dd50059c9 Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Mon, 16 Feb 2026 15:09:48 +0000 Subject: [PATCH 06/32] Install avante --- lua/custom/plugins/avante.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 lua/custom/plugins/avante.lua diff --git a/lua/custom/plugins/avante.lua b/lua/custom/plugins/avante.lua new file mode 100644 index 00000000000..b4a41a4835c --- /dev/null +++ b/lua/custom/plugins/avante.lua @@ -0,0 +1,26 @@ +return { + { + 'yetone/avante.nvim', + event = 'VeryLazy', + build = function() + if vim.fn.has 'win32' ~= 0 then + return 'powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false' + else + return 'make' + end + end, + opts = { + -- Example: set your instructions file and provider here + instructions_file = '.copilot-instructions.md', + provider = 'copilot', + }, + dependencies = { + 'nvim-lua/plenary.nvim', + 'MunifTanjim/nui.nvim', + 'zbirenbaum/copilot.lua', -- Copilot provider support + 'hrsh7th/nvim-cmp', -- Completion + 'MeanderingProgrammer/render-markdown.nvim', -- Markdown rendering + 'stevearc/dressing.nvim', -- UI improvements (or use 'folke/snacks.nvim') + }, + }, +} From b35f282b377e938ed0102ad7f82dca010b09739f Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Mon, 6 Apr 2026 11:45:55 +0100 Subject: [PATCH 07/32] Update markdown config --- init.lua | 2 + lua/custom/plugins/init.lua | 1 + lua/custom/plugins/markdown-render.lua | 51 ++++++++++++++++++++++++++ lua/custom/setup.lua | 7 ++++ 4 files changed, 61 insertions(+) create mode 100644 lua/custom/plugins/markdown-render.lua create mode 100644 lua/custom/setup.lua diff --git a/init.lua b/init.lua index f2cbbdc6af2..688ef64616c 100644 --- a/init.lua +++ b/init.lua @@ -1023,5 +1023,7 @@ require('lazy').setup({ }, }) +require 'custom.setup' + -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index bf56c776e96..7e607c6fd37 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -10,4 +10,5 @@ return { require 'custom.plugins.neo-tree-config', require 'custom.plugins.sleuth', require 'custom.plugins.theme', + require 'custom.plugins.markdown-render', } diff --git a/lua/custom/plugins/markdown-render.lua b/lua/custom/plugins/markdown-render.lua new file mode 100644 index 00000000000..adffda207a1 --- /dev/null +++ b/lua/custom/plugins/markdown-render.lua @@ -0,0 +1,51 @@ +return { + { + 'MeanderingProgrammer/render-markdown.nvim', + dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-mini/mini.nvim' }, -- if you use the mini.nvim suite + -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-mini/mini.icons' }, -- if you use standalone mini plugins + -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons + ---@module 'render-markdown' + ---@type render.md.UserConfig + opts = { + file_types = { 'markdown' }, + render_modes = true, + heading = { + enabled = true, + render_modes = false, + atx = true, + setext = true, + sign = true, + icons = { '󰲡 ', '󰲣 ', '󰲥 ', '󰲧 ', '󰲩 ', '󰲫 ' }, + position = 'overlay', + signs = { '󰫎 ' }, + width = 'full', + left_margin = 0, + left_pad = 0, + right_pad = 0, + min_width = 0, + border = true, + border_virtual = true, + border_prefix = false, + above = '▄', + below = '▀', + backgrounds = { + 'RenderMarkdownH1Bg', + 'RenderMarkdownH2Bg', + 'RenderMarkdownH3Bg', + 'RenderMarkdownH4Bg', + 'RenderMarkdownH5Bg', + 'RenderMarkdownH6Bg', + }, + foregrounds = { + 'RenderMarkdownH1', + 'RenderMarkdownH2', + 'RenderMarkdownH3', + 'RenderMarkdownH4', + 'RenderMarkdownH5', + 'RenderMarkdownH6', + }, + custom = {}, + }, + }, + }, +} diff --git a/lua/custom/setup.lua b/lua/custom/setup.lua new file mode 100644 index 00000000000..8e3ba127568 --- /dev/null +++ b/lua/custom/setup.lua @@ -0,0 +1,7 @@ +vim.api.nvim_create_autocmd('FileType', { + pattern = 'markdown', + callback = function() + vim.cmd 'RenderMarkdown preview' + end, + once = true, +}) From 043b5032e2e6e93379847e49c7d9326fbe8d1871 Mon Sep 17 00:00:00 2001 From: Fraser Fewster <88655049+ffewster@users.noreply.github.com> Date: Wed, 8 Apr 2026 17:31:40 +0100 Subject: [PATCH 08/32] Update kickstart 08 08 2026 (#8) * fix: update main module reference for nvim-treesitter (#1832) configs -> config in init.lua * note: add info about why we ignore lazy-lock * update: remove client_supports_method (#1810) Neovim 0.11 is now stable * fix: as far as i can tell i updated to the right tree sitter stuff * maybe: seeing if we can get away without lazydev and just doing simpler setup * fix: remove mason-lspconfig, we do not need it anymore * fix: adjust after 'mini.nvim' transfer to 'nvim-mini' org (#1713) * fix: call setup on guess indent * fix: remove deprecated methods * feat: add Telescope binding for searching through commands (#1675) * chore: fix help tag (#1671) * chore: Add .DS_Store to .gitignore (#1637) * feat: move Telescope config to be contained by plugin (#1843) * move telescope related lsp functions inside the telscope plugin declaration block * explicitly enable telescope plugin, add some comments explainging why * update comments with suggestions from @oriori1703 Co-authored-by: Ori Perry <48057913+oriori1703@users.noreply.github.com> * fix formatting in accordance to stylua so that pipeline passes --------- Co-authored-by: Philipp Szechenyi Co-authored-by: Philipp Szechenyi <45265588+szechp@users.noreply.github.com> Co-authored-by: Ori Perry <48057913+oriori1703@users.noreply.github.com> Co-authored-by: philipp * fix: update neovim min required version * fix: simplify diagnostic config * docs: Document methods to get the latest neovim (#1626) * feat(grep-string): works with visual selection too (#1605) * fix: trimming down config and updating stylua * fix: continue cleaning up docs and config * Clarify comment in .gitignore for lazy-lock.json The current comment in .gitignore for lazy-lock.json suggests to uncomment it yourself, but you actually need to comment it instead. This change modifies the comment to clarify the recommended approach for kickstart users. * Re-add mason-lspconfig * Clean up the lua_ls config * Add type hints to plugin options where possible This could help beginners to get autocompletion, catch mistakes earlier, and allow them to skip the docs for simple configs. This is not perfect because a lot of the plugins type all of their keys as required, even though they have defaults, but this is good enough. * Fix typo * Add 'gr' group to which-keys Adds 'gr' to which-keys documentation, so users can see that LSP actions are grouped after 'gr' key binds. Co-authored-by: thiago-negri * Add installtion instructions for `tree-sitter-cli` to the README.md * Attach treesitter using language name instead of filetype * Add treesitter indentation * Don't extend lsp capabilities because blink does it internally * Update the github actions * Improve undofile comment * Format the dap keybinds * Add underline for warnings * Clarify gitsigns keymap for which-key * Remove blink from nvim-lspconfig dependencies * Fix typo in the README * Fix formating of plugins * Revise comment for lazy-lock.json in .gitignore This is a follow-up to df9436c0e57425a43b527c3ee1d63c98af3b6768 to hopefully make things even clearer. Co-authored-by: Ori Perry * Fix stylua * Refactor treesitter attach code * Auto install treesitter parsers when opening a file closes #1951 * Update the recommanded gitsigns keybinds closes #1459 * Add a comment to the line plugin about installing markdownlint --------- Co-authored-by: Advin Suryavanshi <78780005+advinsuryavanshi@users.noreply.github.com> Co-authored-by: TJ DeVries Co-authored-by: Yassine Zouggari Co-authored-by: Evgeni Chasnovski Co-authored-by: rheia475 Co-authored-by: Derrek <80121818+derrekcoleman@users.noreply.github.com> Co-authored-by: Cameron Cummings <33526620+cameroncc@users.noreply.github.com> Co-authored-by: Philipp Szechenyi Co-authored-by: Philipp Szechenyi <45265588+szechp@users.noreply.github.com> Co-authored-by: Ori Perry <48057913+oriori1703@users.noreply.github.com> Co-authored-by: philipp Co-authored-by: Mithrandir2k18 <41417290+Mithrandir2k18@users.noreply.github.com> Co-authored-by: Francesc Elies Co-authored-by: giogt Co-authored-by: Ori Perry Co-authored-by: thiago-negri Co-authored-by: Nathan Zeng Co-authored-by: Richard Macklin <1863540+rmacklin@users.noreply.github.com> --- .github/workflows/stylua.yml | 5 +- .gitignore | 7 + .stylua.toml | 1 + README.md | 98 +++++- init.lua | 470 ++++++++++++-------------- lua/custom/plugins/init.lua | 3 + lua/kickstart/health.lua | 2 +- lua/kickstart/plugins/autopairs.lua | 2 + lua/kickstart/plugins/debug.lua | 60 +--- lua/kickstart/plugins/gitsigns.lua | 100 +++--- lua/kickstart/plugins/indent_line.lua | 18 +- lua/kickstart/plugins/lint.lua | 111 +++--- lua/kickstart/plugins/neo-tree.lua | 4 + 13 files changed, 451 insertions(+), 430 deletions(-) diff --git a/.github/workflows/stylua.yml b/.github/workflows/stylua.yml index 75db6c3355b..eb60303fedd 100644 --- a/.github/workflows/stylua.yml +++ b/.github/workflows/stylua.yml @@ -9,13 +9,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v6 with: ref: ${{ github.event.pull_request.head.sha }} - name: Stylua Check - uses: JohnnyMorganz/stylua-action@v3 + uses: JohnnyMorganz/stylua-action@v4 with: token: ${{ secrets.GITHUB_TOKEN }} version: latest args: --check . - diff --git a/.gitignore b/.gitignore index 005b535b606..68486fc3d35 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,11 @@ test.sh nvim spell/ + +# In your personal fork, you likely want to comment this, since it's recommended to track +# lazy-lock.json in version control - see https://lazy.folke.io/usage/lockfile +# For the official `nvim-lua/kickstart.nvim` git repository, we leave it ignored to avoid unneeded +# merge conflicts. lazy-lock.json + +.DS_Store diff --git a/.stylua.toml b/.stylua.toml index 139e9397d90..edfa5067106 100644 --- a/.stylua.toml +++ b/.stylua.toml @@ -4,3 +4,4 @@ indent_type = "Spaces" indent_width = 2 quote_style = "AutoPreferSingle" call_parentheses = "None" +collapse_simple_statement = "Always" diff --git a/README.md b/README.md index 4113950550d..093e42a6dd9 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,14 @@ A starting point for Neovim that is: Kickstart.nvim targets *only* the latest ['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest ['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim. -If you are experiencing issues, please make sure you have the latest versions. +If you are experiencing issues, please make sure you have at least the latest +stable version. Most likely, you want to install neovim via a [package +manager](https://github.com/neovim/neovim/blob/master/INSTALL.md#install-from-package). +To check your neovim version, run `nvim --version` and make sure it is not +below the latest +['stable'](https://github.com/neovim/neovim/releases/tag/stable) version. If +your chosen install method only gives you an outdated version of neovim, find +alternative [installation methods below](#alternative-neovim-installation-methods). ### Install External Dependencies @@ -25,6 +32,7 @@ External Requirements: - Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`) - [ripgrep](https://github.com/BurntSushi/ripgrep#installation), [fd-find](https://github.com/sharkdp/fd#installation) +- [tree-sitter CLI](https://github.com/tree-sitter/tree-sitter/blob/master/crates/cli/README.md#installation) - Clipboard tool (xclip/xsel/win32yank or other depending on the platform) - A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons - if you have it set `vim.g.have_nerd_font` in `init.lua` to true @@ -154,7 +162,7 @@ examples of adding popularly requested plugins. Below you can find OS specific install instructions for Neovim and dependencies. -After installing all the dependencies continue with the [Install Kickstart](#Install-Kickstart) step. +After installing all the dependencies continue with the [Install Kickstart](#install-kickstart) step. #### Windows Installation @@ -185,7 +193,7 @@ winget install --accept-source-agreements chocolatey.chocolatey 2. install all requirements using choco, exit the previous cmd and open a new one so that choco path is set, and run in cmd as **admin**: ``` -choco install -y neovim git ripgrep wget fd unzip gzip mingw make +choco install -y neovim git ripgrep wget fd unzip gzip mingw make tree-sitter ```
WSL (Windows Subsystem for Linux) @@ -195,7 +203,7 @@ wsl --install wsl sudo add-apt-repository ppa:neovim-ppa/unstable -y sudo apt update -sudo apt install make gcc ripgrep unzip git xclip neovim +sudo apt install make gcc ripgrep fd-find tree-sitter-cli unzip git xclip neovim ```
@@ -205,14 +213,14 @@ sudo apt install make gcc ripgrep unzip git xclip neovim ``` sudo add-apt-repository ppa:neovim-ppa/unstable -y sudo apt update -sudo apt install make gcc ripgrep unzip git xclip neovim +sudo apt install make gcc ripgrep fd-find tree-sitter-cli unzip git xclip neovim ```
Debian Install Steps ``` sudo apt update -sudo apt install make gcc ripgrep unzip git xclip curl +sudo apt install make gcc ripgrep fd-find tree-sitter-cli unzip git xclip curl # Now we install nvim curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz @@ -228,14 +236,88 @@ sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/
Fedora Install Steps ``` -sudo dnf install -y gcc make git ripgrep fd-find unzip neovim +sudo dnf install -y gcc make git ripgrep fd-find tree-sitter-cli unzip neovim ```
Arch Install Steps ``` -sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim +sudo pacman -S --noconfirm --needed gcc make git ripgrep fd tree-sitter-cli unzip neovim ```
+### Alternative neovim installation methods + +For some systems it is not unexpected that the [package manager installation +method](https://github.com/neovim/neovim/blob/master/INSTALL.md#install-from-package) +recommended by neovim is significantly behind. If that is the case for you, +pick one of the following methods that are known to deliver fresh neovim versions very quickly. +They have been picked for their popularity and because they make installing and updating +neovim to the latest versions easy. You can also find more detail about the +available methods being discussed +[here](https://github.com/nvim-lua/kickstart.nvim/issues/1583). + + +
Bob + +[Bob](https://github.com/MordechaiHadad/bob) is a Neovim version manager for +all platforms. Simply install +[rustup](https://rust-lang.github.io/rustup/installation/other.html), +and run the following commands: + +```bash +rustup default stable +rustup update stable +cargo install bob-nvim +bob use stable +``` + +
+ +
Homebrew + +[Homebrew](https://brew.sh) is a package manager popular on Mac and Linux. +Simply install using [`brew install`](https://formulae.brew.sh/formula/neovim). + +
+ +
Flatpak + +Flatpak is a package manager for applications that allows developers to package their applications +just once to make it available on all Linux systems. Simply [install flatpak](https://flatpak.org/setup/) +and setup [flathub](https://flathub.org/setup) to [install neovim](https://flathub.org/apps/io.neovim.nvim). + +
+ +
asdf and mise-en-place + +[asdf](https://asdf-vm.com/) and [mise](https://mise.jdx.dev/) are tool version managers, +mostly aimed towards project-specific tool versioning. However both support managing tools +globally in the user-space as well: + +
mise + +[Install mise](https://mise.jdx.dev/getting-started.html), then run: + +```bash +mise plugins install neovim +mise use neovim@stable +``` + +
+ +
asdf + +[Install asdf](https://asdf-vm.com/guide/getting-started.html), then run: + +```bash +asdf plugin add neovim +asdf install neovim stable +asdf set neovim stable --home +asdf reshim neovim +``` + +
+ +
diff --git a/init.lua b/init.lua index 688ef64616c..228d839af8e 100644 --- a/init.lua +++ b/init.lua @@ -114,14 +114,12 @@ vim.o.showmode = false -- Schedule the setting after `UiEnter` because it can increase startup-time. -- Remove this option if you want your OS clipboard to remain independent. -- See `:help 'clipboard'` -vim.schedule(function() - vim.o.clipboard = 'unnamedplus' -end) +vim.schedule(function() vim.o.clipboard = 'unnamedplus' end) -- Enable break indent vim.o.breakindent = true --- Save undo history +-- Enable undo/redo changes even after closing and reopening a file vim.o.undofile = true -- Case-insensitive searching UNLESS \C or one or more capital letters in the search term @@ -148,7 +146,7 @@ vim.o.splitbelow = true -- Notice listchars is set using `vim.opt` instead of `vim.o`. -- It is very similar to `vim.o` but offers an interface for conveniently interacting with tables. -- See `:help lua-options` --- and `:help lua-options-guide` +-- and `:help lua-guide-options` vim.o.list = true vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' } @@ -173,7 +171,22 @@ vim.o.confirm = true -- See `:help hlsearch` vim.keymap.set('n', '', 'nohlsearch') --- Diagnostic keymaps +-- Diagnostic Config & Keymaps +-- See :help vim.diagnostic.Opts +vim.diagnostic.config { + update_in_insert = false, + severity_sort = true, + float = { border = 'rounded', source = 'if_many' }, + underline = { severity = { min = vim.diagnostic.severity.WARN } }, + + -- Can switch between these as you prefer + virtual_text = true, -- Text shows up at the end of the line + virtual_lines = false, -- Text shows up underneath the line, with virtual lines + + -- Auto open the float, so you can easily read the errors when jumping with `[d` and `]d` + jump = { float = true }, +} + vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) -- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier @@ -214,9 +227,7 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the upper win vim.api.nvim_create_autocmd('TextYankPost', { desc = 'Highlight when yanking (copying) text', group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }), - callback = function() - vim.hl.on_yank() - end, + callback = function() vim.hl.on_yank() end, }) -- [[ Install `lazy.nvim` plugin manager ]] @@ -225,9 +236,7 @@ local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim' if not (vim.uv or vim.loop).fs_stat(lazypath) then local lazyrepo = 'https://github.com/folke/lazy.nvim.git' local out = vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath } - if vim.v.shell_error ~= 0 then - error('Error cloning lazy.nvim:\n' .. out) - end + if vim.v.shell_error ~= 0 then error('Error cloning lazy.nvim:\n' .. out) end end ---@type vim.Option @@ -246,15 +255,8 @@ rtp:prepend(lazypath) -- -- NOTE: Here is where you install your plugins. require('lazy').setup({ - -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). - 'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically - - -- NOTE: Plugins can also be added by using a table, - -- with the first argument being the link and the following - -- keys can be used to configure plugin behavior/loading/etc. - -- - -- Use `opts = {}` to automatically pass options to a plugin's `setup()` function, forcing the plugin to be loaded. - -- + -- NOTE: Plugins can be added via a link or github org/name. To run setup automatically, use `opts = {}` + { 'NMAC427/guess-indent.nvim', opts = {} }, -- Alternatively, use `config = function() ... end` for full control over the configuration. -- If you prefer to call `setup` explicitly, use: @@ -273,13 +275,16 @@ require('lazy').setup({ -- See `:help gitsigns` to understand what the configuration keys do { -- Adds git related signs to the gutter, as well as utilities for managing changes 'lewis6991/gitsigns.nvim', + ---@module 'gitsigns' + ---@type Gitsigns.Config + ---@diagnostic disable-next-line: missing-fields opts = { signs = { - add = { text = '+' }, - change = { text = '~' }, - delete = { text = '_' }, - topdelete = { text = '‾' }, - changedelete = { text = '~' }, + add = { text = '+' }, ---@diagnostic disable-line: missing-fields + change = { text = '~' }, ---@diagnostic disable-line: missing-fields + delete = { text = '_' }, ---@diagnostic disable-line: missing-fields + topdelete = { text = '‾' }, ---@diagnostic disable-line: missing-fields + changedelete = { text = '~' }, ---@diagnostic disable-line: missing-fields }, }, }, @@ -300,53 +305,21 @@ require('lazy').setup({ { -- Useful plugin to show you pending keybinds. 'folke/which-key.nvim', - event = 'VimEnter', -- Sets the loading event to 'VimEnter' + event = 'VimEnter', + ---@module 'which-key' + ---@type wk.Opts + ---@diagnostic disable-next-line: missing-fields opts = { -- delay between pressing a key and opening which-key (milliseconds) - -- this setting is independent of vim.o.timeoutlen delay = 0, - icons = { - -- set icon mappings to true if you have a Nerd Font - mappings = vim.g.have_nerd_font, - -- If you are using a Nerd Font: set icons.keys to an empty table which will use the - -- default which-key.nvim defined Nerd Font icons, otherwise define a string table - keys = vim.g.have_nerd_font and {} or { - Up = ' ', - Down = ' ', - Left = ' ', - Right = ' ', - C = ' ', - M = ' ', - D = ' ', - S = ' ', - CR = ' ', - Esc = ' ', - ScrollWheelDown = ' ', - ScrollWheelUp = ' ', - NL = ' ', - BS = ' ', - Space = ' ', - Tab = ' ', - F1 = '', - F2 = '', - F3 = '', - F4 = '', - F5 = '', - F6 = '', - F7 = '', - F8 = '', - F9 = '', - F10 = '', - F11 = '', - F12 = '', - }, - }, + icons = { mappings = vim.g.have_nerd_font }, -- Document existing key chains spec = { - { 's', group = '[S]earch' }, + { 's', group = '[S]earch', mode = { 'n', 'v' } }, { 't', group = '[T]oggle' }, - { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, + { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, -- Enable gitsigns recommended keymaps first + { 'gr', group = 'LSP Actions', mode = { 'n' } }, }, }, }, @@ -360,6 +333,16 @@ require('lazy').setup({ { -- Fuzzy Finder (files, lsp, etc) 'nvim-telescope/telescope.nvim', + -- By default, Telescope is included and acts as your picker for everything. + + -- If you would like to switch to a different picker (like snacks, or fzf-lua) + -- you can disable the Telescope plugin by setting enabled to false and enable + -- your replacement picker by requiring it explicitly (e.g. 'custom.plugins.snacks') + + -- Note: If you customize your config for yourself, + -- it’s best to remove the Telescope plugin config entirely + -- instead of just disabling it here, to keep your config clean. + enabled = true, event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim', @@ -372,9 +355,7 @@ require('lazy').setup({ -- `cond` is a condition used to determine whether this plugin should be -- installed and loaded. - cond = function() - return vim.fn.executable 'make' == 1 - end, + cond = function() return vim.fn.executable 'make' == 1 end, }, { 'nvim-telescope/telescope-ui-select.nvim' }, @@ -414,9 +395,7 @@ require('lazy').setup({ -- }, -- pickers = {} extensions = { - ['ui-select'] = { - require('telescope.themes').get_dropdown(), - }, + ['ui-select'] = { require('telescope.themes').get_dropdown() }, }, } @@ -430,14 +409,49 @@ require('lazy').setup({ vim.keymap.set('n', 'sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' }) vim.keymap.set('n', 'sf', builtin.find_files, { desc = '[S]earch [F]iles' }) vim.keymap.set('n', 'ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' }) - vim.keymap.set('n', 'sw', builtin.grep_string, { desc = '[S]earch current [W]ord' }) + vim.keymap.set({ 'n', 'v' }, 'sw', builtin.grep_string, { desc = '[S]earch current [W]ord' }) vim.keymap.set('n', 'sg', builtin.live_grep, { desc = '[S]earch by [G]rep' }) vim.keymap.set('n', 'sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' }) vim.keymap.set('n', 'sr', builtin.resume, { desc = '[S]earch [R]esume' }) vim.keymap.set('n', 's.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) + vim.keymap.set('n', 'sc', builtin.commands, { desc = '[S]earch [C]ommands' }) vim.keymap.set('n', '', builtin.buffers, { desc = '[ ] Find existing buffers' }) - -- Slightly advanced example of overriding default behavior and theme + -- This runs on LSP attach per buffer (see main LSP attach function in 'neovim/nvim-lspconfig' config for more info, + -- it is better explained there). This allows easily switching between pickers if you prefer using something else! + vim.api.nvim_create_autocmd('LspAttach', { + group = vim.api.nvim_create_augroup('telescope-lsp-attach', { clear = true }), + callback = function(event) + local buf = event.buf + + -- Find references for the word under your cursor. + vim.keymap.set('n', 'grr', builtin.lsp_references, { buffer = buf, desc = '[G]oto [R]eferences' }) + + -- Jump to the implementation of the word under your cursor. + -- Useful when your language has ways of declaring types without an actual implementation. + vim.keymap.set('n', 'gri', builtin.lsp_implementations, { buffer = buf, desc = '[G]oto [I]mplementation' }) + + -- Jump to the definition of the word under your cursor. + -- This is where a variable was first declared, or where a function is defined, etc. + -- To jump back, press . + vim.keymap.set('n', 'grd', builtin.lsp_definitions, { buffer = buf, desc = '[G]oto [D]efinition' }) + + -- Fuzzy find all the symbols in your current document. + -- Symbols are things like variables, functions, types, etc. + vim.keymap.set('n', 'gO', builtin.lsp_document_symbols, { buffer = buf, desc = 'Open Document Symbols' }) + + -- Fuzzy find all the symbols in your current workspace. + -- Similar to document symbols, except searches over your entire project. + vim.keymap.set('n', 'gW', builtin.lsp_dynamic_workspace_symbols, { buffer = buf, desc = 'Open Workspace Symbols' }) + + -- Jump to the type of the word under your cursor. + -- Useful when you're not sure what type a variable is and you want to see + -- the definition of its *type*, not where it was *defined*. + vim.keymap.set('n', 'grt', builtin.lsp_type_definitions, { buffer = buf, desc = '[G]oto [T]ype Definition' }) + end, + }) + + -- Override default behavior and theme when searching vim.keymap.set('n', '/', function() -- You can pass additional configuration to Telescope to change the theme, layout, etc. builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown { @@ -448,33 +462,24 @@ require('lazy').setup({ -- It's also possible to pass additional configuration options. -- See `:help telescope.builtin.live_grep()` for information about particular keys - vim.keymap.set('n', 's/', function() - builtin.live_grep { - grep_open_files = true, - prompt_title = 'Live Grep in Open Files', - } - end, { desc = '[S]earch [/] in Open Files' }) + vim.keymap.set( + 'n', + 's/', + function() + builtin.live_grep { + grep_open_files = true, + prompt_title = 'Live Grep in Open Files', + } + end, + { desc = '[S]earch [/] in Open Files' } + ) -- Shortcut for searching your Neovim configuration files - vim.keymap.set('n', 'sn', function() - builtin.find_files { cwd = vim.fn.stdpath 'config' } - end, { desc = '[S]earch [N]eovim files' }) + vim.keymap.set('n', 'sn', function() builtin.find_files { cwd = vim.fn.stdpath 'config' } end, { desc = '[S]earch [N]eovim files' }) end, }, -- LSP Plugins - { - -- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins - -- used for completion, annotations and signatures of Neovim apis - 'folke/lazydev.nvim', - ft = 'lua', - opts = { - library = { - -- Load luvit types when the `vim.uv` word is found - { path = '${3rd}/luv/library', words = { 'vim%.uv' } }, - }, - }, - }, { -- Main LSP Configuration 'neovim/nvim-lspconfig', @@ -482,15 +487,19 @@ require('lazy').setup({ -- Automatically install LSPs and related tools to stdpath for Neovim -- Mason must be loaded before its dependents so we need to set it up here. -- NOTE: `opts = {}` is the same as calling `require('mason').setup({})` - { 'mason-org/mason.nvim', opts = {} }, + { + 'mason-org/mason.nvim', + ---@module 'mason.settings' + ---@type MasonSettings + ---@diagnostic disable-next-line: missing-fields + opts = {}, + }, + -- Maps LSP server names between nvim-lspconfig and Mason package names. 'mason-org/mason-lspconfig.nvim', 'WhoIsSethDaniel/mason-tool-installer.nvim', -- Useful status updates for LSP. { 'j-hui/fidget.nvim', opts = {} }, - - -- Allows extra capabilities provided by blink.cmp - 'saghen/blink.cmp', }, config = function() -- Brief aside: **What is LSP?** @@ -543,55 +552,17 @@ require('lazy').setup({ -- or a suggestion from your LSP for this to activate. map('gra', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' }) - -- Find references for the word under your cursor. - map('grr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences') - - -- Jump to the implementation of the word under your cursor. - -- Useful when your language has ways of declaring types without an actual implementation. - map('gri', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation') - - -- Jump to the definition of the word under your cursor. - -- This is where a variable was first declared, or where a function is defined, etc. - -- To jump back, press . - map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') - -- WARN: This is not Goto Definition, this is Goto Declaration. -- For example, in C this would take you to the header. map('grD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') - -- Fuzzy find all the symbols in your current document. - -- Symbols are things like variables, functions, types, etc. - map('gO', require('telescope.builtin').lsp_document_symbols, 'Open Document Symbols') - - -- Fuzzy find all the symbols in your current workspace. - -- Similar to document symbols, except searches over your entire project. - map('gW', require('telescope.builtin').lsp_dynamic_workspace_symbols, 'Open Workspace Symbols') - - -- Jump to the type of the word under your cursor. - -- Useful when you're not sure what type a variable is and you want to see - -- the definition of its *type*, not where it was *defined*. - map('grt', require('telescope.builtin').lsp_type_definitions, '[G]oto [T]ype Definition') - - -- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10) - ---@param client vim.lsp.Client - ---@param method vim.lsp.protocol.Method - ---@param bufnr? integer some lsp support methods only in specific files - ---@return boolean - local function client_supports_method(client, method, bufnr) - if vim.fn.has 'nvim-0.11' == 1 then - return client:supports_method(method, bufnr) - else - return client.supports_method(method, { bufnr = bufnr }) - end - end - -- The following two autocommands are used to highlight references of the -- word under your cursor when your cursor rests there for a little while. -- See `:help CursorHold` for information about when this is executed -- -- When you move your cursor, the highlights will be cleared (the second autocommand). local client = vim.lsp.get_client_by_id(event.data.client_id) - if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_documentHighlight, event.buf) then + if client and client:supports_method('textDocument/documentHighlight', event.buf) then local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false }) vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { buffer = event.buf, @@ -618,84 +589,56 @@ require('lazy').setup({ -- code, if the language server you are using supports them -- -- This may be unwanted, since they displace some of your code - if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_inlayHint, event.buf) then - map('th', function() - vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf }) - end, '[T]oggle Inlay [H]ints') + if client and client:supports_method('textDocument/inlayHint', event.buf) then + map('th', function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf }) end, '[T]oggle Inlay [H]ints') end end, }) - -- Diagnostic Config - -- See :help vim.diagnostic.Opts - vim.diagnostic.config { - severity_sort = true, - float = { border = 'rounded', source = 'if_many' }, - underline = { severity = vim.diagnostic.severity.ERROR }, - signs = vim.g.have_nerd_font and { - text = { - [vim.diagnostic.severity.ERROR] = '󰅚 ', - [vim.diagnostic.severity.WARN] = '󰀪 ', - [vim.diagnostic.severity.INFO] = '󰋽 ', - [vim.diagnostic.severity.HINT] = '󰌶 ', - }, - } or {}, - virtual_text = { - source = 'if_many', - spacing = 2, - format = function(diagnostic) - local diagnostic_message = { - [vim.diagnostic.severity.ERROR] = diagnostic.message, - [vim.diagnostic.severity.WARN] = diagnostic.message, - [vim.diagnostic.severity.INFO] = diagnostic.message, - [vim.diagnostic.severity.HINT] = diagnostic.message, - } - return diagnostic_message[diagnostic.severity] - end, - }, - } - - -- LSP servers and clients are able to communicate to each other what features they support. - -- By default, Neovim doesn't support everything that is in the LSP specification. - -- When you add blink.cmp, luasnip, etc. Neovim now has *more* capabilities. - -- So, we create new capabilities with blink.cmp, and then broadcast that to the servers. - local capabilities = require('blink.cmp').get_lsp_capabilities() - -- Enable the following language servers -- Feel free to add/remove any LSPs that you want here. They will automatically be installed. - -- - -- Add any additional override configuration in the following tables. Available keys are: - -- - cmd (table): Override the default command used to start the server - -- - filetypes (table): Override the default list of associated filetypes for the server - -- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features. - -- - settings (table): Override the default settings passed when initializing the server. - -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ + -- See `:help lsp-config` for information about keys and how to configure + ---@type table local servers = { -- clangd = {}, -- gopls = {}, -- pyright = {}, -- rust_analyzer = {}, - -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- -- Some languages (like typescript) have entire language plugins that can be useful: -- https://github.com/pmizio/typescript-tools.nvim -- -- But for many setups, the LSP (`ts_ls`) will work just fine -- ts_ls = {}, - -- + stylua = {}, -- Used to format Lua code + + -- Special Lua Config, as recommended by neovim help docs lua_ls = { - -- cmd = { ... }, - -- filetypes = { ... }, - -- capabilities = {}, - settings = { - Lua = { - completion = { - callSnippet = 'Replace', + on_init = function(client) + if client.workspace_folders then + local path = client.workspace_folders[1].name + if path ~= vim.fn.stdpath 'config' and (vim.uv.fs_stat(path .. '/.luarc.json') or vim.uv.fs_stat(path .. '/.luarc.jsonc')) then return end + end + + client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, { + runtime = { + version = 'LuaJIT', + path = { 'lua/?.lua', 'lua/?/init.lua' }, }, - -- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings - -- diagnostics = { disable = { 'missing-fields' } }, - }, + workspace = { + checkThirdParty = false, + -- NOTE: this is a lot slower and will cause issues when working on your own configuration. + -- See https://github.com/neovim/nvim-lspconfig/issues/3189 + library = vim.tbl_extend('force', vim.api.nvim_get_runtime_file('', true), { + '${3rd}/luv/library', + '${3rd}/busted/library', + }), + }, + }) + end, + settings = { + Lua = {}, }, }, } @@ -707,12 +650,6 @@ require('lazy').setup({ -- :Mason -- -- You can press `g?` for help in this menu. - -- - -- `mason` had to be setup earlier: to configure its options see the - -- `dependencies` table for `nvim-lspconfig` above. - -- - -- You can add other tools here that you want Mason to install - -- for you, so that they are available from within Neovim. local ensure_installed = vim.tbl_keys(servers or {}) vim.list_extend(ensure_installed, { 'stylua', -- Used to format Lua code @@ -726,22 +663,13 @@ require('lazy').setup({ 'eslint', 'bashls', }) + require('mason-tool-installer').setup { ensure_installed = ensure_installed } - require('mason-lspconfig').setup { - ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer) - automatic_installation = false, - handlers = { - function(server_name) - local server = servers[server_name] or {} - -- This handles overriding only values explicitly passed - -- by the server configuration above. Useful when disabling - -- certain features of an LSP (for example, turning off formatting for ts_ls) - server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {}) - require('lspconfig')[server_name].setup(server) - end, - }, - } + for name, server in pairs(servers) do + vim.lsp.config(name, server) + vim.lsp.enable(name) + end end, }, @@ -752,13 +680,13 @@ require('lazy').setup({ keys = { { 'f', - function() - require('conform').format { async = true, lsp_format = 'fallback' } - end, + function() require('conform').format { async = true, lsp_format = 'fallback' } end, mode = '', desc = '[F]ormat buffer', }, }, + ---@module 'conform' + ---@type conform.setupOpts opts = { notify_on_error = false, format_on_save = function(bufnr) @@ -799,9 +727,7 @@ require('lazy').setup({ -- Build Step is needed for regex support in snippets. -- This step is not supported in many windows environments. -- Remove the below condition to re-enable on windows. - if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then - return - end + if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then return end return 'make install_jsregexp' end)(), dependencies = { @@ -817,10 +743,9 @@ require('lazy').setup({ }, opts = {}, }, - 'folke/lazydev.nvim', }, - --- @module 'blink.cmp' - --- @type blink.cmp.Config + ---@module 'blink.cmp' + ---@type blink.cmp.Config opts = { keymap = { -- 'default' (recommended) for mappings similar to built-in completions @@ -863,10 +788,7 @@ require('lazy').setup({ }, sources = { - default = { 'lsp', 'path', 'snippets', 'lazydev' }, - providers = { - lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 }, - }, + default = { 'lsp', 'path', 'snippets' }, }, snippets = { preset = 'luasnip' }, @@ -910,10 +832,18 @@ require('lazy').setup({ -- }, -- Highlight todo, notes, etc in comments - { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, + { + 'folke/todo-comments.nvim', + event = 'VimEnter', + dependencies = { 'nvim-lua/plenary.nvim' }, + ---@module 'todo-comments' + ---@type TodoOptions + ---@diagnostic disable-next-line: missing-fields + opts = { signs = false }, + }, { -- Collection of various small independent plugins/modules - 'echasnovski/mini.nvim', + 'nvim-mini/mini.nvim', config = function() -- Better Around/Inside textobjects -- @@ -941,38 +871,64 @@ require('lazy').setup({ -- default behavior. For example, here we set the section for -- cursor location to LINE:COLUMN ---@diagnostic disable-next-line: duplicate-set-field - statusline.section_location = function() - return '%2l:%-2v' - end + statusline.section_location = function() return '%2l:%-2v' end -- ... and there is more! - -- Check out: https://github.com/echasnovski/mini.nvim + -- Check out: https://github.com/nvim-mini/mini.nvim end, }, + { -- Highlight, edit, and navigate code 'nvim-treesitter/nvim-treesitter', + lazy = false, build = ':TSUpdate', - main = 'nvim-treesitter.configs', -- Sets main module to use for opts - -- [[ Configure Treesitter ]] See `:help nvim-treesitter` - opts = { - ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, - -- Autoinstall languages that are not installed - auto_install = true, - highlight = { - enable = true, - -- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules. - -- If you are experiencing weird indenting issues, add the language to - -- the list of additional_vim_regex_highlighting and disabled languages for indent. - additional_vim_regex_highlighting = { 'ruby' }, - }, - indent = { enable = true, disable = { 'ruby' } }, - }, - -- There are additional nvim-treesitter modules that you can use to interact - -- with nvim-treesitter. You should go explore a few and see what interests you: - -- - -- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod` - -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context - -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects + branch = 'main', + -- [[ Configure Treesitter ]] See `:help nvim-treesitter-intro` + config = function() + -- ensure basic parser are installed + local parsers = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' } + require('nvim-treesitter').install(parsers) + + ---@param buf integer + ---@param language string + local function treesitter_try_attach(buf, language) + -- check if parser exists and load it + if not vim.treesitter.language.add(language) then return end + -- enables syntax highlighting and other treesitter features + vim.treesitter.start(buf, language) + + -- enables treesitter based folds + -- for more info on folds see `:help folds` + -- vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()' + -- vim.wo.foldmethod = 'expr' + + -- enables treesitter based indentation + vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" + end + + local available_parsers = require('nvim-treesitter').get_available() + vim.api.nvim_create_autocmd('FileType', { + callback = function(args) + local buf, filetype = args.buf, args.match + + local language = vim.treesitter.language.get_lang(filetype) + if not language then return end + + local installed_parsers = require('nvim-treesitter').get_installed 'parsers' + + if vim.tbl_contains(installed_parsers, language) then + -- enable the parser if it is installed + treesitter_try_attach(buf, language) + elseif vim.tbl_contains(available_parsers, language) then + -- if a parser is available in `nvim-treesitter` auto install it, and enable it after the installation is done + require('nvim-treesitter').install(language):await(function() treesitter_try_attach(buf, language) end) + else + -- try to enable treesitter features in case the parser exists but is not available from `nvim-treesitter` + treesitter_try_attach(buf, language) + end + end, + }) + end, }, -- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the @@ -1001,7 +957,7 @@ require('lazy').setup({ -- Or use telescope! -- In normal mode type `sh` then write `lazy.nvim-plugin` -- you can continue same window with `sr` which resumes last telescope search -}, { +}, { ---@diagnostic disable-line: missing-fields ui = { -- If you are using a Nerd Font: set icons to an empty table which will use the -- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 7e607c6fd37..40d091d4390 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,6 +2,9 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information + +---@module 'lazy' +---@type LazySpec return { require 'custom.plugins.comment', require 'custom.plugins.tabs', diff --git a/lua/kickstart/health.lua b/lua/kickstart/health.lua index b59d08649af..ca684516003 100644 --- a/lua/kickstart/health.lua +++ b/lua/kickstart/health.lua @@ -12,7 +12,7 @@ local check_version = function() return end - if vim.version.ge(vim.version(), '0.10-dev') then + if vim.version.ge(vim.version(), '0.11') then vim.health.ok(string.format("Neovim version is: '%s'", verstr)) else vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr)) diff --git a/lua/kickstart/plugins/autopairs.lua b/lua/kickstart/plugins/autopairs.lua index 386d392e7ad..351dad86cd5 100644 --- a/lua/kickstart/plugins/autopairs.lua +++ b/lua/kickstart/plugins/autopairs.lua @@ -1,6 +1,8 @@ -- autopairs -- https://github.com/windwp/nvim-autopairs +---@module 'lazy' +---@type LazySpec return { 'windwp/nvim-autopairs', event = 'InsertEnter', diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua index 8e332bf2ff9..7e58905e830 100644 --- a/lua/kickstart/plugins/debug.lua +++ b/lua/kickstart/plugins/debug.lua @@ -6,6 +6,8 @@ -- be extended to other languages as well. That's why it's called -- kickstart.nvim and not kitchen-sink.nvim ;) +---@module 'lazy' +---@type LazySpec return { -- NOTE: Yes, you can install new plugins here! 'mfussenegger/nvim-dap', @@ -26,56 +28,14 @@ return { }, keys = { -- Basic debugging keymaps, feel free to change to your liking! - { - '', - function() - require('dap').continue() - end, - desc = 'Debug: Start/Continue', - }, - { - '', - function() - require('dap').step_into() - end, - desc = 'Debug: Step Into', - }, - { - '', - function() - require('dap').step_over() - end, - desc = 'Debug: Step Over', - }, - { - '', - function() - require('dap').step_out() - end, - desc = 'Debug: Step Out', - }, - { - 'b', - function() - require('dap').toggle_breakpoint() - end, - desc = 'Debug: Toggle Breakpoint', - }, - { - 'B', - function() - require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') - end, - desc = 'Debug: Set Breakpoint', - }, + { '', function() require('dap').continue() end, desc = 'Debug: Start/Continue' }, + { '', function() require('dap').step_into() end, desc = 'Debug: Step Into' }, + { '', function() require('dap').step_over() end, desc = 'Debug: Step Over' }, + { '', function() require('dap').step_out() end, desc = 'Debug: Step Out' }, + { 'b', function() require('dap').toggle_breakpoint() end, desc = 'Debug: Toggle Breakpoint' }, + { 'B', function() require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') end, desc = 'Debug: Set Breakpoint' }, -- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception. - { - '', - function() - require('dapui').toggle() - end, - desc = 'Debug: See last session result.', - }, + { '', function() require('dapui').toggle() end, desc = 'Debug: See last session result.' }, }, config = function() local dap = require 'dap' @@ -100,11 +60,13 @@ return { -- Dap UI setup -- For more information, see |:help nvim-dap-ui| + ---@diagnostic disable-next-line: missing-fields dapui.setup { -- Set icons to characters that are more likely to work in every terminal. -- Feel free to remove or use ones that you like more! :) -- Don't feel like these are good choices. icons = { expanded = '▾', collapsed = '▸', current_frame = '*' }, + ---@diagnostic disable-next-line: missing-fields controls = { icons = { pause = '⏸', diff --git a/lua/kickstart/plugins/gitsigns.lua b/lua/kickstart/plugins/gitsigns.lua index cbbd22d24fc..1d8c50c37db 100644 --- a/lua/kickstart/plugins/gitsigns.lua +++ b/lua/kickstart/plugins/gitsigns.lua @@ -2,60 +2,62 @@ -- NOTE: gitsigns is already included in init.lua but contains only the base -- config. This will add also the recommended keymaps. +---@module 'lazy' +---@type LazySpec return { - { - 'lewis6991/gitsigns.nvim', - opts = { - on_attach = function(bufnr) - local gitsigns = require 'gitsigns' + 'lewis6991/gitsigns.nvim', + ---@module 'gitsigns' + ---@type Gitsigns.Config + ---@diagnostic disable-next-line: missing-fields + opts = { + on_attach = function(bufnr) + local gitsigns = require 'gitsigns' - local function map(mode, l, r, opts) - opts = opts or {} - opts.buffer = bufnr - vim.keymap.set(mode, l, r, opts) + local function map(mode, l, r, opts) + opts = opts or {} + opts.buffer = bufnr + vim.keymap.set(mode, l, r, opts) + end + + -- Navigation + map('n', ']c', function() + if vim.wo.diff then + vim.cmd.normal { ']c', bang = true } + else + gitsigns.nav_hunk 'next' end + end, { desc = 'Jump to next git [c]hange' }) - -- Navigation - map('n', ']c', function() - if vim.wo.diff then - vim.cmd.normal { ']c', bang = true } - else - gitsigns.nav_hunk 'next' - end - end, { desc = 'Jump to next git [c]hange' }) + map('n', '[c', function() + if vim.wo.diff then + vim.cmd.normal { '[c', bang = true } + else + gitsigns.nav_hunk 'prev' + end + end, { desc = 'Jump to previous git [c]hange' }) - map('n', '[c', function() - if vim.wo.diff then - vim.cmd.normal { '[c', bang = true } - else - gitsigns.nav_hunk 'prev' - end - end, { desc = 'Jump to previous git [c]hange' }) + -- Actions + -- visual mode + map('v', 'hs', function() gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } end, { desc = 'git [s]tage hunk' }) + map('v', 'hr', function() gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } end, { desc = 'git [r]eset hunk' }) + -- normal mode + map('n', 'hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' }) + map('n', 'hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' }) + map('n', 'hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' }) + map('n', 'hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' }) + map('n', 'hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' }) + map('n', 'hi', gitsigns.preview_hunk_inline, { desc = 'git preview hunk [i]nline' }) + map('n', 'hb', function() gitsigns.blame_line { full = true } end, { desc = 'git [b]lame line' }) + map('n', 'hd', gitsigns.diffthis, { desc = 'git [d]iff against index' }) + map('n', 'hD', function() gitsigns.diffthis '@' end, { desc = 'git [D]iff against last commit' }) + map('n', 'hQ', function() gitsigns.setqflist 'all' end) + map('n', 'hq', gitsigns.setqflist) + -- Toggles + map('n', 'tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' }) + map('n', 'tw', gitsigns.toggle_word_diff) - -- Actions - -- visual mode - map('v', 'hs', function() - gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } - end, { desc = 'git [s]tage hunk' }) - map('v', 'hr', function() - gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } - end, { desc = 'git [r]eset hunk' }) - -- normal mode - map('n', 'hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' }) - map('n', 'hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' }) - map('n', 'hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' }) - map('n', 'hu', gitsigns.stage_hunk, { desc = 'git [u]ndo stage hunk' }) - map('n', 'hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' }) - map('n', 'hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' }) - map('n', 'hb', gitsigns.blame_line, { desc = 'git [b]lame line' }) - map('n', 'hd', gitsigns.diffthis, { desc = 'git [d]iff against index' }) - map('n', 'hD', function() - gitsigns.diffthis '@' - end, { desc = 'git [D]iff against last commit' }) - -- Toggles - map('n', 'tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' }) - map('n', 'tD', gitsigns.preview_hunk_inline, { desc = '[T]oggle git show [D]eleted' }) - end, - }, + -- Text object + map({ 'o', 'x' }, 'ih', gitsigns.select_hunk) + end, }, } diff --git a/lua/kickstart/plugins/indent_line.lua b/lua/kickstart/plugins/indent_line.lua index ed7f269399f..946ac7932ab 100644 --- a/lua/kickstart/plugins/indent_line.lua +++ b/lua/kickstart/plugins/indent_line.lua @@ -1,9 +1,13 @@ +-- Add indentation guides even on blank lines + +---@module 'lazy' +---@type LazySpec return { - { -- Add indentation guides even on blank lines - 'lukas-reineke/indent-blankline.nvim', - -- Enable `lukas-reineke/indent-blankline.nvim` - -- See `:help ibl` - main = 'ibl', - opts = {}, - }, + 'lukas-reineke/indent-blankline.nvim', + -- Enable `lukas-reineke/indent-blankline.nvim` + -- See `:help ibl` + main = 'ibl', + ---@module 'ibl' + ---@type ibl.config + opts = {}, } diff --git a/lua/kickstart/plugins/lint.lua b/lua/kickstart/plugins/lint.lua index dec42f097c6..556f3178811 100644 --- a/lua/kickstart/plugins/lint.lua +++ b/lua/kickstart/plugins/lint.lua @@ -1,60 +1,59 @@ -return { +-- Linting - { -- Linting - 'mfussenegger/nvim-lint', - event = { 'BufReadPre', 'BufNewFile' }, - config = function() - local lint = require 'lint' - lint.linters_by_ft = { - markdown = { 'markdownlint' }, - } +---@module 'lazy' +---@type LazySpec +return { + 'mfussenegger/nvim-lint', + event = { 'BufReadPre', 'BufNewFile' }, + config = function() + local lint = require 'lint' + lint.linters_by_ft = { + markdown = { 'markdownlint' }, -- Make sure to install `markdownlint` via mason / npm + } - -- To allow other plugins to add linters to require('lint').linters_by_ft, - -- instead set linters_by_ft like this: - -- lint.linters_by_ft = lint.linters_by_ft or {} - -- lint.linters_by_ft['markdown'] = { 'markdownlint' } - -- - -- However, note that this will enable a set of default linters, - -- which will cause errors unless these tools are available: - -- { - -- clojure = { "clj-kondo" }, - -- dockerfile = { "hadolint" }, - -- inko = { "inko" }, - -- janet = { "janet" }, - -- json = { "jsonlint" }, - -- markdown = { "vale" }, - -- rst = { "vale" }, - -- ruby = { "ruby" }, - -- terraform = { "tflint" }, - -- text = { "vale" } - -- } - -- - -- You can disable the default linters by setting their filetypes to nil: - -- lint.linters_by_ft['clojure'] = nil - -- lint.linters_by_ft['dockerfile'] = nil - -- lint.linters_by_ft['inko'] = nil - -- lint.linters_by_ft['janet'] = nil - -- lint.linters_by_ft['json'] = nil - -- lint.linters_by_ft['markdown'] = nil - -- lint.linters_by_ft['rst'] = nil - -- lint.linters_by_ft['ruby'] = nil - -- lint.linters_by_ft['terraform'] = nil - -- lint.linters_by_ft['text'] = nil + -- To allow other plugins to add linters to require('lint').linters_by_ft, + -- instead set linters_by_ft like this: + -- lint.linters_by_ft = lint.linters_by_ft or {} + -- lint.linters_by_ft['markdown'] = { 'markdownlint' } + -- + -- However, note that this will enable a set of default linters, + -- which will cause errors unless these tools are available: + -- { + -- clojure = { "clj-kondo" }, + -- dockerfile = { "hadolint" }, + -- inko = { "inko" }, + -- janet = { "janet" }, + -- json = { "jsonlint" }, + -- markdown = { "vale" }, + -- rst = { "vale" }, + -- ruby = { "ruby" }, + -- terraform = { "tflint" }, + -- text = { "vale" } + -- } + -- + -- You can disable the default linters by setting their filetypes to nil: + -- lint.linters_by_ft['clojure'] = nil + -- lint.linters_by_ft['dockerfile'] = nil + -- lint.linters_by_ft['inko'] = nil + -- lint.linters_by_ft['janet'] = nil + -- lint.linters_by_ft['json'] = nil + -- lint.linters_by_ft['markdown'] = nil + -- lint.linters_by_ft['rst'] = nil + -- lint.linters_by_ft['ruby'] = nil + -- lint.linters_by_ft['terraform'] = nil + -- lint.linters_by_ft['text'] = nil - -- Create autocommand which carries out the actual linting - -- on the specified events. - local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true }) - vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, { - group = lint_augroup, - callback = function() - -- Only run the linter in buffers that you can modify in order to - -- avoid superfluous noise, notably within the handy LSP pop-ups that - -- describe the hovered symbol using Markdown. - if vim.bo.modifiable then - lint.try_lint() - end - end, - }) - end, - }, + -- Create autocommand which carries out the actual linting + -- on the specified events. + local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true }) + vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, { + group = lint_augroup, + callback = function() + -- Only run the linter in buffers that you can modify in order to + -- avoid superfluous noise, notably within the handy LSP pop-ups that + -- describe the hovered symbol using Markdown. + if vim.bo.modifiable then lint.try_lint() end + end, + }) + end, } diff --git a/lua/kickstart/plugins/neo-tree.lua b/lua/kickstart/plugins/neo-tree.lua index c7067891df0..af8d4495650 100644 --- a/lua/kickstart/plugins/neo-tree.lua +++ b/lua/kickstart/plugins/neo-tree.lua @@ -1,6 +1,8 @@ -- Neo-tree is a Neovim plugin to browse the file system -- https://github.com/nvim-neo-tree/neo-tree.nvim +---@module 'lazy' +---@type LazySpec return { 'nvim-neo-tree/neo-tree.nvim', version = '*', @@ -13,6 +15,8 @@ return { keys = { { '\\', ':Neotree reveal', desc = 'NeoTree reveal', silent = true }, }, + ---@module 'neo-tree' + ---@type neotree.Config opts = { filesystem = { window = { From bd755b8d062dfda3b8ddca265ba464fcdebeba40 Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Wed, 8 Apr 2026 18:12:24 +0100 Subject: [PATCH 09/32] Add stability fixes --- init.lua | 7 ++++--- lua/custom/setup.lua | 10 +++------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/init.lua b/init.lua index 228d839af8e..2f1a569b73b 100644 --- a/init.lua +++ b/init.lua @@ -543,8 +543,7 @@ require('lazy').setup({ mode = mode or 'n' vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc }) end - - -- Rename the variable under your cursor. + map('K', vim.lsp.buf.hover, 'Hover Documentation') -- Most Language Servers support renaming across files, etc. map('rn', vim.lsp.buf.rename, '[R]e[n]ame') @@ -668,8 +667,10 @@ require('lazy').setup({ for name, server in pairs(servers) do vim.lsp.config(name, server) - vim.lsp.enable(name) end + + -- Enable all servers (both those with custom config and those with defaults) + vim.lsp.enable(ensure_installed) end, }, diff --git a/lua/custom/setup.lua b/lua/custom/setup.lua index 8e3ba127568..59349ac4eaf 100644 --- a/lua/custom/setup.lua +++ b/lua/custom/setup.lua @@ -1,7 +1,3 @@ -vim.api.nvim_create_autocmd('FileType', { - pattern = 'markdown', - callback = function() - vim.cmd 'RenderMarkdown preview' - end, - once = true, -}) +if vim.fn.executable 'tree-sitter' == 0 then + vim.schedule(function() vim.notify('tree-sitter-cli not found! Run: npm install -g tree-sitter-cli', vim.log.levels.WARN) end) +end From c9f38ea33e534d171a12131642db0fcbf4ebd76b Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Wed, 8 Apr 2026 18:21:38 +0100 Subject: [PATCH 10/32] Add snacks --- lua/custom/plugins/snacks.lua | 85 +++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 lua/custom/plugins/snacks.lua diff --git a/lua/custom/plugins/snacks.lua b/lua/custom/plugins/snacks.lua new file mode 100644 index 00000000000..0c9152c2c16 --- /dev/null +++ b/lua/custom/plugins/snacks.lua @@ -0,0 +1,85 @@ +---@class snacks.dashboard.Config +---@field enabled? boolean +---@field sections snacks.dashboard.Section +---@field formats table +local dashboard_config = { + enabled = true, + preset = {}, + sections = { + { section = 'header' }, + { + pane = 1, + section = 'terminal', + cmd = 'command -v fortune >/dev/null && command -v cowsay >/dev/null && fortune | cowsay || echo Moo', + height = 10, + padding = 1, + }, + { section = 'keys', gap = 1, padding = 1 }, + { + pane = 2, + icon = ' ', + desc = 'Browse Repo', + padding = 1, + key = 'b', + action = function() Snacks.gitbrowse() end, + }, + function() + local in_git = Snacks.git.get_root() ~= nil + local has_remote = in_git and vim.fn.system 'git remote' ~= '' + local cmds = { + { + icon = ' ', + title = 'Open PRs', + cmd = 'gh pr list -L 3', + key = 'P', + action = function() vim.fn.jobstart('gh pr list --web', { detach = true }) end, + height = 7, + enabled = has_remote, + }, + { + icon = ' ', + title = 'Git Status', + cmd = 'git --no-pager diff --stat -B -M -C || echo "Nothing to report"', + height = 10, + enabled = in_git, + }, + } + return vim.tbl_map( + function(cmd) + return vim.tbl_extend('force', { + pane = 2, + section = 'terminal', + padding = 1, + ttl = 5 * 60, + indent = 3, + }, cmd) + end, + cmds + ) + end, + { section = 'startup' }, + }, +} + +return { + { + 'folke/snacks.nvim', + priority = 1000, + lazy = false, + ---@type snacks.Config + opts = { + bigfile = { enabled = true }, + dashboard = dashboard_config, + explorer = { enabled = true }, + indent = { enabled = true }, + input = { enabled = true }, + picker = { enabled = true }, + notifier = { enabled = true }, + quickfile = { enabled = true }, + scope = { enabled = true }, + scroll = { enabled = true }, + statuscolumn = { enabled = true }, + words = { enabled = true }, + }, + }, +} From 3892cc858e13e0b64acb85cef97d2891c364be52 Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Tue, 14 Apr 2026 13:50:27 +0100 Subject: [PATCH 11/32] Update default model usage for chat --- lua/custom/plugins/copilot-chat.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/custom/plugins/copilot-chat.lua b/lua/custom/plugins/copilot-chat.lua index 1fc3dad331e..113fdc9f0ac 100644 --- a/lua/custom/plugins/copilot-chat.lua +++ b/lua/custom/plugins/copilot-chat.lua @@ -13,6 +13,7 @@ return { end, opts = { -- See Configuration section for options + model = 'claude-sonnet-4.6', }, }, } From b15f43866b71fd050d60ce7dfa5012f9a987090d Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Thu, 23 Apr 2026 12:21:11 +0100 Subject: [PATCH 12/32] Update goto --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 2f1a569b73b..03cd5f0e72d 100644 --- a/init.lua +++ b/init.lua @@ -434,7 +434,7 @@ require('lazy').setup({ -- Jump to the definition of the word under your cursor. -- This is where a variable was first declared, or where a function is defined, etc. -- To jump back, press . - vim.keymap.set('n', 'grd', builtin.lsp_definitions, { buffer = buf, desc = '[G]oto [D]efinition' }) + vim.keymap.set('n', 'gd', builtin.lsp_definitions, { buffer = buf, desc = '[G]oto [D]efinition' }) -- Fuzzy find all the symbols in your current document. -- Symbols are things like variables, functions, types, etc. From cf45a5c63713bcf65c28d173ca73bd4fbc425e93 Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Thu, 23 Apr 2026 13:18:24 +0100 Subject: [PATCH 13/32] Add claude code --- init.lua | 68 +++++++-------------- lua/custom/plugins/avante.lua | 26 -------- lua/custom/plugins/claude.lua | 38 ++++++++++++ lua/custom/plugins/init.lua | 2 + lua/custom/plugins/snacks.lua | 112 +++++++++++++++------------------- 5 files changed, 109 insertions(+), 137 deletions(-) delete mode 100644 lua/custom/plugins/avante.lua create mode 100644 lua/custom/plugins/claude.lua diff --git a/init.lua b/init.lua index 03cd5f0e72d..52b80f58a25 100644 --- a/init.lua +++ b/init.lua @@ -883,53 +883,27 @@ require('lazy').setup({ 'nvim-treesitter/nvim-treesitter', lazy = false, build = ':TSUpdate', - branch = 'main', - -- [[ Configure Treesitter ]] See `:help nvim-treesitter-intro` - config = function() - -- ensure basic parser are installed - local parsers = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' } - require('nvim-treesitter').install(parsers) - - ---@param buf integer - ---@param language string - local function treesitter_try_attach(buf, language) - -- check if parser exists and load it - if not vim.treesitter.language.add(language) then return end - -- enables syntax highlighting and other treesitter features - vim.treesitter.start(buf, language) - - -- enables treesitter based folds - -- for more info on folds see `:help folds` - -- vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()' - -- vim.wo.foldmethod = 'expr' - - -- enables treesitter based indentation - vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" - end - - local available_parsers = require('nvim-treesitter').get_available() - vim.api.nvim_create_autocmd('FileType', { - callback = function(args) - local buf, filetype = args.buf, args.match - - local language = vim.treesitter.language.get_lang(filetype) - if not language then return end - - local installed_parsers = require('nvim-treesitter').get_installed 'parsers' - - if vim.tbl_contains(installed_parsers, language) then - -- enable the parser if it is installed - treesitter_try_attach(buf, language) - elseif vim.tbl_contains(available_parsers, language) then - -- if a parser is available in `nvim-treesitter` auto install it, and enable it after the installation is done - require('nvim-treesitter').install(language):await(function() treesitter_try_attach(buf, language) end) - else - -- try to enable treesitter features in case the parser exists but is not available from `nvim-treesitter` - treesitter_try_attach(buf, language) - end - end, - }) - end, + -- main = 'nvim-treesitter.configs', -- Sets main module to use for opts + -- [[ Configure Treesitter ]] See `:help nvim-treesitter` + opts = { + ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, + -- Autoinstall languages that are not installed + auto_install = true, + highlight = { + enable = true, + -- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules. + -- If you are experiencing weird indenting issues, add the language to + -- the list of additional_vim_regex_highlighting and disabled languages for indent. + additional_vim_regex_highlighting = { 'ruby' }, + }, + indent = { enable = true, disable = { 'ruby' } }, + }, + -- There are additional nvim-treesitter modules that you can use to interact + -- with nvim-treesitter. You should go explore a few and see what interests you: + -- + -- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod` + -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context + -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects }, -- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the diff --git a/lua/custom/plugins/avante.lua b/lua/custom/plugins/avante.lua deleted file mode 100644 index b4a41a4835c..00000000000 --- a/lua/custom/plugins/avante.lua +++ /dev/null @@ -1,26 +0,0 @@ -return { - { - 'yetone/avante.nvim', - event = 'VeryLazy', - build = function() - if vim.fn.has 'win32' ~= 0 then - return 'powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false' - else - return 'make' - end - end, - opts = { - -- Example: set your instructions file and provider here - instructions_file = '.copilot-instructions.md', - provider = 'copilot', - }, - dependencies = { - 'nvim-lua/plenary.nvim', - 'MunifTanjim/nui.nvim', - 'zbirenbaum/copilot.lua', -- Copilot provider support - 'hrsh7th/nvim-cmp', -- Completion - 'MeanderingProgrammer/render-markdown.nvim', -- Markdown rendering - 'stevearc/dressing.nvim', -- UI improvements (or use 'folke/snacks.nvim') - }, - }, -} diff --git a/lua/custom/plugins/claude.lua b/lua/custom/plugins/claude.lua new file mode 100644 index 00000000000..01029df492b --- /dev/null +++ b/lua/custom/plugins/claude.lua @@ -0,0 +1,38 @@ +return { + { + 'coder/claudecode.nvim', + dependencies = { 'folke/snacks.nvim' }, + config = true, + opts = { + terminal_cmd = vim.fn.system('which claude'):gsub('\n', ''), + }, + cmd = { + 'ClaudeCode', + 'ClaudeCodeFocus', + 'ClaudeCodeSelectModel', + 'ClaudeCodeSend', + 'ClaudeCodeAdd', + 'ClaudeCodeDiffAccept', + 'ClaudeCodeDiffDeny', + }, + keys = { + { '', 'ClaudeCodeFocus', desc = 'Toggle Claude', mode = { 'n', 'x' } }, + { 'a', nil, desc = 'AI/Claude Code' }, + { 'ac', 'ClaudeCode', desc = 'Toggle Claude' }, + { 'af', 'ClaudeCodeFocus', desc = 'Focus Claude' }, + { 'ar', 'ClaudeCode --resume', desc = 'Resume Claude' }, + { 'aC', 'ClaudeCode --continue', desc = 'Continue Claude' }, + { 'am', 'ClaudeCodeSelectModel', desc = 'Select Claude model' }, + { 'ab', 'ClaudeCodeAdd %', desc = 'Add current buffer' }, + { 'as', 'ClaudeCodeSend', mode = 'v', desc = 'Send to Claude' }, + { + 'as', + 'ClaudeCodeTreeAdd', + desc = 'Add file', + ft = { 'NvimTree', 'neo-tree', 'oil', 'minifiles', 'netrw' }, + }, + { 'aa', 'ClaudeCodeDiffAccept', desc = 'Accept diff' }, + { 'ad', 'ClaudeCodeDiffDeny', desc = 'Deny diff' }, + }, + }, +} diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 40d091d4390..f4da8043a32 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -14,4 +14,6 @@ return { require 'custom.plugins.sleuth', require 'custom.plugins.theme', require 'custom.plugins.markdown-render', + require 'custom.plugins.snacks', + require 'custom.plugins.claude', } diff --git a/lua/custom/plugins/snacks.lua b/lua/custom/plugins/snacks.lua index 0c9152c2c16..624f13b2fc2 100644 --- a/lua/custom/plugins/snacks.lua +++ b/lua/custom/plugins/snacks.lua @@ -1,66 +1,3 @@ ----@class snacks.dashboard.Config ----@field enabled? boolean ----@field sections snacks.dashboard.Section ----@field formats table -local dashboard_config = { - enabled = true, - preset = {}, - sections = { - { section = 'header' }, - { - pane = 1, - section = 'terminal', - cmd = 'command -v fortune >/dev/null && command -v cowsay >/dev/null && fortune | cowsay || echo Moo', - height = 10, - padding = 1, - }, - { section = 'keys', gap = 1, padding = 1 }, - { - pane = 2, - icon = ' ', - desc = 'Browse Repo', - padding = 1, - key = 'b', - action = function() Snacks.gitbrowse() end, - }, - function() - local in_git = Snacks.git.get_root() ~= nil - local has_remote = in_git and vim.fn.system 'git remote' ~= '' - local cmds = { - { - icon = ' ', - title = 'Open PRs', - cmd = 'gh pr list -L 3', - key = 'P', - action = function() vim.fn.jobstart('gh pr list --web', { detach = true }) end, - height = 7, - enabled = has_remote, - }, - { - icon = ' ', - title = 'Git Status', - cmd = 'git --no-pager diff --stat -B -M -C || echo "Nothing to report"', - height = 10, - enabled = in_git, - }, - } - return vim.tbl_map( - function(cmd) - return vim.tbl_extend('force', { - pane = 2, - section = 'terminal', - padding = 1, - ttl = 5 * 60, - indent = 3, - }, cmd) - end, - cmds - ) - end, - { section = 'startup' }, - }, -} - return { { 'folke/snacks.nvim', @@ -69,7 +6,54 @@ return { ---@type snacks.Config opts = { bigfile = { enabled = true }, - dashboard = dashboard_config, + dashboard = { + enabled = true, + preset = {}, + sections = { + { section = 'header' }, + { + pane = 1, + section = 'terminal', + cmd = 'command -v fortune >/dev/null && command -v cowsay >/dev/null && fortune | cowsay || echo Moo', + height = 10, + padding = 1, + }, + { section = 'keys', gap = 1, padding = 1 }, + { + pane = 2, + icon = ' ', + desc = 'Browse Repo', + padding = 1, + key = 'b', + action = function() + Snacks.gitbrowse() + end, + }, + function() + local in_git = Snacks.git.get_root() ~= nil + local has_remote = in_git and vim.fn.system 'git remote' ~= '' + local cmds = { + { + icon = ' ', + title = 'Git Status', + cmd = 'git --no-pager diff --stat -B -M -C || echo "Nothing to report"', + height = 10, + enabled = in_git, + }, + } + return vim.tbl_map(function(cmd) + return vim.tbl_extend('force', { + pane = 2, + section = 'terminal', + padding = 1, + ttl = 5 * 60, + indent = 3, + }, cmd) + end, cmds) + end, + { section = 'startup' }, + }, + }, explorer = { enabled = true }, indent = { enabled = true }, input = { enabled = true }, From c99345207bd6ea3dc073330cac8b722cede22ea2 Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Tue, 12 May 2026 16:09:49 +0100 Subject: [PATCH 14/32] Fix helm lsp --- init.lua | 16 ++++++++++++++++ lua/custom/setup.lua | 8 ++++++++ 2 files changed, 24 insertions(+) diff --git a/init.lua b/init.lua index 52b80f58a25..34a5f090270 100644 --- a/init.lua +++ b/init.lua @@ -612,6 +612,21 @@ require('lazy').setup({ stylua = {}, -- Used to format Lua code + yamlls = { + filetypes = { 'yaml', 'yaml.docker-compose' }, + }, + + helm_ls = { + filetypes = { 'helm' }, + settings = { + ['helm-ls'] = { + yamlls = { + path = 'yaml-language-server', + }, + }, + }, + }, + -- Special Lua Config, as recommended by neovim help docs lua_ls = { on_init = function(client) @@ -659,6 +674,7 @@ require('lazy').setup({ 'graphql', 'jsonls', 'yamlls', + 'helm_ls', 'eslint', 'bashls', }) diff --git a/lua/custom/setup.lua b/lua/custom/setup.lua index 59349ac4eaf..666a550759c 100644 --- a/lua/custom/setup.lua +++ b/lua/custom/setup.lua @@ -1,3 +1,11 @@ if vim.fn.executable 'tree-sitter' == 0 then vim.schedule(function() vim.notify('tree-sitter-cli not found! Run: npm install -g tree-sitter-cli', vim.log.levels.WARN) end) end + +vim.filetype.add { + pattern = { + ['.*/templates/.*%.yaml'] = 'helm', + ['.*/templates/.*%.tpl'] = 'helm', + ['helmfile.*%.yaml'] = 'helm', + }, +} From 1c9ababb43c8c6ec9c3e3cd80b57d4d17b419247 Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Fri, 5 Jun 2026 15:48:00 +0100 Subject: [PATCH 15/32] General updates to theme --- init.lua | 12 ++---------- lua/custom/plugins/snacks.lua | 2 +- lua/custom/plugins/theme.lua | 10 ++++++++++ 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/init.lua b/init.lua index 34a5f090270..e920fcce716 100644 --- a/init.lua +++ b/init.lua @@ -385,17 +385,9 @@ require('lazy').setup({ -- [[ Configure Telescope ]] -- See `:help telescope` and `:help telescope.setup()` require('telescope').setup { - -- You can put your default mappings / updates / etc. in here - -- All the info you're looking for is in `:help telescope.setup()` - -- - -- defaults = { - -- mappings = { - -- i = { [''] = 'to_fuzzy_refine' }, - -- }, - -- }, - -- pickers = {} + defaults = require('telescope.themes').get_ivy(), extensions = { - ['ui-select'] = { require('telescope.themes').get_dropdown() }, + ['ui-select'] = { require('telescope.themes').get_ivy() }, }, } diff --git a/lua/custom/plugins/snacks.lua b/lua/custom/plugins/snacks.lua index 624f13b2fc2..275b71b1be3 100644 --- a/lua/custom/plugins/snacks.lua +++ b/lua/custom/plugins/snacks.lua @@ -54,7 +54,7 @@ return { { section = 'startup' }, }, }, - explorer = { enabled = true }, + explorer = { enabled = false }, indent = { enabled = true }, input = { enabled = true }, picker = { enabled = true }, diff --git a/lua/custom/plugins/theme.lua b/lua/custom/plugins/theme.lua index 4204ff95b9a..026d90c99b7 100644 --- a/lua/custom/plugins/theme.lua +++ b/lua/custom/plugins/theme.lua @@ -28,6 +28,16 @@ return { hi VertSplit guibg=NONE ctermbg=NONE hi StatusLine guibg=NONE ctermbg=NONE hi LineNr guibg=NONE ctermbg=NONE + hi NormalFloat guibg=#1D1C19 + hi FloatBorder guibg=#1D1C19 + hi TelescopeNormal guibg=#1D1C19 + hi TelescopeBorder guibg=#1D1C19 + hi TelescopePromptNormal guibg=#1D1C19 + hi TelescopePromptBorder guibg=#1D1C19 + hi TelescopeResultsNormal guibg=#1D1C19 + hi TelescopeResultsBorder guibg=#1D1C19 + hi TelescopePreviewNormal guibg=#1D1C19 + hi TelescopePreviewBorder guibg=#1D1C19 ]] end, } From a708f57af4ba6a79f05c37146326f3d38ec971d4 Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Fri, 5 Jun 2026 15:51:27 +0100 Subject: [PATCH 16/32] Install gruvbox theme --- lua/custom/plugins/theme.lua | 41 ++++++++++++++---------------------- 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/lua/custom/plugins/theme.lua b/lua/custom/plugins/theme.lua index 026d90c99b7..db1df5982d6 100644 --- a/lua/custom/plugins/theme.lua +++ b/lua/custom/plugins/theme.lua @@ -9,36 +9,27 @@ -- } return { - 'rebelot/kanagawa.nvim', + 'ellisonleao/gruvbox.nvim', lazy = false, priority = 1000, config = function() - require('kanagawa').setup { - commentStyle = { - italic = true, + require('gruvbox').setup { + contrast = 'hard', + transparent_mode = true, + overrides = { + NormalFloat = { bg = '#1d2021' }, + FloatBorder = { bg = '#1d2021' }, + TelescopeNormal = { bg = '#1d2021' }, + TelescopeBorder = { bg = '#1d2021' }, + TelescopePromptNormal = { bg = '#1d2021' }, + TelescopePromptBorder = { bg = '#1d2021' }, + TelescopeResultsNormal = { bg = '#1d2021' }, + TelescopeResultsBorder = { bg = '#1d2021' }, + TelescopePreviewNormal = { bg = '#1d2021' }, + TelescopePreviewBorder = { bg = '#1d2021' }, }, - -- optional: your custom config here } - vim.cmd 'colorscheme kanagawa-dragon' - - vim.cmd [[ - hi Normal guibg=NONE ctermbg=NONE - hi NormalNC guibg=NONE ctermbg=NONE - hi SignColumn guibg=NONE ctermbg=NONE - hi VertSplit guibg=NONE ctermbg=NONE - hi StatusLine guibg=NONE ctermbg=NONE - hi LineNr guibg=NONE ctermbg=NONE - hi NormalFloat guibg=#1D1C19 - hi FloatBorder guibg=#1D1C19 - hi TelescopeNormal guibg=#1D1C19 - hi TelescopeBorder guibg=#1D1C19 - hi TelescopePromptNormal guibg=#1D1C19 - hi TelescopePromptBorder guibg=#1D1C19 - hi TelescopeResultsNormal guibg=#1D1C19 - hi TelescopeResultsBorder guibg=#1D1C19 - hi TelescopePreviewNormal guibg=#1D1C19 - hi TelescopePreviewBorder guibg=#1D1C19 - ]] + vim.cmd.colorscheme 'gruvbox' end, } From e2bf4cbad8142a31bb73423bde68a580398d111e Mon Sep 17 00:00:00 2001 From: ffewster Date: Sat, 4 Jul 2026 01:48:02 +0100 Subject: [PATCH 17/32] add nix flake --- flake.nix | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000000..e4ab81bc765 --- /dev/null +++ b/flake.nix @@ -0,0 +1,7 @@ +{ + description = "ffewster Neovim config"; + + outputs = { self }: { + config = ./; + }; +} From 4a2b090ef1cd1a22efd4d9453d5833f367294941 Mon Sep 17 00:00:00 2001 From: ffewster Date: Sat, 4 Jul 2026 01:58:33 +0100 Subject: [PATCH 18/32] Update flakefile --- flake.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index e4ab81bc765..a1869bb32e1 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,14 @@ { - description = "ffewster Neovim config"; + description = "Neovim config"; - outputs = { self }: { - config = ./; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + + outputs = { self, nixpkgs }: { + # This exposes your repo as a plain source tree + lib = { + path = self; + }; }; } From eca39835243efcd43f3851d6e0de54488e5397d3 Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Thu, 13 Aug 2026 12:19:39 +0100 Subject: [PATCH 19/32] Add kotlin support --- init.lua | 4 +++- lua/custom/plugins/debug-custom.lua | 1 + lua/custom/setup.lua | 37 +++++++++++++++++++++++++++++ lua/kickstart/plugins/debug.lua | 20 ++++++++-------- 4 files changed, 51 insertions(+), 11 deletions(-) create mode 100644 lua/custom/plugins/debug-custom.lua diff --git a/init.lua b/init.lua index e920fcce716..431e3e1762a 100644 --- a/init.lua +++ b/init.lua @@ -604,6 +604,8 @@ require('lazy').setup({ stylua = {}, -- Used to format Lua code + kotlin_lsp = {}, + yamlls = { filetypes = { 'yaml', 'yaml.docker-compose' }, }, @@ -923,7 +925,7 @@ require('lazy').setup({ -- Here are some example plugins that I've included in the Kickstart repository. -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- - -- require 'kickstart.plugins.debug', + require 'kickstart.plugins.debug', -- require 'kickstart.plugins.indent_line', require 'kickstart.plugins.lint', require 'kickstart.plugins.autopairs', diff --git a/lua/custom/plugins/debug-custom.lua b/lua/custom/plugins/debug-custom.lua new file mode 100644 index 00000000000..3941af59e07 --- /dev/null +++ b/lua/custom/plugins/debug-custom.lua @@ -0,0 +1 @@ +return {} \ No newline at end of file diff --git a/lua/custom/setup.lua b/lua/custom/setup.lua index 666a550759c..bec34532c0c 100644 --- a/lua/custom/setup.lua +++ b/lua/custom/setup.lua @@ -9,3 +9,40 @@ vim.filetype.add { ['helmfile.*%.yaml'] = 'helm', }, } + +-- Kotlin debugging support, layered onto kickstart's nvim-dap setup +-- (lua/kickstart/plugins/debug.lua) without editing that file. Hooks +-- Lazy's `User LazyLoad` event so this runs once nvim-dap actually loads. +vim.api.nvim_create_autocmd('User', { + pattern = 'LazyLoad', + callback = function(ev) + if ev.data ~= 'nvim-dap' then + return + end + + local ok, registry = pcall(require, 'mason-registry') + if ok then + pcall(function() + if not registry.is_installed 'kotlin-debug-adapter' then + registry.get_package('kotlin-debug-adapter'):install() + end + end) + end + + local dap = require 'dap' + dap.adapters.kotlin = { + type = 'executable', + command = 'kotlin-debug-adapter', + } + dap.configurations.kotlin = { + { + type = 'kotlin', + request = 'attach', + name = 'Attach to Kotlin Process', + projectRoot = vim.fn.getcwd, + hostName = 'localhost', + port = 5005, + }, + } + end, +}) diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua index 7e58905e830..b11830716e2 100644 --- a/lua/kickstart/plugins/debug.lua +++ b/lua/kickstart/plugins/debug.lua @@ -83,16 +83,16 @@ return { } -- Change breakpoint icons - -- vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' }) - -- vim.api.nvim_set_hl(0, 'DapStop', { fg = '#ffcc00' }) - -- local breakpoint_icons = vim.g.have_nerd_font - -- and { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' } - -- or { Breakpoint = '●', BreakpointCondition = '⊜', BreakpointRejected = '⊘', LogPoint = '◆', Stopped = '⭔' } - -- for type, icon in pairs(breakpoint_icons) do - -- local tp = 'Dap' .. type - -- local hl = (type == 'Stopped') and 'DapStop' or 'DapBreak' - -- vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl }) - -- end + vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' }) + vim.api.nvim_set_hl(0, 'DapStop', { fg = '#ffcc00' }) + local breakpoint_icons = vim.g.have_nerd_font + and { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' } + or { Breakpoint = '●', BreakpointCondition = '⊜', BreakpointRejected = '⊘', LogPoint = '◆', Stopped = '⭔' } + for type, icon in pairs(breakpoint_icons) do + local tp = 'Dap' .. type + local hl = (type == 'Stopped') and 'DapStop' or 'DapBreak' + vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl }) + end dap.listeners.after.event_initialized['dapui_config'] = dapui.open dap.listeners.before.event_terminated['dapui_config'] = dapui.close From 8599dfbba9b66cfc54438e88b789231f7a839413 Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Fri, 28 Aug 2026 15:34:14 +0100 Subject: [PATCH 20/32] Update neotree config for empty dirs --- lua/custom/plugins/neo-tree-config.lua | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lua/custom/plugins/neo-tree-config.lua b/lua/custom/plugins/neo-tree-config.lua index 1492b22ec0c..9a04dd98a27 100644 --- a/lua/custom/plugins/neo-tree-config.lua +++ b/lua/custom/plugins/neo-tree-config.lua @@ -19,16 +19,27 @@ return { -- Set up your custom keymaps vim.keymap.set('n', 'e', toggle_tree, { desc = 'Open NeoTree' }) - vim.keymap.set('n', 'n', function() - vim.cmd 'Neotree focus' - end, { desc = 'Focus NeoTree' }) + vim.keymap.set('n', 'n', function() vim.cmd 'Neotree focus' end, { desc = 'Focus NeoTree' }) -- Setup neo-tree require('neo-tree').setup { + default_component_configs = { + indent = { + with_expanders = true, + }, + }, filesystem = { + window = { + position = 'default', + }, follow_current_file = { enabled = true, }, + group_empty_dirs = true, + }, + source_selector = { + winbar = true, + statusline = false, }, } end, From 55b5d43e56b3cdd15f66c84c7b06ef426e182314 Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Wed, 9 Sep 2026 11:23:47 +0100 Subject: [PATCH 21/32] Pin custom plugin versions and track the vim.pack lockfile Fixes the snacks.nvim dashboard erroring on startup (its 'startup' section hard-required lazy.stats, which no longer exists post-migration) by dropping that section. Pins each custom plugin to its currently installed commit so vim.pack.update() won't move them without an explicit edit, while core kickstart plugins keep following upstream's own version choices. Also tracks nvim-pack-lock.json per upstream's own README recommendation for forks, and drops the now-dead lazy-lock.json. Co-Authored-By: Claude Sonnet 5 --- .gitignore | 8 +- lua/custom/plugins/claude.lua | 2 +- lua/custom/plugins/comment.lua | 2 +- lua/custom/plugins/copilot-chat.lua | 2 +- lua/custom/plugins/copilot.lua | 2 +- lua/custom/plugins/markdown-render.lua | 2 +- lua/custom/plugins/neo-tree-config.lua | 4 +- lua/custom/plugins/sleuth.lua | 2 +- lua/custom/plugins/snacks.lua | 5 +- lua/custom/plugins/tabs.lua | 2 +- lua/custom/plugins/theme.lua | 2 +- nvim-pack-lock.json | 162 +++++++++++++++++++++++++ 12 files changed, 178 insertions(+), 17 deletions(-) create mode 100644 nvim-pack-lock.json diff --git a/.gitignore b/.gitignore index a52bd495579..72408fd06ea 100644 --- a/.gitignore +++ b/.gitignore @@ -5,10 +5,8 @@ nvim spell/ -# In your personal fork, you likely want to comment this, since it's recommended to track -# nvim-pack-lock.json in version control - see :help vim.pack-lockfile -# For the official `nvim-lua/kickstart.nvim` git repository, we leave it ignored to avoid unneeded -# merge conflicts. -nvim-pack-lock.json +# Tracked in this personal fork (recommended - see :help vim.pack-lockfile). +# Only the official `nvim-lua/kickstart.nvim` repo ignores it, to avoid unneeded merge conflicts. +# nvim-pack-lock.json .DS_Store diff --git a/lua/custom/plugins/claude.lua b/lua/custom/plugins/claude.lua index 461aacc1523..d9873354585 100644 --- a/lua/custom/plugins/claude.lua +++ b/lua/custom/plugins/claude.lua @@ -1,5 +1,5 @@ -- snacks.nvim is already installed by lua/custom/plugins/snacks.lua -vim.pack.add { 'https://github.com/coder/claudecode.nvim' } +vim.pack.add { { src = 'https://github.com/coder/claudecode.nvim', version = '2390c6e45c4789072c293ac69de051d169668b29' } } require('claudecode').setup { terminal_cmd = vim.fn.system('which claude'):gsub('\n', ''), diff --git a/lua/custom/plugins/comment.lua b/lua/custom/plugins/comment.lua index d9cc6ad50bb..9211e133a10 100644 --- a/lua/custom/plugins/comment.lua +++ b/lua/custom/plugins/comment.lua @@ -1,4 +1,4 @@ -vim.pack.add { 'https://github.com/numToStr/Comment.nvim' } +vim.pack.add { { src = 'https://github.com/numToStr/Comment.nvim', version = 'e30b7f2008e52442154b66f7c519bfd2f1e32acb' } } require('Comment').setup() vim.keymap.set('n', '/', function() require('Comment.api').toggle.linewise.current() end, { desc = 'comment toggle' }) diff --git a/lua/custom/plugins/copilot-chat.lua b/lua/custom/plugins/copilot-chat.lua index 03ddfda036f..64dc3b2e243 100644 --- a/lua/custom/plugins/copilot-chat.lua +++ b/lua/custom/plugins/copilot-chat.lua @@ -1,5 +1,5 @@ -- plenary.nvim is already installed by the core telescope setup -vim.pack.add { 'https://github.com/CopilotC-Nvim/CopilotChat.nvim' } +vim.pack.add { { src = 'https://github.com/CopilotC-Nvim/CopilotChat.nvim', version = '004ced055d8db59561cfcddc5f141ccd8d5a033b' } } vim.keymap.set('n', 'ch', 'CopilotChatToggle', { noremap = true, silent = true }) diff --git a/lua/custom/plugins/copilot.lua b/lua/custom/plugins/copilot.lua index d47dc219222..70936168fd2 100644 --- a/lua/custom/plugins/copilot.lua +++ b/lua/custom/plugins/copilot.lua @@ -1,4 +1,4 @@ -vim.pack.add { 'https://github.com/zbirenbaum/copilot.lua' } +vim.pack.add { { src = 'https://github.com/zbirenbaum/copilot.lua', version = '901a6c564abb45c7703401ecc6416bb0d15afd37' } } require('copilot').setup { suggestion = { enabled = true, diff --git a/lua/custom/plugins/markdown-render.lua b/lua/custom/plugins/markdown-render.lua index 6831fb4c521..4491de16644 100644 --- a/lua/custom/plugins/markdown-render.lua +++ b/lua/custom/plugins/markdown-render.lua @@ -1,5 +1,5 @@ -- nvim-treesitter and mini.nvim are already installed by the core setup -vim.pack.add { 'https://github.com/MeanderingProgrammer/render-markdown.nvim' } +vim.pack.add { { src = 'https://github.com/MeanderingProgrammer/render-markdown.nvim', version = '4663eb3ecd538bd5062628fb6d95bbe6bdca78f6' } } ---@module 'render-markdown' ---@type render.md.UserConfig diff --git a/lua/custom/plugins/neo-tree-config.lua b/lua/custom/plugins/neo-tree-config.lua index 74b57fc1fcd..321e1f3c7c2 100644 --- a/lua/custom/plugins/neo-tree-config.lua +++ b/lua/custom/plugins/neo-tree-config.lua @@ -1,7 +1,7 @@ -- nvim-tree/nvim-web-devicons dependency is covered by mini.icons' devicons compat shim vim.pack.add { - { src = 'https://github.com/nvim-neo-tree/neo-tree.nvim', version = 'v3.x' }, - 'https://github.com/MunifTanjim/nui.nvim', + { src = 'https://github.com/nvim-neo-tree/neo-tree.nvim', version = 'f3f3bf73414e400cf9fc13fda50f00404a8f8ab1' }, + { src = 'https://github.com/MunifTanjim/nui.nvim', version = '10fc361835c856ba4233ef5ea135b919bf3dce97' }, } local toggle_tree = function() diff --git a/lua/custom/plugins/sleuth.lua b/lua/custom/plugins/sleuth.lua index d631f1666f3..716823c2553 100644 --- a/lua/custom/plugins/sleuth.lua +++ b/lua/custom/plugins/sleuth.lua @@ -1,2 +1,2 @@ -- Detects tabstop/shiftwidth automatically, no config needed -vim.pack.add { 'https://github.com/tpope/vim-sleuth' } +vim.pack.add { { src = 'https://github.com/tpope/vim-sleuth', version = 'be69bff86754b1aa5adcbb527d7fcd1635a84080' } } diff --git a/lua/custom/plugins/snacks.lua b/lua/custom/plugins/snacks.lua index f0eec31b326..e3d5a80b1ef 100644 --- a/lua/custom/plugins/snacks.lua +++ b/lua/custom/plugins/snacks.lua @@ -1,4 +1,4 @@ -vim.pack.add { 'https://github.com/folke/snacks.nvim' } +vim.pack.add { { src = 'https://github.com/folke/snacks.nvim', version = '882c996cf28183f4d63640de0b4c02ec886d01f2' } } ---@type snacks.Config require('snacks').setup { @@ -48,7 +48,8 @@ require('snacks').setup { }, cmd) end, cmds) end, - { section = 'startup' }, + -- ponytail: dropped { section = 'startup' } — it hard-requires 'lazy.stats', + -- which no longer exists now that we're on vim.pack instead of lazy.nvim }, }, explorer = { enabled = false }, diff --git a/lua/custom/plugins/tabs.lua b/lua/custom/plugins/tabs.lua index 4dfb54e7f95..066b4d72ed4 100644 --- a/lua/custom/plugins/tabs.lua +++ b/lua/custom/plugins/tabs.lua @@ -2,7 +2,7 @@ -- is covered by mini.icons' devicons compat shim vim.g.barbar_auto_setup = false -vim.pack.add { { src = 'https://github.com/romgrk/barbar.nvim', version = vim.version.range '1.*' } } +vim.pack.add { { src = 'https://github.com/romgrk/barbar.nvim', version = '53b5a2f34b68875898f0531032fbf090e3952ad7' } } vim.keymap.set('n', '', 'BufferNext', { noremap = true, silent = true }) vim.keymap.set('n', '', 'BufferPrevious', { noremap = true, silent = true }) diff --git a/lua/custom/plugins/theme.lua b/lua/custom/plugins/theme.lua index 7e70eb80976..d5a5f54c8d5 100644 --- a/lua/custom/plugins/theme.lua +++ b/lua/custom/plugins/theme.lua @@ -2,7 +2,7 @@ -- require('nordic').load() -- vim.cmd.colorscheme 'nordic' -vim.pack.add { 'https://github.com/ellisonleao/gruvbox.nvim' } +vim.pack.add { { src = 'https://github.com/ellisonleao/gruvbox.nvim', version = '154eb5ff5b96d0641307113fa385eaf0d36d9796' } } require('gruvbox').setup { contrast = 'hard', transparent_mode = true, diff --git a/nvim-pack-lock.json b/nvim-pack-lock.json new file mode 100644 index 00000000000..c4c32fc91dd --- /dev/null +++ b/nvim-pack-lock.json @@ -0,0 +1,162 @@ +{ + "plugins": { + "Comment.nvim": { + "rev": "e30b7f2008e52442154b66f7c519bfd2f1e32acb", + "src": "https://github.com/numToStr/Comment.nvim", + "version": "'e30b7f2008e52442154b66f7c519bfd2f1e32acb'" + }, + "CopilotChat.nvim": { + "rev": "004ced055d8db59561cfcddc5f141ccd8d5a033b", + "src": "https://github.com/CopilotC-Nvim/CopilotChat.nvim", + "version": "'004ced055d8db59561cfcddc5f141ccd8d5a033b'" + }, + "LuaSnip": { + "rev": "642b0c595e11608b4c18219e93b88d7637af27bc", + "src": "https://github.com/L3MON4D3/LuaSnip", + "version": "2.0.0 - 3.0.0" + }, + "barbar.nvim": { + "rev": "53b5a2f34b68875898f0531032fbf090e3952ad7", + "src": "https://github.com/romgrk/barbar.nvim", + "version": "'53b5a2f34b68875898f0531032fbf090e3952ad7'" + }, + "blink.cmp": { + "rev": "78336bc89ee5365633bcf754d93df01678b5c08f", + "src": "https://github.com/saghen/blink.cmp", + "version": "1.0.0 - 2.0.0" + }, + "claudecode.nvim": { + "rev": "2390c6e45c4789072c293ac69de051d169668b29", + "src": "https://github.com/coder/claudecode.nvim", + "version": "'2390c6e45c4789072c293ac69de051d169668b29'" + }, + "conform.nvim": { + "rev": "016802de402556da54c36bd7359b441266b01cdd", + "src": "https://github.com/stevearc/conform.nvim" + }, + "copilot.lua": { + "rev": "901a6c564abb45c7703401ecc6416bb0d15afd37", + "src": "https://github.com/zbirenbaum/copilot.lua", + "version": "'901a6c564abb45c7703401ecc6416bb0d15afd37'" + }, + "fidget.nvim": { + "rev": "9e0201673e08e997e7cf52afca5565c70bd117f3", + "src": "https://github.com/j-hui/fidget.nvim" + }, + "gitsigns.nvim": { + "rev": "5be654f2232c10ddcad19c1607a67b6b4b78fc29", + "src": "https://github.com/lewis6991/gitsigns.nvim" + }, + "gruvbox.nvim": { + "rev": "154eb5ff5b96d0641307113fa385eaf0d36d9796", + "src": "https://github.com/ellisonleao/gruvbox.nvim", + "version": "'154eb5ff5b96d0641307113fa385eaf0d36d9796'" + }, + "guess-indent.nvim": { + "rev": "84a4987ff36798c2fc1169cbaff67960aed9776f", + "src": "https://github.com/NMAC427/guess-indent.nvim" + }, + "mason-lspconfig.nvim": { + "rev": "5d32a9b8de9f90466797a740edb0fb4b3c27e423", + "src": "https://github.com/mason-org/mason-lspconfig.nvim" + }, + "mason-nvim-dap.nvim": { + "rev": "9a10e096703966335bd5c46c8c875d5b0690dade", + "src": "https://github.com/jay-babu/mason-nvim-dap.nvim" + }, + "mason-tool-installer.nvim": { + "rev": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc", + "src": "https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim" + }, + "mason.nvim": { + "rev": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d", + "src": "https://github.com/mason-org/mason.nvim" + }, + "mini.nvim": { + "rev": "25f25d3e6661d942323e56711096de1850d814ec", + "src": "https://github.com/nvim-mini/mini.nvim" + }, + "neo-tree.nvim": { + "rev": "f3f3bf73414e400cf9fc13fda50f00404a8f8ab1", + "src": "https://github.com/nvim-neo-tree/neo-tree.nvim", + "version": "'f3f3bf73414e400cf9fc13fda50f00404a8f8ab1'" + }, + "nui.nvim": { + "rev": "10fc361835c856ba4233ef5ea135b919bf3dce97", + "src": "https://github.com/MunifTanjim/nui.nvim", + "version": "'10fc361835c856ba4233ef5ea135b919bf3dce97'" + }, + "nvim-autopairs": { + "rev": "430522f95fe4fb7c511ec64f8c1a90cc6a66c05c", + "src": "https://github.com/windwp/nvim-autopairs" + }, + "nvim-dap": { + "rev": "c9a0738e45f1bd41d792a126941348dce661cf9b", + "src": "https://github.com/mfussenegger/nvim-dap" + }, + "nvim-dap-go": { + "rev": "b4421153ead5d726603b02743ea40cf26a51ed5f", + "src": "https://github.com/leoluz/nvim-dap-go" + }, + "nvim-dap-ui": { + "rev": "cc9dd33aade7f20bae414d0cba163bc60d4d4b43", + "src": "https://github.com/rcarriga/nvim-dap-ui" + }, + "nvim-lint": { + "rev": "3d55c8f67c6ae5c15e1042571e107c7a3d5c5f4e", + "src": "https://github.com/mfussenegger/nvim-lint" + }, + "nvim-lspconfig": { + "rev": "19576de1c1b6d1b5e231ea6ef9cba9a811c322bb", + "src": "https://github.com/neovim/nvim-lspconfig" + }, + "nvim-nio": { + "rev": "edcc181a875301dd21840189aa2f2f9ad69fc172", + "src": "https://github.com/nvim-neotest/nvim-nio" + }, + "nvim-treesitter": { + "rev": "5cb0114e6242625db56dd6440e945ed1ece10bc7", + "src": "https://github.com/nvim-treesitter/nvim-treesitter", + "version": "'main'" + }, + "plenary.nvim": { + "rev": "74b06c6c75e4eeb3108ec01852001636d85a932b", + "src": "https://github.com/nvim-lua/plenary.nvim" + }, + "render-markdown.nvim": { + "rev": "4663eb3ecd538bd5062628fb6d95bbe6bdca78f6", + "src": "https://github.com/MeanderingProgrammer/render-markdown.nvim", + "version": "'4663eb3ecd538bd5062628fb6d95bbe6bdca78f6'" + }, + "snacks.nvim": { + "rev": "882c996cf28183f4d63640de0b4c02ec886d01f2", + "src": "https://github.com/folke/snacks.nvim", + "version": "'882c996cf28183f4d63640de0b4c02ec886d01f2'" + }, + "telescope-fzf-native.nvim": { + "rev": "b25b749b9db64d375d782094e2b9dce53ad53a40", + "src": "https://github.com/nvim-telescope/telescope-fzf-native.nvim" + }, + "telescope-ui-select.nvim": { + "rev": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2", + "src": "https://github.com/nvim-telescope/telescope-ui-select.nvim" + }, + "telescope.nvim": { + "rev": "40aedd8a68c78a656a10a8d62d80c54af59420fb", + "src": "https://github.com/nvim-telescope/telescope.nvim" + }, + "todo-comments.nvim": { + "rev": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668", + "src": "https://github.com/folke/todo-comments.nvim" + }, + "vim-sleuth": { + "rev": "be69bff86754b1aa5adcbb527d7fcd1635a84080", + "src": "https://github.com/tpope/vim-sleuth", + "version": "'be69bff86754b1aa5adcbb527d7fcd1635a84080'" + }, + "which-key.nvim": { + "rev": "3aab2147e74890957785941f0c1ad87d0a44c15a", + "src": "https://github.com/folke/which-key.nvim" + } + } +} From cebe25b328884f16cf57b1b1410ccdfdd8b89431 Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Wed, 9 Sep 2026 11:48:11 +0100 Subject: [PATCH 22/32] Add instructions.md for managing plugins under vim.pack A cheat-sheet for future me: everyday update/preview commands, the confirmation buffer's keybinds, how to bump/freeze/unfreeze a pinned custom plugin, reverting via the lockfile, and a snapshot of the current custom plugin pins. Co-Authored-By: Claude Sonnet 5 --- instructions.md | 119 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 instructions.md diff --git a/instructions.md b/instructions.md new file mode 100644 index 00000000000..eb90e8082d5 --- /dev/null +++ b/instructions.md @@ -0,0 +1,119 @@ +# Managing plugins (vim.pack) + +This config uses Neovim's built-in `vim.pack`, not `lazy.nvim`. There's no +`:Lazy` dashboard — updates go through `:lua vim.pack.update(...)`, which opens +an interactive confirmation buffer instead of a floating UI. + +Two categories of plugin here, updated differently: + +- **Core kickstart plugins** (`init.lua`, `lua/kickstart/plugins/*.lua`) — + no explicit commit pin from us, so they float on whatever + branch/tag/range upstream's `init.lua` specifies. +- **Custom plugins** (`lua/custom/plugins/*.lua`) — pinned to an exact commit + hash, so they never move until you edit the hash yourself. + +## Everyday commands + +Check what's installed (name, current rev, path, spec): +```vim +:lua =vim.pack.get() +``` + +Preview + apply updates for everything (opens confirmation buffer, downloads first): +```vim +:lua vim.pack.update() +``` + +Update just one plugin (name from `vim.pack.get()`, not the file name): +```vim +:lua vim.pack.update({ 'Comment.nvim' }) +``` + +Preview without downloading (e.g. after only editing a `version` field): +```vim +:lua vim.pack.update({ 'Comment.nvim' }, { offline = true }) +``` + +Skip the confirmation buffer and apply immediately: +```vim +:lua vim.pack.update({ 'Comment.nvim' }, { force = true }) +``` + +### In the confirmation buffer + +- `]]` / `[[` — jump between plugin sections +- `gO` — outline of all plugins in the buffer +- `K` on a pending change — hover for changelog/details +- `gra` on a plugin — code actions: update / skip / delete it +- `:write` — apply everything shown; `:quit` — discard + +## Bumping one of our pinned custom plugins + +1. Edit the `version = ''` field in its `lua/custom/plugins/*.lua` file + — set it to a newer commit, a tag, or a branch name if you want it to float. +2. Relaunch nvim (or `:restart`). This only updates the *target* in + `nvim-pack-lock.json`, not the plugin on disk yet. +3. `:lua vim.pack.update({ 'PluginName' })`, review the diff, `:write` to apply + (or `:quit` to discard — then revert your edit too, or it'll nag again). + +## Freezing / unfreezing a plugin + +- **Freeze**: set `version` to its current revision (`rev` field from + `vim.pack.get()` or `nvim-pack-lock.json`), then restart. +- **Unfreeze**: set `version` to a branch name (e.g. `'main'`) or a range + (`vim.version.range('1.*')`), restart, then run `vim.pack.update()`. + +## Reverting a bad update + +```sh +git checkout HEAD -- nvim-pack-lock.json # nvim-pack-lock.json is tracked in git +``` +```vim +:restart +:lua vim.pack.update({ 'PluginName' }, { offline = true, target = 'lockfile' }) +``` +Review and confirm. + +## Removing a plugin + +Delete its `vim.pack.add` call (and any `require`/setup) from the relevant +file, then: +```vim +:lua vim.pack.del({ 'PluginName' }) +``` + +## Where things live + +- Lockfile: `nvim-pack-lock.json` (tracked in this repo — un-ignored on + purpose, see `.gitignore`). +- Update history: `nvim-pack.log` under `:lua print(vim.fn.stdpath('log'))`. +- Plugin checkouts (plain git repos): `~/.local/share/nvim/site/pack/core/opt//` +- Docs: `:help vim.pack`, `:help vim.pack-examples`, `:help vim.pack-lockfile` + +## Current custom plugin pins + +| File | Plugin | Pinned commit | +|---|---|---| +| `claude.lua` | claudecode.nvim | `2390c6e45c4789072c293ac69de051d169668b29` | +| `comment.lua` | Comment.nvim | `e30b7f2008e52442154b66f7c519bfd2f1e32acb` | +| `copilot-chat.lua` | CopilotChat.nvim | `004ced055d8db59561cfcddc5f141ccd8d5a033b` | +| `copilot.lua` | copilot.lua | `901a6c564abb45c7703401ecc6416bb0d15afd37` | +| `markdown-render.lua` | render-markdown.nvim | `4663eb3ecd538bd5062628fb6d95bbe6bdca78f6` | +| `neo-tree-config.lua` | neo-tree.nvim | `f3f3bf73414e400cf9fc13fda50f00404a8f8ab1` | +| `neo-tree-config.lua` | nui.nvim | `10fc361835c856ba4233ef5ea135b919bf3dce97` | +| `sleuth.lua` | vim-sleuth | `be69bff86754b1aa5adcbb527d7fcd1635a84080` | +| `snacks.lua` | snacks.nvim | `882c996cf28183f4d63640de0b4c02ec886d01f2` | +| `tabs.lua` | barbar.nvim | `53b5a2f34b68875898f0531032fbf090e3952ad7` | +| `theme.lua` | gruvbox.nvim | `154eb5ff5b96d0641307113fa385eaf0d36d9796` | + +This table goes stale the moment you bump a pin — treat it as a snapshot from +the last time this doc was written, not a live source of truth. `nvim-pack-lock.json` +is the actual source of truth. + +## Optional: a fancier UI + +[pack.nvim](https://github.com/igmrrf/pack.nvim) wraps `vim.pack` in a +floating dashboard closer to what `lazy.nvim`'s `:Lazy` gave you. As of writing +it's very new (single maintainer, a handful of stars) and would sit in the +critical path of every plugin loading, so it hasn't been added here — the +built-in confirmation buffer above covers most of the same workflow already. From 28cdd67d5d98b38325f37b797ffd5659ee694c19 Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Wed, 9 Sep 2026 12:02:19 +0100 Subject: [PATCH 23/32] Consolidate custom plugin vim.pack.add calls into one file Moves every custom plugin's vim.pack.add() (with its pinned commit) into lua/custom/plugins/init.lua, ahead of the auto-discovery loop. The per-plugin files now only contain require(...).setup{} and keymaps. This also fixes a real ordering bug: since the loop's file order is unspecified, a plugin file's require() could otherwise run before its own add() call. Moves vim.g.barbar_auto_setup alongside it for the same reason - it must be set before barbar's plugin files load. Co-Authored-By: Claude Sonnet 5 --- instructions.md | 38 +++++++++++--------------- lua/custom/plugins/claude.lua | 4 +-- lua/custom/plugins/comment.lua | 2 +- lua/custom/plugins/copilot-chat.lua | 4 +-- lua/custom/plugins/copilot.lua | 2 +- lua/custom/plugins/init.lua | 25 +++++++++++++++++ lua/custom/plugins/markdown-render.lua | 4 +-- lua/custom/plugins/neo-tree-config.lua | 8 ++---- lua/custom/plugins/sleuth.lua | 4 +-- lua/custom/plugins/snacks.lua | 3 +- lua/custom/plugins/tabs.lua | 8 ++---- lua/custom/plugins/theme.lua | 3 +- 12 files changed, 54 insertions(+), 51 deletions(-) diff --git a/instructions.md b/instructions.md index eb90e8082d5..05a26e17aef 100644 --- a/instructions.md +++ b/instructions.md @@ -9,8 +9,14 @@ Two categories of plugin here, updated differently: - **Core kickstart plugins** (`init.lua`, `lua/kickstart/plugins/*.lua`) — no explicit commit pin from us, so they float on whatever branch/tag/range upstream's `init.lua` specifies. -- **Custom plugins** (`lua/custom/plugins/*.lua`) — pinned to an exact commit - hash, so they never move until you edit the hash yourself. +- **Custom plugins** — every `vim.pack.add()` call for them lives in one + place, `lua/custom/plugins/init.lua`, each pinned to an exact commit hash so + none of them move until you edit the hash yourself. The individual files + (`claude.lua`, `comment.lua`, etc.) only contain `require(...).setup{}` and + keymaps — they don't call `vim.pack.add` themselves. This is deliberate: + those files load in an unspecified order (see the auto-discovery loop + comment in `init.lua`), so the `add()` calls have to happen earlier, in the + one file guaranteed to run first. ## Everyday commands @@ -49,7 +55,7 @@ Skip the confirmation buffer and apply immediately: ## Bumping one of our pinned custom plugins -1. Edit the `version = ''` field in its `lua/custom/plugins/*.lua` file +1. Edit its `version = ''` entry in `lua/custom/plugins/init.lua` — set it to a newer commit, a tag, or a branch name if you want it to float. 2. Relaunch nvim (or `:restart`). This only updates the *target* in `nvim-pack-lock.json`, not the plugin on disk yet. @@ -76,8 +82,9 @@ Review and confirm. ## Removing a plugin -Delete its `vim.pack.add` call (and any `require`/setup) from the relevant -file, then: +Delete its entry from the `vim.pack.add {}` block in +`lua/custom/plugins/init.lua`, delete its own file under +`lua/custom/plugins/` (the `require(...).setup{}`/keymaps), then: ```vim :lua vim.pack.del({ 'PluginName' }) ``` @@ -92,23 +99,10 @@ file, then: ## Current custom plugin pins -| File | Plugin | Pinned commit | -|---|---|---| -| `claude.lua` | claudecode.nvim | `2390c6e45c4789072c293ac69de051d169668b29` | -| `comment.lua` | Comment.nvim | `e30b7f2008e52442154b66f7c519bfd2f1e32acb` | -| `copilot-chat.lua` | CopilotChat.nvim | `004ced055d8db59561cfcddc5f141ccd8d5a033b` | -| `copilot.lua` | copilot.lua | `901a6c564abb45c7703401ecc6416bb0d15afd37` | -| `markdown-render.lua` | render-markdown.nvim | `4663eb3ecd538bd5062628fb6d95bbe6bdca78f6` | -| `neo-tree-config.lua` | neo-tree.nvim | `f3f3bf73414e400cf9fc13fda50f00404a8f8ab1` | -| `neo-tree-config.lua` | nui.nvim | `10fc361835c856ba4233ef5ea135b919bf3dce97` | -| `sleuth.lua` | vim-sleuth | `be69bff86754b1aa5adcbb527d7fcd1635a84080` | -| `snacks.lua` | snacks.nvim | `882c996cf28183f4d63640de0b4c02ec886d01f2` | -| `tabs.lua` | barbar.nvim | `53b5a2f34b68875898f0531032fbf090e3952ad7` | -| `theme.lua` | gruvbox.nvim | `154eb5ff5b96d0641307113fa385eaf0d36d9796` | - -This table goes stale the moment you bump a pin — treat it as a snapshot from -the last time this doc was written, not a live source of truth. `nvim-pack-lock.json` -is the actual source of truth. +Live in `lua/custom/plugins/init.lua`, in one `vim.pack.add {}` block at the +top of the file — that's the single source of truth for which custom plugins +exist and what they're pinned to, so there's no separate table here to go +stale. ## Optional: a fancier UI diff --git a/lua/custom/plugins/claude.lua b/lua/custom/plugins/claude.lua index d9873354585..3ca4c8a522d 100644 --- a/lua/custom/plugins/claude.lua +++ b/lua/custom/plugins/claude.lua @@ -1,6 +1,4 @@ --- snacks.nvim is already installed by lua/custom/plugins/snacks.lua -vim.pack.add { { src = 'https://github.com/coder/claudecode.nvim', version = '2390c6e45c4789072c293ac69de051d169668b29' } } - +-- installed via lua/custom/plugins/init.lua require('claudecode').setup { terminal_cmd = vim.fn.system('which claude'):gsub('\n', ''), } diff --git a/lua/custom/plugins/comment.lua b/lua/custom/plugins/comment.lua index 9211e133a10..05cf622ab9f 100644 --- a/lua/custom/plugins/comment.lua +++ b/lua/custom/plugins/comment.lua @@ -1,4 +1,4 @@ -vim.pack.add { { src = 'https://github.com/numToStr/Comment.nvim', version = 'e30b7f2008e52442154b66f7c519bfd2f1e32acb' } } +-- installed via lua/custom/plugins/init.lua require('Comment').setup() vim.keymap.set('n', '/', function() require('Comment.api').toggle.linewise.current() end, { desc = 'comment toggle' }) diff --git a/lua/custom/plugins/copilot-chat.lua b/lua/custom/plugins/copilot-chat.lua index 64dc3b2e243..3a8b84ef149 100644 --- a/lua/custom/plugins/copilot-chat.lua +++ b/lua/custom/plugins/copilot-chat.lua @@ -1,6 +1,4 @@ --- plenary.nvim is already installed by the core telescope setup -vim.pack.add { { src = 'https://github.com/CopilotC-Nvim/CopilotChat.nvim', version = '004ced055d8db59561cfcddc5f141ccd8d5a033b' } } - +-- installed via lua/custom/plugins/init.lua vim.keymap.set('n', 'ch', 'CopilotChatToggle', { noremap = true, silent = true }) require('CopilotChat').setup { diff --git a/lua/custom/plugins/copilot.lua b/lua/custom/plugins/copilot.lua index 70936168fd2..75e0241ed15 100644 --- a/lua/custom/plugins/copilot.lua +++ b/lua/custom/plugins/copilot.lua @@ -1,4 +1,4 @@ -vim.pack.add { { src = 'https://github.com/zbirenbaum/copilot.lua', version = '901a6c564abb45c7703401ecc6416bb0d15afd37' } } +-- installed via lua/custom/plugins/init.lua require('copilot').setup { suggestion = { enabled = true, diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 27290873a3f..5cd825aaa8c 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -3,6 +3,31 @@ -- -- See the kickstart.nvim README for more information +-- Every custom plugin's vim.pack.add() call lives here, pinned to an exact +-- commit, so nothing in this directory drifts on a plain `vim.pack.update()`. +-- This has to happen before the auto-discovery loop below, since that loop's +-- file order is unspecified - a plugin file's require()/setup() call would be +-- able to run before its own vim.pack.add() otherwise. Individual plugin +-- files below just do require(...).setup{} and keymaps. +-- +-- barbar.nvim reads this global as soon as it's added below, so it has to be +-- set here rather than in tabs.lua (which now runs after this point). +vim.g.barbar_auto_setup = false + +vim.pack.add { + { src = 'https://github.com/coder/claudecode.nvim', version = '2390c6e45c4789072c293ac69de051d169668b29' }, + { src = 'https://github.com/numToStr/Comment.nvim', version = 'e30b7f2008e52442154b66f7c519bfd2f1e32acb' }, + { src = 'https://github.com/CopilotC-Nvim/CopilotChat.nvim', version = '004ced055d8db59561cfcddc5f141ccd8d5a033b' }, + { src = 'https://github.com/zbirenbaum/copilot.lua', version = '901a6c564abb45c7703401ecc6416bb0d15afd37' }, + { src = 'https://github.com/MeanderingProgrammer/render-markdown.nvim', version = '4663eb3ecd538bd5062628fb6d95bbe6bdca78f6' }, + { src = 'https://github.com/nvim-neo-tree/neo-tree.nvim', version = 'f3f3bf73414e400cf9fc13fda50f00404a8f8ab1' }, + { src = 'https://github.com/MunifTanjim/nui.nvim', version = '10fc361835c856ba4233ef5ea135b919bf3dce97' }, + { src = 'https://github.com/tpope/vim-sleuth', version = 'be69bff86754b1aa5adcbb527d7fcd1635a84080' }, + { src = 'https://github.com/folke/snacks.nvim', version = '882c996cf28183f4d63640de0b4c02ec886d01f2' }, + { src = 'https://github.com/romgrk/barbar.nvim', version = '53b5a2f34b68875898f0531032fbf090e3952ad7' }, + { src = 'https://github.com/ellisonleao/gruvbox.nvim', version = '154eb5ff5b96d0641307113fa385eaf0d36d9796' }, +} + -- Iterate over all Lua files in the plugins directory and load them. -- `vim.fs.dir()` iteration order is unspecified and must not be relied upon. local plugins_dir = vim.fs.joinpath(vim.fn.stdpath 'config', 'lua', 'custom', 'plugins') diff --git a/lua/custom/plugins/markdown-render.lua b/lua/custom/plugins/markdown-render.lua index 4491de16644..cd275e95418 100644 --- a/lua/custom/plugins/markdown-render.lua +++ b/lua/custom/plugins/markdown-render.lua @@ -1,6 +1,4 @@ --- nvim-treesitter and mini.nvim are already installed by the core setup -vim.pack.add { { src = 'https://github.com/MeanderingProgrammer/render-markdown.nvim', version = '4663eb3ecd538bd5062628fb6d95bbe6bdca78f6' } } - +-- installed via lua/custom/plugins/init.lua ---@module 'render-markdown' ---@type render.md.UserConfig require('render-markdown').setup { diff --git a/lua/custom/plugins/neo-tree-config.lua b/lua/custom/plugins/neo-tree-config.lua index 321e1f3c7c2..8119a26734e 100644 --- a/lua/custom/plugins/neo-tree-config.lua +++ b/lua/custom/plugins/neo-tree-config.lua @@ -1,9 +1,5 @@ --- nvim-tree/nvim-web-devicons dependency is covered by mini.icons' devicons compat shim -vim.pack.add { - { src = 'https://github.com/nvim-neo-tree/neo-tree.nvim', version = 'f3f3bf73414e400cf9fc13fda50f00404a8f8ab1' }, - { src = 'https://github.com/MunifTanjim/nui.nvim', version = '10fc361835c856ba4233ef5ea135b919bf3dce97' }, -} - +-- installed via lua/custom/plugins/init.lua +-- (nvim-tree/nvim-web-devicons dependency is covered by mini.icons' devicons compat shim) local toggle_tree = function() vim.cmd 'Neotree toggle' vim.opt.relativenumber = true -- Use relative line numbers diff --git a/lua/custom/plugins/sleuth.lua b/lua/custom/plugins/sleuth.lua index 716823c2553..429d1a9ebba 100644 --- a/lua/custom/plugins/sleuth.lua +++ b/lua/custom/plugins/sleuth.lua @@ -1,2 +1,2 @@ --- Detects tabstop/shiftwidth automatically, no config needed -vim.pack.add { { src = 'https://github.com/tpope/vim-sleuth', version = 'be69bff86754b1aa5adcbb527d7fcd1635a84080' } } +-- Detects tabstop/shiftwidth automatically, no config needed. +-- Installed via lua/custom/plugins/init.lua diff --git a/lua/custom/plugins/snacks.lua b/lua/custom/plugins/snacks.lua index e3d5a80b1ef..b5c03cc85ef 100644 --- a/lua/custom/plugins/snacks.lua +++ b/lua/custom/plugins/snacks.lua @@ -1,5 +1,4 @@ -vim.pack.add { { src = 'https://github.com/folke/snacks.nvim', version = '882c996cf28183f4d63640de0b4c02ec886d01f2' } } - +-- installed via lua/custom/plugins/init.lua ---@type snacks.Config require('snacks').setup { bigfile = { enabled = true }, diff --git a/lua/custom/plugins/tabs.lua b/lua/custom/plugins/tabs.lua index 066b4d72ed4..7ce39f6dfd4 100644 --- a/lua/custom/plugins/tabs.lua +++ b/lua/custom/plugins/tabs.lua @@ -1,9 +1,5 @@ --- gitsigns.nvim is already installed by the core setup; devicons dependency --- is covered by mini.icons' devicons compat shim -vim.g.barbar_auto_setup = false - -vim.pack.add { { src = 'https://github.com/romgrk/barbar.nvim', version = '53b5a2f34b68875898f0531032fbf090e3952ad7' } } - +-- installed via lua/custom/plugins/init.lua (vim.g.barbar_auto_setup is also +-- set there, since it must be set before barbar.nvim's plugin/ files load) vim.keymap.set('n', '', 'BufferNext', { noremap = true, silent = true }) vim.keymap.set('n', '', 'BufferPrevious', { noremap = true, silent = true }) vim.keymap.set('n', 'xx', 'BufferClose', { noremap = true, silent = true }) diff --git a/lua/custom/plugins/theme.lua b/lua/custom/plugins/theme.lua index d5a5f54c8d5..81b04c5bc3e 100644 --- a/lua/custom/plugins/theme.lua +++ b/lua/custom/plugins/theme.lua @@ -1,8 +1,7 @@ --- vim.pack.add { 'https://github.com/AlexvZyl/nordic.nvim' } -- require('nordic').load() -- vim.cmd.colorscheme 'nordic' -vim.pack.add { { src = 'https://github.com/ellisonleao/gruvbox.nvim', version = '154eb5ff5b96d0641307113fa385eaf0d36d9796' } } +-- installed via lua/custom/plugins/init.lua require('gruvbox').setup { contrast = 'hard', transparent_mode = true, From 5d91d2a6bdab3598b8642ed8acaaa5380dc64e69 Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Wed, 9 Sep 2026 13:41:46 +0100 Subject: [PATCH 24/32] Drop needless commit pins from custom plugins, match core style Treats custom and core plugins identically: bare src, no version field, relying on nvim-pack-lock.json the same way kickstart's own plugins already do - nothing moves until vim.pack.update() is run deliberately. Keeps version = 'v3.x' on neo-tree.nvim since that's a genuine branch selection (its default branch is main), not a freeze. Co-Authored-By: Claude Sonnet 5 --- instructions.md | 51 ++++++++++++++++++------------------- lua/custom/plugins/init.lua | 32 +++++++++++++---------- nvim-pack-lock.json | 32 ++++++++--------------- 3 files changed, 55 insertions(+), 60 deletions(-) diff --git a/instructions.md b/instructions.md index 05a26e17aef..cf58d9bab16 100644 --- a/instructions.md +++ b/instructions.md @@ -4,19 +4,24 @@ This config uses Neovim's built-in `vim.pack`, not `lazy.nvim`. There's no `:Lazy` dashboard — updates go through `:lua vim.pack.update(...)`, which opens an interactive confirmation buffer instead of a floating UI. -Two categories of plugin here, updated differently: - -- **Core kickstart plugins** (`init.lua`, `lua/kickstart/plugins/*.lua`) — - no explicit commit pin from us, so they float on whatever - branch/tag/range upstream's `init.lua` specifies. +Every plugin here — core kickstart ones and custom ones alike — is added the +same way: bare `src`, no version pin, tracked via `nvim-pack-lock.json` like +everything else. Nothing moves until you deliberately run +`vim.pack.update(...)`, whether that's one plugin by name or everything at +once. `version` only shows up on a spec where it's a genuine branch/tag +selection (e.g. `neo-tree.nvim` defaults to `main`, but the stable line is the +separate `v3.x` branch — same idea as `nvim-treesitter`'s `version = 'main'` +in `init.lua`), never as a freeze mechanism. + +- **Core kickstart plugins** — added in `init.lua` and + `lua/kickstart/plugins/*.lua`, as upstream ships them. - **Custom plugins** — every `vim.pack.add()` call for them lives in one - place, `lua/custom/plugins/init.lua`, each pinned to an exact commit hash so - none of them move until you edit the hash yourself. The individual files - (`claude.lua`, `comment.lua`, etc.) only contain `require(...).setup{}` and - keymaps — they don't call `vim.pack.add` themselves. This is deliberate: - those files load in an unspecified order (see the auto-discovery loop - comment in `init.lua`), so the `add()` calls have to happen earlier, in the - one file guaranteed to run first. + place, `lua/custom/plugins/init.lua`. The individual files (`claude.lua`, + `comment.lua`, etc.) only contain `require(...).setup{}` and keymaps — they + don't call `vim.pack.add` themselves. This is deliberate: those files load + in an unspecified order (see the auto-discovery loop comment in `init.lua`), + so the `add()` calls have to happen earlier, in the one file guaranteed to + run first. ## Everyday commands @@ -53,22 +58,17 @@ Skip the confirmation buffer and apply immediately: - `gra` on a plugin — code actions: update / skip / delete it - `:write` — apply everything shown; `:quit` — discard -## Bumping one of our pinned custom plugins +## Switching a plugin's version/source, or freezing it -1. Edit its `version = ''` entry in `lua/custom/plugins/init.lua` - — set it to a newer commit, a tag, or a branch name if you want it to float. +1. Edit its spec (in `init.lua` or `lua/custom/plugins/init.lua`) — set + `version` to a commit, tag, branch, or a range like + `vim.version.range('1.*')` if you want a ceiling; set it to an exact commit + to freeze it in place. 2. Relaunch nvim (or `:restart`). This only updates the *target* in `nvim-pack-lock.json`, not the plugin on disk yet. 3. `:lua vim.pack.update({ 'PluginName' })`, review the diff, `:write` to apply (or `:quit` to discard — then revert your edit too, or it'll nag again). -## Freezing / unfreezing a plugin - -- **Freeze**: set `version` to its current revision (`rev` field from - `vim.pack.get()` or `nvim-pack-lock.json`), then restart. -- **Unfreeze**: set `version` to a branch name (e.g. `'main'`) or a range - (`vim.version.range('1.*')`), restart, then run `vim.pack.update()`. - ## Reverting a bad update ```sh @@ -97,12 +97,11 @@ Delete its entry from the `vim.pack.add {}` block in - Plugin checkouts (plain git repos): `~/.local/share/nvim/site/pack/core/opt//` - Docs: `:help vim.pack`, `:help vim.pack-examples`, `:help vim.pack-lockfile` -## Current custom plugin pins +## Custom plugin list -Live in `lua/custom/plugins/init.lua`, in one `vim.pack.add {}` block at the +Lives in `lua/custom/plugins/init.lua`, in one `vim.pack.add {}` block at the top of the file — that's the single source of truth for which custom plugins -exist and what they're pinned to, so there's no separate table here to go -stale. +exist and how each is specced, so there's no separate table here to go stale. ## Optional: a fancier UI diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 5cd825aaa8c..bbe599ed22a 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -3,8 +3,14 @@ -- -- See the kickstart.nvim README for more information --- Every custom plugin's vim.pack.add() call lives here, pinned to an exact --- commit, so nothing in this directory drifts on a plain `vim.pack.update()`. +-- Every custom plugin's vim.pack.add() call lives here, same as core kickstart +-- plugins: bare src, no version pin, tracked via nvim-pack-lock.json like +-- everything else. `version` is only set below where a plugin's default +-- branch isn't the one we actually want (e.g. neo-tree.nvim defaults to +-- `main`, but the stable line is the separate `v3.x` branch) - that's a +-- branch selection, not a freeze, same as nvim-treesitter's `version = 'main'` +-- in init.lua. +-- -- This has to happen before the auto-discovery loop below, since that loop's -- file order is unspecified - a plugin file's require()/setup() call would be -- able to run before its own vim.pack.add() otherwise. Individual plugin @@ -15,17 +21,17 @@ vim.g.barbar_auto_setup = false vim.pack.add { - { src = 'https://github.com/coder/claudecode.nvim', version = '2390c6e45c4789072c293ac69de051d169668b29' }, - { src = 'https://github.com/numToStr/Comment.nvim', version = 'e30b7f2008e52442154b66f7c519bfd2f1e32acb' }, - { src = 'https://github.com/CopilotC-Nvim/CopilotChat.nvim', version = '004ced055d8db59561cfcddc5f141ccd8d5a033b' }, - { src = 'https://github.com/zbirenbaum/copilot.lua', version = '901a6c564abb45c7703401ecc6416bb0d15afd37' }, - { src = 'https://github.com/MeanderingProgrammer/render-markdown.nvim', version = '4663eb3ecd538bd5062628fb6d95bbe6bdca78f6' }, - { src = 'https://github.com/nvim-neo-tree/neo-tree.nvim', version = 'f3f3bf73414e400cf9fc13fda50f00404a8f8ab1' }, - { src = 'https://github.com/MunifTanjim/nui.nvim', version = '10fc361835c856ba4233ef5ea135b919bf3dce97' }, - { src = 'https://github.com/tpope/vim-sleuth', version = 'be69bff86754b1aa5adcbb527d7fcd1635a84080' }, - { src = 'https://github.com/folke/snacks.nvim', version = '882c996cf28183f4d63640de0b4c02ec886d01f2' }, - { src = 'https://github.com/romgrk/barbar.nvim', version = '53b5a2f34b68875898f0531032fbf090e3952ad7' }, - { src = 'https://github.com/ellisonleao/gruvbox.nvim', version = '154eb5ff5b96d0641307113fa385eaf0d36d9796' }, + 'https://github.com/coder/claudecode.nvim', + 'https://github.com/numToStr/Comment.nvim', + 'https://github.com/CopilotC-Nvim/CopilotChat.nvim', + 'https://github.com/zbirenbaum/copilot.lua', + 'https://github.com/MeanderingProgrammer/render-markdown.nvim', + { src = 'https://github.com/nvim-neo-tree/neo-tree.nvim', version = 'v3.x' }, + 'https://github.com/MunifTanjim/nui.nvim', + 'https://github.com/tpope/vim-sleuth', + 'https://github.com/folke/snacks.nvim', + 'https://github.com/romgrk/barbar.nvim', + 'https://github.com/ellisonleao/gruvbox.nvim', } -- Iterate over all Lua files in the plugins directory and load them. diff --git a/nvim-pack-lock.json b/nvim-pack-lock.json index c4c32fc91dd..40ec99e104c 100644 --- a/nvim-pack-lock.json +++ b/nvim-pack-lock.json @@ -2,13 +2,11 @@ "plugins": { "Comment.nvim": { "rev": "e30b7f2008e52442154b66f7c519bfd2f1e32acb", - "src": "https://github.com/numToStr/Comment.nvim", - "version": "'e30b7f2008e52442154b66f7c519bfd2f1e32acb'" + "src": "https://github.com/numToStr/Comment.nvim" }, "CopilotChat.nvim": { "rev": "004ced055d8db59561cfcddc5f141ccd8d5a033b", - "src": "https://github.com/CopilotC-Nvim/CopilotChat.nvim", - "version": "'004ced055d8db59561cfcddc5f141ccd8d5a033b'" + "src": "https://github.com/CopilotC-Nvim/CopilotChat.nvim" }, "LuaSnip": { "rev": "642b0c595e11608b4c18219e93b88d7637af27bc", @@ -17,8 +15,7 @@ }, "barbar.nvim": { "rev": "53b5a2f34b68875898f0531032fbf090e3952ad7", - "src": "https://github.com/romgrk/barbar.nvim", - "version": "'53b5a2f34b68875898f0531032fbf090e3952ad7'" + "src": "https://github.com/romgrk/barbar.nvim" }, "blink.cmp": { "rev": "78336bc89ee5365633bcf754d93df01678b5c08f", @@ -27,8 +24,7 @@ }, "claudecode.nvim": { "rev": "2390c6e45c4789072c293ac69de051d169668b29", - "src": "https://github.com/coder/claudecode.nvim", - "version": "'2390c6e45c4789072c293ac69de051d169668b29'" + "src": "https://github.com/coder/claudecode.nvim" }, "conform.nvim": { "rev": "016802de402556da54c36bd7359b441266b01cdd", @@ -36,8 +32,7 @@ }, "copilot.lua": { "rev": "901a6c564abb45c7703401ecc6416bb0d15afd37", - "src": "https://github.com/zbirenbaum/copilot.lua", - "version": "'901a6c564abb45c7703401ecc6416bb0d15afd37'" + "src": "https://github.com/zbirenbaum/copilot.lua" }, "fidget.nvim": { "rev": "9e0201673e08e997e7cf52afca5565c70bd117f3", @@ -49,8 +44,7 @@ }, "gruvbox.nvim": { "rev": "154eb5ff5b96d0641307113fa385eaf0d36d9796", - "src": "https://github.com/ellisonleao/gruvbox.nvim", - "version": "'154eb5ff5b96d0641307113fa385eaf0d36d9796'" + "src": "https://github.com/ellisonleao/gruvbox.nvim" }, "guess-indent.nvim": { "rev": "84a4987ff36798c2fc1169cbaff67960aed9776f", @@ -79,12 +73,11 @@ "neo-tree.nvim": { "rev": "f3f3bf73414e400cf9fc13fda50f00404a8f8ab1", "src": "https://github.com/nvim-neo-tree/neo-tree.nvim", - "version": "'f3f3bf73414e400cf9fc13fda50f00404a8f8ab1'" + "version": "'v3.x'" }, "nui.nvim": { "rev": "10fc361835c856ba4233ef5ea135b919bf3dce97", - "src": "https://github.com/MunifTanjim/nui.nvim", - "version": "'10fc361835c856ba4233ef5ea135b919bf3dce97'" + "src": "https://github.com/MunifTanjim/nui.nvim" }, "nvim-autopairs": { "rev": "430522f95fe4fb7c511ec64f8c1a90cc6a66c05c", @@ -125,13 +118,11 @@ }, "render-markdown.nvim": { "rev": "4663eb3ecd538bd5062628fb6d95bbe6bdca78f6", - "src": "https://github.com/MeanderingProgrammer/render-markdown.nvim", - "version": "'4663eb3ecd538bd5062628fb6d95bbe6bdca78f6'" + "src": "https://github.com/MeanderingProgrammer/render-markdown.nvim" }, "snacks.nvim": { "rev": "882c996cf28183f4d63640de0b4c02ec886d01f2", - "src": "https://github.com/folke/snacks.nvim", - "version": "'882c996cf28183f4d63640de0b4c02ec886d01f2'" + "src": "https://github.com/folke/snacks.nvim" }, "telescope-fzf-native.nvim": { "rev": "b25b749b9db64d375d782094e2b9dce53ad53a40", @@ -151,8 +142,7 @@ }, "vim-sleuth": { "rev": "be69bff86754b1aa5adcbb527d7fcd1635a84080", - "src": "https://github.com/tpope/vim-sleuth", - "version": "'be69bff86754b1aa5adcbb527d7fcd1635a84080'" + "src": "https://github.com/tpope/vim-sleuth" }, "which-key.nvim": { "rev": "3aab2147e74890957785941f0c1ad87d0a44c15a", From 320652e1d4348242609c4e65963f0e12d5aeb9e9 Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Fri, 16 Oct 2026 12:12:22 +0100 Subject: [PATCH 25/32] Mirror vim.notify into :messages when snacks notifier is enabled Co-Authored-By: Claude Sonnet 5.5 --- lua/custom/plugins/snacks.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lua/custom/plugins/snacks.lua b/lua/custom/plugins/snacks.lua index b5c03cc85ef..bef19dd229d 100644 --- a/lua/custom/plugins/snacks.lua +++ b/lua/custom/plugins/snacks.lua @@ -62,3 +62,10 @@ require('snacks').setup { statuscolumn = { enabled = true }, words = { enabled = true }, } + +-- snacks replaces vim.notify, so nothing reaches :messages; mirror it there +local snacks_notify = vim.notify +vim.notify = function(msg, level, opts) + vim.api.nvim_echo({ { tostring(msg) } }, true, {}) + return snacks_notify(msg, level, opts) +end From 77c77356d7417a8fde88325f8eec7aff53a2835a Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Fri, 16 Oct 2026 13:31:54 +0100 Subject: [PATCH 26/32] Mirror notifications via notifier.filter instead of patching notify Patching vim.notify was dropped after the first call, since snacks' stub reassigns it. filter is a supported hook and needs no monkeypatching. Co-Authored-By: Claude Sonnet 5.5 --- lua/custom/plugins/snacks.lua | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lua/custom/plugins/snacks.lua b/lua/custom/plugins/snacks.lua index bef19dd229d..47f50f206b9 100644 --- a/lua/custom/plugins/snacks.lua +++ b/lua/custom/plugins/snacks.lua @@ -55,17 +55,18 @@ require('snacks').setup { indent = { enabled = true }, input = { enabled = true }, picker = { enabled = true }, - notifier = { enabled = true }, + notifier = { + enabled = true, + -- snacks replaces vim.notify, so nothing reaches :messages; mirror it there. + -- filter runs once per notification; always returns true so nothing is hidden. + filter = function(notif) + vim.api.nvim_echo({ { notif.msg } }, true, {}) + return true + end, + }, quickfile = { enabled = true }, scope = { enabled = true }, scroll = { enabled = true }, statuscolumn = { enabled = true }, words = { enabled = true }, } - --- snacks replaces vim.notify, so nothing reaches :messages; mirror it there -local snacks_notify = vim.notify -vim.notify = function(msg, level, opts) - vim.api.nvim_echo({ { tostring(msg) } }, true, {}) - return snacks_notify(msg, level, opts) -end From 253c387c7ed6f3149f1778e2092774a2e267c7c3 Mon Sep 17 00:00:00 2001 From: Nick Krichevsky Date: Tue, 8 Sep 2026 14:09:05 -0400 Subject: [PATCH 27/32] Check if the buffer is valid when trying to attach TS --- init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.lua b/init.lua index ceeba726dee..8436e45e9e2 100644 --- a/init.lua +++ b/init.lua @@ -981,6 +981,9 @@ do ---@param buf integer ---@param language string local function treesitter_try_attach(buf, language) + -- Check if the buffer is valid (might not be after install completes) + if not vim.api.nvim_buf_is_valid(buf) then return end + -- Check if a parser exists and load it if not vim.treesitter.language.add(language) then return end -- Enable syntax highlighting and other treesitter features From 9d3cfe80b07325c0754d0b572cfc939b6dac7160 Mon Sep 17 00:00:00 2001 From: Nick Krichevsky Date: Tue, 8 Sep 2026 14:15:08 -0400 Subject: [PATCH 28/32] Install the language first --- init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 8436e45e9e2..826f2ed1664 100644 --- a/init.lua +++ b/init.lua @@ -981,11 +981,12 @@ do ---@param buf integer ---@param language string local function treesitter_try_attach(buf, language) + -- Check if a parser exists and load it + if not vim.treesitter.language.add(language) then return end + -- Check if the buffer is valid (might not be after install completes) if not vim.api.nvim_buf_is_valid(buf) then return end - -- Check if a parser exists and load it - if not vim.treesitter.language.add(language) then return end -- Enable syntax highlighting and other treesitter features vim.treesitter.start(buf, language) From 955752375dca1eef083e4d927679538e58acd02c Mon Sep 17 00:00:00 2001 From: orip Date: Mon, 14 Sep 2026 17:52:52 +0300 Subject: [PATCH 29/32] Small formatting fixes --- init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 826f2ed1664..08934b2dc7e 100644 --- a/init.lua +++ b/init.lua @@ -324,8 +324,8 @@ do }) end ----Because most plugins are hosted on GitHub, you can use the helper ----function to have less repetition in the following sections. +--- Because most plugins are hosted on GitHub, you can use the helper +--- function to have less repetition in the following sections. ---@param repo string ---@return string local function gh(repo) return 'https://github.com/' .. repo end @@ -527,7 +527,7 @@ do -- Telescope picker. This is really useful to discover what Telescope can -- do as well as how to actually do it! - ---@type (string|vim.pack.Spec)[] + ---@type (string | vim.pack.Spec)[] local telescope_plugins = { gh 'nvim-lua/plenary.nvim', gh 'nvim-telescope/telescope.nvim', From 51014806b7893da7a7e18c2cb30a4f1c28e23329 Mon Sep 17 00:00:00 2001 From: Tyce Herrman Date: Wed, 30 Sep 2026 10:37:23 -0400 Subject: [PATCH 30/32] Check buffer validity before loading Treesitter parser --- init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 08934b2dc7e..93e01c81929 100644 --- a/init.lua +++ b/init.lua @@ -981,12 +981,12 @@ do ---@param buf integer ---@param language string local function treesitter_try_attach(buf, language) - -- Check if a parser exists and load it - if not vim.treesitter.language.add(language) then return end - -- Check if the buffer is valid (might not be after install completes) if not vim.api.nvim_buf_is_valid(buf) then return end + -- Check if a parser exists and load it + if not vim.treesitter.language.add(language) then return end + -- Enable syntax highlighting and other treesitter features vim.treesitter.start(buf, language) From 9298d8f8f4a582c4a68572c6d7b89f5f10a74db1 Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Fri, 16 Oct 2026 14:11:39 +0100 Subject: [PATCH 31/32] Fix invalid neo-tree window position Co-Authored-By: Claude Sonnet 5.5 --- lua/custom/plugins/neo-tree-config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/custom/plugins/neo-tree-config.lua b/lua/custom/plugins/neo-tree-config.lua index 8119a26734e..b3d436f697f 100644 --- a/lua/custom/plugins/neo-tree-config.lua +++ b/lua/custom/plugins/neo-tree-config.lua @@ -17,7 +17,7 @@ require('neo-tree').setup { }, filesystem = { window = { - position = 'default', + position = 'left', mappings = { ['\\'] = 'close_window', }, From 888ca59b2787bd533ed5e384431e38c209fd02ca Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Fri, 16 Oct 2026 14:30:25 +0100 Subject: [PATCH 32/32] Switch colorscheme to koda-dark Co-Authored-By: Claude Sonnet 5.5 --- lua/custom/plugins/init.lua | 1 + lua/custom/plugins/theme.lua | 30 +++++++++++------------------- nvim-pack-lock.json | 8 ++++++++ 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index bbe599ed22a..112da8e7100 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -32,6 +32,7 @@ vim.pack.add { 'https://github.com/folke/snacks.nvim', 'https://github.com/romgrk/barbar.nvim', 'https://github.com/ellisonleao/gruvbox.nvim', + 'https://github.com/oskarnurm/koda.nvim', } -- Iterate over all Lua files in the plugins directory and load them. diff --git a/lua/custom/plugins/theme.lua b/lua/custom/plugins/theme.lua index 81b04c5bc3e..5a7c40de14c 100644 --- a/lua/custom/plugins/theme.lua +++ b/lua/custom/plugins/theme.lua @@ -1,21 +1,13 @@ --- require('nordic').load() --- vim.cmd.colorscheme 'nordic' - -- installed via lua/custom/plugins/init.lua -require('gruvbox').setup { - contrast = 'hard', - transparent_mode = true, - overrides = { - NormalFloat = { bg = '#1d2021' }, - FloatBorder = { bg = '#1d2021' }, - TelescopeNormal = { bg = '#1d2021' }, - TelescopeBorder = { bg = '#1d2021' }, - TelescopePromptNormal = { bg = '#1d2021' }, - TelescopePromptBorder = { bg = '#1d2021' }, - TelescopeResultsNormal = { bg = '#1d2021' }, - TelescopeResultsBorder = { bg = '#1d2021' }, - TelescopePreviewNormal = { bg = '#1d2021' }, - TelescopePreviewBorder = { bg = '#1d2021' }, - }, +local variable = '#e07a78' + +require('koda').setup { + colors = { keyword = '#f5c542', func = '#7fbfe0' }, + -- koda has no palette key for variables + on_highlights = function(hl) + for _, g in ipairs { '@variable', '@variable.parameter', '@variable.member' } do + hl[g] = { fg = variable } + end + end, } -vim.cmd.colorscheme 'gruvbox' +vim.cmd.colorscheme 'koda-dark' diff --git a/nvim-pack-lock.json b/nvim-pack-lock.json index 40ec99e104c..53ee70d5819 100644 --- a/nvim-pack-lock.json +++ b/nvim-pack-lock.json @@ -50,6 +50,10 @@ "rev": "84a4987ff36798c2fc1169cbaff67960aed9776f", "src": "https://github.com/NMAC427/guess-indent.nvim" }, + "koda.nvim": { + "rev": "25a5c98ca2f6bb0b69f5e2654a78f0d7c7e0721d", + "src": "https://github.com/oskarnurm/koda.nvim" + }, "mason-lspconfig.nvim": { "rev": "5d32a9b8de9f90466797a740edb0fb4b3c27e423", "src": "https://github.com/mason-org/mason-lspconfig.nvim" @@ -112,6 +116,10 @@ "src": "https://github.com/nvim-treesitter/nvim-treesitter", "version": "'main'" }, + "oxocarbon.nvim": { + "rev": "cd6523a0836d6e8ee823d343149fd06c7b71fdde", + "src": "https://github.com/nyoom-engineering/oxocarbon.nvim" + }, "plenary.nvim": { "rev": "74b06c6c75e4eeb3108ec01852001636d85a932b", "src": "https://github.com/nvim-lua/plenary.nvim"