From f9230250d939b428723160bdf889efb74a513ba3 Mon Sep 17 00:00:00 2001 From: Brian Henderson Date: Thu, 29 May 2025 11:55:54 +0200 Subject: [PATCH 01/14] enable plugins and add customizations --- init.lua | 47 ++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/init.lua b/init.lua index b98ffc6198a..395d0111cc2 100644 --- a/init.lua +++ b/init.lua @@ -698,6 +698,26 @@ require('lazy').setup({ }, }, }, + + -- my customizations + clangd = {}, + gopls = {}, + pyright = { + settings = { + pyright = { + -- Using Ruff's import organizer + disableOrganizeImports = true, + }, + python = { + analysis = { + -- Ignore all files for analysis to exclusively use Ruff for linting + ignore = { '*' }, + }, + }, + }, + }, + ts_ls = {}, + ruff = {}, } -- Ensure the servers and tools above are installed @@ -716,6 +736,13 @@ require('lazy').setup({ local ensure_installed = vim.tbl_keys(servers or {}) vim.list_extend(ensure_installed, { 'stylua', -- Used to format Lua code + + -- my customizations + 'markdownlint', + 'mypy', + 'jq', + 'prettier', + 'codelldb', }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } @@ -773,6 +800,12 @@ require('lazy').setup({ -- -- You can use 'stop_after_first' to run the first available formatter from the list -- javascript = { "prettierd", "prettier", stop_after_first = true }, + + -- my customizations + json = { 'jq' }, + sarif = { 'jq' }, + python = { 'ruff' }, + html = { 'prettier' }, }, }, }, @@ -973,18 +1006,18 @@ 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.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.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 -- 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! From 6d7321588e4295a4ce7e638ea6f134ae6a619ddc Mon Sep 17 00:00:00 2001 From: Brian Henderson Date: Thu, 29 May 2025 11:56:32 +0200 Subject: [PATCH 02/14] add custom plugins --- lua/custom/plugins/colorscheme.lua | 9 ++++++ lua/custom/plugins/copilot.lua | 12 +++++++ lua/custom/plugins/dap-projects.lua | 10 ++++++ lua/custom/plugins/harpoon.lua | 50 +++++++++++++++++++++++++++++ lua/custom/plugins/init.lua | 10 ++++++ lua/custom/plugins/lspsaga.lua | 17 ++++++++++ lua/custom/plugins/markdown.lua | 9 ++++++ lua/custom/plugins/marks.lua | 14 ++++++++ lua/custom/plugins/rustaceanvim.lua | 5 +++ lua/custom/plugins/sarif.lua | 3 ++ 10 files changed, 139 insertions(+) create mode 100644 lua/custom/plugins/colorscheme.lua create mode 100644 lua/custom/plugins/copilot.lua create mode 100644 lua/custom/plugins/dap-projects.lua create mode 100644 lua/custom/plugins/harpoon.lua create mode 100644 lua/custom/plugins/lspsaga.lua create mode 100644 lua/custom/plugins/markdown.lua create mode 100644 lua/custom/plugins/marks.lua create mode 100644 lua/custom/plugins/rustaceanvim.lua create mode 100644 lua/custom/plugins/sarif.lua diff --git a/lua/custom/plugins/colorscheme.lua b/lua/custom/plugins/colorscheme.lua new file mode 100644 index 00000000000..f04e2738f4a --- /dev/null +++ b/lua/custom/plugins/colorscheme.lua @@ -0,0 +1,9 @@ +return { + 'maxmx03/solarized.nvim', + lazy = false, + priority = 999, + config = function() + vim.o.background = 'dark' -- or 'light' + vim.cmd.colorscheme 'solarized' + end, +} diff --git a/lua/custom/plugins/copilot.lua b/lua/custom/plugins/copilot.lua new file mode 100644 index 00000000000..0c4d482c6c5 --- /dev/null +++ b/lua/custom/plugins/copilot.lua @@ -0,0 +1,12 @@ +return { + 'zbirenbaum/copilot.lua', + config = function() + require('copilot').setup {} + vim.api.nvim_create_autocmd('User', { + pattern = 'BlinkCmpMenuOpen', + callback = function() + vim.b.copilot_suggestion_hidden = true + end, + }) + end, +} diff --git a/lua/custom/plugins/dap-projects.lua b/lua/custom/plugins/dap-projects.lua new file mode 100644 index 00000000000..48d52805357 --- /dev/null +++ b/lua/custom/plugins/dap-projects.lua @@ -0,0 +1,10 @@ +return { + 'ldelossa/nvim-dap-projects', + dependencies = { + 'mfussenegger/nvim-dap', + }, + config = function() + local dap_projects = require 'nvim-dap-projects' + dap_projects.search_project_config() + end +} diff --git a/lua/custom/plugins/harpoon.lua b/lua/custom/plugins/harpoon.lua new file mode 100644 index 00000000000..7fbd87b23ef --- /dev/null +++ b/lua/custom/plugins/harpoon.lua @@ -0,0 +1,50 @@ +return { + "ThePrimeagen/harpoon", + branch = "harpoon2", + dependencies = { "nvim-lua/plenary.nvim" }, + config = function() + local harpoon = require 'harpoon' + harpoon:setup {} + + local conf = require('telescope.config').values + local function toggle_telescope(harpoon_files) + local finder = function() + local paths = {} + for _, item in ipairs(harpoon_files.items) do + table.insert(paths, item.value) + end + + return require('telescope.finders').new_table { + results = paths, + } + end + + require('telescope.pickers') + .new({}, { + prompt_title = 'Harpoon', + finder = finder(), + previewer = conf.file_previewer {}, + sorter = conf.generic_sorter {}, + attach_mappings = function(prompt_bufnr, map) + map('i', '', function() + local state = require 'telescope.actions.state' + local selected_entry = state.get_selected_entry() + local current_picker = state.get_current_picker(prompt_bufnr) + + table.remove(harpoon_files.items, selected_entry.index) + current_picker:refresh(finder()) + end) + return true + end, + }) + :find() + end + + vim.keymap.set('n', 'a', function() + harpoon:list():add() + end, { desc = 'Harpoon: [a]dd to list' }) + vim.keymap.set('n', '', function() + toggle_telescope(harpoon:list()) + end, { desc = 'Harpoon: open list' }) + end +} diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8d7a..7cdfafbc2dc 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,14 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information +vim.g.have_nerd_font = true +vim.o.relativenumber = true + +vim.keymap.set('n', '', '', { desc = 'Move focus to the left window' }) +vim.keymap.set('n', '', '', { desc = 'Move focus to the right window' }) +vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) +vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) + +require('guess-indent').setup {} + return {} diff --git a/lua/custom/plugins/lspsaga.lua b/lua/custom/plugins/lspsaga.lua new file mode 100644 index 00000000000..21d8749532c --- /dev/null +++ b/lua/custom/plugins/lspsaga.lua @@ -0,0 +1,17 @@ +return { + 'nvimdev/lspsaga.nvim', + config = function() + require('lspsaga').setup({ + lightbulb = { + enabled = true, + sign = true, + virtual_text = false, + sign_priority = 20, + }, + }) + end, + dependencies = { + 'nvim-treesitter/nvim-treesitter', + 'nvim-tree/nvim-web-devicons', + }, +} diff --git a/lua/custom/plugins/markdown.lua b/lua/custom/plugins/markdown.lua new file mode 100644 index 00000000000..76aed403dc7 --- /dev/null +++ b/lua/custom/plugins/markdown.lua @@ -0,0 +1,9 @@ +return { + 'MeanderingProgrammer/render-markdown.nvim', + dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite + -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/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 = {}, +} diff --git a/lua/custom/plugins/marks.lua b/lua/custom/plugins/marks.lua new file mode 100644 index 00000000000..d0827a28054 --- /dev/null +++ b/lua/custom/plugins/marks.lua @@ -0,0 +1,14 @@ +return { + 'chentoast/marks.nvim', + keys = function(_, keys) + local marks = require 'marks' + return { + { 'm', marks.set, { desc = '[m]arks set' } }, + { 'gn', marks.next, { desc = 'marks: [g]o to [n]ext mark' } }, + { 'mp', marks.preview, { desc = '[m]arks: [p]review' } }, + { 'md', marks.delete_buf, { desc = '[m]arks: [d]elete all marks' } }, + unpack(keys), + } + end, + opts = {}, +} diff --git a/lua/custom/plugins/rustaceanvim.lua b/lua/custom/plugins/rustaceanvim.lua new file mode 100644 index 00000000000..46c4c82f1d9 --- /dev/null +++ b/lua/custom/plugins/rustaceanvim.lua @@ -0,0 +1,5 @@ +return { + 'mrcjkb/rustaceanvim', + version = '^5', -- Recommended + lazy = false, -- This plugin is already lazy +} diff --git a/lua/custom/plugins/sarif.lua b/lua/custom/plugins/sarif.lua new file mode 100644 index 00000000000..004970f0ba5 --- /dev/null +++ b/lua/custom/plugins/sarif.lua @@ -0,0 +1,3 @@ +return { + 'fguisso/sfer.nvim', +} From 1b1837be48a5fc8d46d0d490ff52f83c270b318f Mon Sep 17 00:00:00 2001 From: Brian Henderson Date: Tue, 7 Oct 2025 09:43:14 +0200 Subject: [PATCH 03/14] additional customizations --- init.lua | 7 +++++-- lua/custom/plugins/colorscheme.lua | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 395d0111cc2..7e9ee387f39 100644 --- a/init.lua +++ b/init.lua @@ -804,8 +804,11 @@ require('lazy').setup({ -- my customizations json = { 'jq' }, sarif = { 'jq' }, - python = { 'ruff' }, + python = { 'ruff_format', 'ruff_organize_imports' }, html = { 'prettier' }, + javascript = { 'prettier' }, + typescript = { 'prettier' }, + typescriptreact = { 'prettier' }, }, }, }, @@ -868,7 +871,7 @@ require('lazy').setup({ -- : Toggle signature help -- -- See :h blink-cmp-config-keymap for defining your own keymap - preset = 'default', + preset = 'super-tab', -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see: -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps diff --git a/lua/custom/plugins/colorscheme.lua b/lua/custom/plugins/colorscheme.lua index f04e2738f4a..f454843b0fb 100644 --- a/lua/custom/plugins/colorscheme.lua +++ b/lua/custom/plugins/colorscheme.lua @@ -5,5 +5,11 @@ return { config = function() vim.o.background = 'dark' -- or 'light' vim.cmd.colorscheme 'solarized' + vim.keymap.set('n', 'Scl', function() + vim.o.background = 'light' + end, { desc = '[S]et the [c]olorscheme background [l]ight' }) + vim.keymap.set('n', 'Scd', function() + vim.o.background = 'dark' + end, { desc = '[S]et the [c]olorscheme background [d]ark' }) end, } From 4c2e3323595d737aa5f2b48c4bec7dee5f4395a3 Mon Sep 17 00:00:00 2001 From: Brian Henderson Date: Fri, 5 Dec 2025 01:04:40 +0100 Subject: [PATCH 04/14] color toggle and file name helper --- init.lua | 2 ++ lua/custom/plugins/colorscheme.lua | 13 +++++++------ lua/custom/plugins/init.lua | 31 ++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 6 deletions(-) diff --git a/init.lua b/init.lua index 7e9ee387f39..f25917a0f04 100644 --- a/init.lua +++ b/init.lua @@ -809,6 +809,8 @@ require('lazy').setup({ javascript = { 'prettier' }, typescript = { 'prettier' }, typescriptreact = { 'prettier' }, + markdown = { 'markdownlint' }, + yaml = { 'prettier' }, }, }, }, diff --git a/lua/custom/plugins/colorscheme.lua b/lua/custom/plugins/colorscheme.lua index f454843b0fb..5aacdcbf4fa 100644 --- a/lua/custom/plugins/colorscheme.lua +++ b/lua/custom/plugins/colorscheme.lua @@ -5,11 +5,12 @@ return { config = function() vim.o.background = 'dark' -- or 'light' vim.cmd.colorscheme 'solarized' - vim.keymap.set('n', 'Scl', function() - vim.o.background = 'light' - end, { desc = '[S]et the [c]olorscheme background [l]ight' }) - vim.keymap.set('n', 'Scd', function() - vim.o.background = 'dark' - end, { desc = '[S]et the [c]olorscheme background [d]ark' }) + vim.keymap.set('n', 'tc', function() + if vim.o.background == 'light' then + vim.o.background = 'dark' + else + vim.o.background = 'light' + end + end, { desc = '[T]oggle the [c]olorscheme background' }) end, } diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 7cdfafbc2dc..e386b73cd71 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -10,6 +10,37 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the right win vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) +local function copy_path(path_type) + local path_to_copy + local msg_suffix + + if path_type == 'full' then + path_to_copy = vim.fn.expand '%:p' + msg_suffix = 'full path' + elseif path_type == 'relative' then + path_to_copy = vim.fn.expand '%:.' + msg_suffix = 'relative path' + elseif path_type == 'filename' then + path_to_copy = vim.fn.expand '%:t' + msg_suffix = 'filename' + else + print 'Invalid path type specified for copy_path' + return + end + + vim.fn.setreg('+', path_to_copy) + print('Copied ' .. msg_suffix .. ' to clipboard') +end +vim.keymap.set('n', 'cp', function() + copy_path 'full' +end, { desc = 'Copy full file path' }) +vim.keymap.set('n', 'cr', function() + copy_path 'relative' +end, { desc = 'Copy relative file path' }) +vim.keymap.set('n', 'cf', function() + copy_path 'filename' +end, { desc = 'Copy filename' }) + require('guess-indent').setup {} return {} From e3ce7e4243b648ea30234f995b58f7f7c706b808 Mon Sep 17 00:00:00 2001 From: Brian Henderson Date: Tue, 9 Dec 2025 13:56:32 +0100 Subject: [PATCH 05/14] add ufo and update --- lua/custom/plugins/copilot.lua | 12 ---------- lua/custom/plugins/init.lua | 13 ++++++++++ lua/custom/plugins/rustaceanvim.lua | 2 +- lua/custom/plugins/trouble.lua | 37 +++++++++++++++++++++++++++++ lua/custom/plugins/ufo.lua | 26 ++++++++++++++++++++ 5 files changed, 77 insertions(+), 13 deletions(-) delete mode 100644 lua/custom/plugins/copilot.lua create mode 100644 lua/custom/plugins/trouble.lua create mode 100644 lua/custom/plugins/ufo.lua diff --git a/lua/custom/plugins/copilot.lua b/lua/custom/plugins/copilot.lua deleted file mode 100644 index 0c4d482c6c5..00000000000 --- a/lua/custom/plugins/copilot.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - 'zbirenbaum/copilot.lua', - config = function() - require('copilot').setup {} - vim.api.nvim_create_autocmd('User', { - pattern = 'BlinkCmpMenuOpen', - callback = function() - vim.b.copilot_suggestion_hidden = true - end, - }) - end, -} diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index e386b73cd71..d04f2891f76 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -43,4 +43,17 @@ end, { desc = 'Copy filename' }) require('guess-indent').setup {} +local lspconfig = require 'lspconfig' +lspconfig.ruby_lsp.setup { + init_options = { + formatter = 'standard', + linters = { 'standard' }, + addonSettings = { + ['Ruby LSP Rails}'] = { + enablePendingMigrtationsPrompt = false, + }, + }, + }, +} + return {} diff --git a/lua/custom/plugins/rustaceanvim.lua b/lua/custom/plugins/rustaceanvim.lua index 46c4c82f1d9..eb83332c81d 100644 --- a/lua/custom/plugins/rustaceanvim.lua +++ b/lua/custom/plugins/rustaceanvim.lua @@ -1,5 +1,5 @@ return { 'mrcjkb/rustaceanvim', - version = '^5', -- Recommended + version = '^6', -- Recommended lazy = false, -- This plugin is already lazy } diff --git a/lua/custom/plugins/trouble.lua b/lua/custom/plugins/trouble.lua new file mode 100644 index 00000000000..d0578c9f404 --- /dev/null +++ b/lua/custom/plugins/trouble.lua @@ -0,0 +1,37 @@ +return { + 'folke/trouble.nvim', + opts = {}, -- for default options, refer to the configuration section for custom setup. + cmd = 'Trouble', + keys = { + { + 'xx', + 'Trouble diagnostics toggle', + desc = 'Diagnostics (Trouble)', + }, + { + 'xX', + 'Trouble diagnostics toggle filter.buf=0', + desc = 'Buffer Diagnostics (Trouble)', + }, + { + 'cs', + 'Trouble symbols toggle focus=false', + desc = 'Symbols (Trouble)', + }, + { + 'cl', + 'Trouble lsp toggle focus=false win.position=right', + desc = 'LSP Definitions / references / ... (Trouble)', + }, + { + 'xL', + 'Trouble loclist toggle', + desc = 'Location List (Trouble)', + }, + { + 'xQ', + 'Trouble qflist toggle', + desc = 'Quickfix List (Trouble)', + }, + }, +} diff --git a/lua/custom/plugins/ufo.lua b/lua/custom/plugins/ufo.lua new file mode 100644 index 00000000000..f9e368300a5 --- /dev/null +++ b/lua/custom/plugins/ufo.lua @@ -0,0 +1,26 @@ +return { + 'kevinhwang91/nvim-ufo', + config = function() + vim.o.foldcolumn = '1' -- '0' is not bad + vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value + vim.o.foldlevelstart = 99 + vim.o.foldenable = true + + vim.o.fillchars = 'eob: ,fold: ,foldopen:,foldsep: ,foldclose:' + local capabilities = vim.lsp.protocol.make_client_capabilities() + capabilities.textDocument.foldingRange = { + dynamicRegistration = false, + lineFoldingOnly = true, + } + local language_servers = vim.lsp.get_clients() -- or list servers manually like {'gopls', 'clangd'} + for _, ls in ipairs(language_servers) do + require('lspconfig')[ls].setup { + capabilities = capabilities, + -- you can add other fields for setting up lsp server in this table + } + end + require('ufo').setup {} + end, + + dependencies = { 'kevinhwang91/promise-async' }, +} From 3cb53f9cf13ffec80a0f752e02c07936fa9e7419 Mon Sep 17 00:00:00 2001 From: Brian Henderson Date: Sun, 21 Dec 2025 13:55:56 +0100 Subject: [PATCH 06/14] new sarif viewer and add vscode-diff --- lua/custom/plugins/sarif.lua | 9 +++- lua/custom/plugins/vscode-diff.lua | 66 ++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 lua/custom/plugins/vscode-diff.lua diff --git a/lua/custom/plugins/sarif.lua b/lua/custom/plugins/sarif.lua index 004970f0ba5..2cafa8cbfec 100644 --- a/lua/custom/plugins/sarif.lua +++ b/lua/custom/plugins/sarif.lua @@ -1,3 +1,10 @@ +-- return { +-- 'fguisso/sfer.nvim', +-- } +vim.keymap.set('n', 'fs', 'SarifView') +vim.keymap.set('n', '', 'SarifCodeFlowNext') +vim.keymap.set('n', '', 'SarifCodeFlowPrev') + return { - 'fguisso/sfer.nvim', + 'bhendo/sarif.nvim', } diff --git a/lua/custom/plugins/vscode-diff.lua b/lua/custom/plugins/vscode-diff.lua new file mode 100644 index 00000000000..efcd4c56b85 --- /dev/null +++ b/lua/custom/plugins/vscode-diff.lua @@ -0,0 +1,66 @@ +return { + 'esmuellert/vscode-diff.nvim', + dependencies = { 'MunifTanjim/nui.nvim' }, + cmd = 'CodeDiff', + config = function() + require('vscode-diff').setup { + -- Highlight configuration + highlights = { + -- Line-level: accepts highlight group names or hex colors (e.g., "#2ea043") + line_insert = 'DiffAdd', -- Line-level insertions + line_delete = 'DiffDelete', -- Line-level deletions + + -- Character-level: accepts highlight group names or hex colors + -- If specified, these override char_brightness calculation + char_insert = nil, -- Character-level insertions (nil = auto-derive) + char_delete = nil, -- Character-level deletions (nil = auto-derive) + + -- Brightness multiplier (only used when char_insert/char_delete are nil) + -- nil = auto-detect based on background (1.4 for dark, 0.92 for light) + char_brightness = nil, -- Auto-adjust based on your colorscheme + }, + + -- Diff view behavior + diff = { + disable_inlay_hints = true, -- Disable inlay hints in diff windows for cleaner view + max_computation_time_ms = 5000, -- Maximum time for diff computation (VSCode default) + }, + + -- Explorer panel configuration + explorer = { + position = 'left', -- "left" or "bottom" + width = 40, -- Width when position is "left" (columns) + height = 15, -- Height when position is "bottom" (lines) + indent_markers = true, -- Show indent markers in tree view (│, ├, └) + icons = { + folder_closed = '', -- Nerd Font folder icon (customize as needed) + folder_open = '', -- Nerd Font folder-open icon + }, + view_mode = 'list', -- "list" or "tree" + file_filter = { + ignore = {}, -- Glob patterns to hide (e.g., {"*.lock", "dist/*"}) + }, + }, + + -- Keymaps in diff view + keymaps = { + view = { + quit = 'q', -- Close diff tab + toggle_explorer = 'b', -- Toggle explorer visibility (explorer mode only) + next_hunk = ']c', -- Jump to next change + prev_hunk = '[c', -- Jump to previous change + next_file = ']f', -- Next file in explorer mode + prev_file = '[f', -- Previous file in explorer mode + diff_get = 'do', -- Get change from other buffer (like vimdiff) + diff_put = 'dp', -- Put change to other buffer (like vimdiff) + }, + explorer = { + select = '', -- Open diff for selected file + hover = 'K', -- Show file diff preview + refresh = 'R', -- Refresh git status + toggle_view_mode = 'i', -- Toggle between 'list' and 'tree' views + }, + }, + } + end, +} From bde2c26886f189ae5a8fc025dd46e9e2289dbe66 Mon Sep 17 00:00:00 2001 From: Brian Henderson Date: Tue, 23 Dec 2025 10:36:52 +0100 Subject: [PATCH 07/14] fix deprecated framework use --- init.lua | 4 +++- lua/custom/plugins/init.lua | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/init.lua b/init.lua index f25917a0f04..b2447db460d 100644 --- a/init.lua +++ b/init.lua @@ -756,7 +756,9 @@ require('lazy').setup({ -- 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) + -- require('lspconfig')[server_name].setup(server) + vim.lsp.config(server_name, server) + vim.lsp.enable(server_name) end, }, } diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index d04f2891f76..721156b2a15 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -43,17 +43,17 @@ end, { desc = 'Copy filename' }) require('guess-indent').setup {} -local lspconfig = require 'lspconfig' -lspconfig.ruby_lsp.setup { - init_options = { - formatter = 'standard', - linters = { 'standard' }, - addonSettings = { - ['Ruby LSP Rails}'] = { - enablePendingMigrtationsPrompt = false, - }, - }, - }, -} +-- local lspconfig = require 'lspconfig' +-- lspconfig.ruby_lsp.setup { +-- init_options = { +-- formatter = 'standard', +-- linters = { 'standard' }, +-- addonSettings = { +-- ['Ruby LSP Rails}'] = { +-- enablePendingMigrtationsPrompt = false, +-- }, +-- }, +-- }, +-- } return {} From 1411e6af5cdc223a4bc20598845435606356d27e Mon Sep 17 00:00:00 2001 From: Brian Henderson Date: Thu, 12 Feb 2026 10:24:33 +0100 Subject: [PATCH 08/14] update codediff --- lua/custom/plugins/{vscode-diff.lua => codediff.lua} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename lua/custom/plugins/{vscode-diff.lua => codediff.lua} (97%) diff --git a/lua/custom/plugins/vscode-diff.lua b/lua/custom/plugins/codediff.lua similarity index 97% rename from lua/custom/plugins/vscode-diff.lua rename to lua/custom/plugins/codediff.lua index efcd4c56b85..d07dc062448 100644 --- a/lua/custom/plugins/vscode-diff.lua +++ b/lua/custom/plugins/codediff.lua @@ -1,9 +1,9 @@ return { - 'esmuellert/vscode-diff.nvim', + 'esmuellert/codediff.nvim', dependencies = { 'MunifTanjim/nui.nvim' }, cmd = 'CodeDiff', config = function() - require('vscode-diff').setup { + require('codediff').setup { -- Highlight configuration highlights = { -- Line-level: accepts highlight group names or hex colors (e.g., "#2ea043") From fa9be63a01a541d2835e4e11ec426dffdeef9270 Mon Sep 17 00:00:00 2001 From: Brian Henderson Date: Tue, 14 Apr 2026 11:27:28 +0200 Subject: [PATCH 09/14] ignore .worktrees/ directory --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 005b535b606..ae0d5db53d6 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ nvim spell/ lazy-lock.json +.worktrees/ From 47f7a55f7b32335fa451a29d0c45d0f51a1163d3 Mon Sep 17 00:00:00 2001 From: Brian Henderson Date: Tue, 14 Apr 2026 21:14:52 +0200 Subject: [PATCH 10/14] refactor: extract blink.cmp preset to custom plugin --- init.lua | 2 +- lua/custom/plugins/blink-cmp.lua | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 lua/custom/plugins/blink-cmp.lua diff --git a/init.lua b/init.lua index 684223e567c..e5259cf38cc 100644 --- a/init.lua +++ b/init.lua @@ -798,7 +798,7 @@ require('lazy').setup({ -- : Toggle signature help -- -- See :h blink-cmp-config-keymap for defining your own keymap - preset = 'super-tab', + preset = 'default', -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see: -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps diff --git a/lua/custom/plugins/blink-cmp.lua b/lua/custom/plugins/blink-cmp.lua new file mode 100644 index 00000000000..b1009f01069 --- /dev/null +++ b/lua/custom/plugins/blink-cmp.lua @@ -0,0 +1,6 @@ +return { + 'saghen/blink.cmp', + opts = { + keymap = { preset = 'super-tab' }, + }, +} From ff521d7d24af990082a3699b2de7b251a11f8b5a Mon Sep 17 00:00:00 2001 From: Brian Henderson Date: Tue, 14 Apr 2026 21:20:10 +0200 Subject: [PATCH 11/14] refactor: extract conform formatters to custom plugin --- init.lua | 11 ----------- lua/custom/plugins/conform.lua | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 lua/custom/plugins/conform.lua diff --git a/init.lua b/init.lua index e5259cf38cc..a5355a8cdf7 100644 --- a/init.lua +++ b/init.lua @@ -728,17 +728,6 @@ require('lazy').setup({ -- -- You can use 'stop_after_first' to run the first available formatter from the list -- javascript = { "prettierd", "prettier", stop_after_first = true }, - - -- my customizations - json = { 'jq' }, - sarif = { 'jq' }, - python = { 'ruff_format', 'ruff_organize_imports' }, - html = { 'prettier' }, - javascript = { 'prettier' }, - typescript = { 'prettier' }, - typescriptreact = { 'prettier' }, - markdown = { 'markdownlint' }, - yaml = { 'prettier' }, }, }, }, diff --git a/lua/custom/plugins/conform.lua b/lua/custom/plugins/conform.lua new file mode 100644 index 00000000000..0a554f7717d --- /dev/null +++ b/lua/custom/plugins/conform.lua @@ -0,0 +1,16 @@ +return { + 'stevearc/conform.nvim', + opts = { + formatters_by_ft = { + json = { 'jq' }, + sarif = { 'jq' }, + python = { 'ruff_format', 'ruff_organize_imports' }, + html = { 'prettier' }, + javascript = { 'prettier' }, + typescript = { 'prettier' }, + typescriptreact = { 'prettier' }, + markdown = { 'markdownlint' }, + yaml = { 'prettier' }, + }, + }, +} From 2d05423ac20cdf4c6fa2199b7f163194111ecc94 Mon Sep 17 00:00:00 2001 From: Brian Henderson Date: Tue, 14 Apr 2026 21:23:18 +0200 Subject: [PATCH 12/14] refactor: extract kickstart optional plugin enables --- init.lua | 12 ++++++------ lua/custom/plugins/kickstart-enable.lua | 8 ++++++++ 2 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 lua/custom/plugins/kickstart-enable.lua diff --git a/init.lua b/init.lua index a5355a8cdf7..a2e8fc7b5ff 100644 --- a/init.lua +++ b/init.lua @@ -960,12 +960,12 @@ 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.indent_line', - require 'kickstart.plugins.lint', - require 'kickstart.plugins.autopairs', - require 'kickstart.plugins.neo-tree', - require 'kickstart.plugins.gitsigns', -- adds gitsigns recommended keymaps + -- 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 recommended 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. diff --git a/lua/custom/plugins/kickstart-enable.lua b/lua/custom/plugins/kickstart-enable.lua new file mode 100644 index 00000000000..01722678351 --- /dev/null +++ b/lua/custom/plugins/kickstart-enable.lua @@ -0,0 +1,8 @@ +return { + 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', +} From 4e2e35ed6ab32fa3cb8964c8c8678b7b3aa247a9 Mon Sep 17 00:00:00 2001 From: Brian Henderson Date: Tue, 14 Apr 2026 21:29:09 +0200 Subject: [PATCH 13/14] refactor: extract LSP servers and mason tool extras --- init.lua | 27 --------------------------- lua/custom/plugins/lsp.lua | 16 ++++++++++++++++ lua/custom/plugins/mason-extras.lua | 12 ++++++++++++ 3 files changed, 28 insertions(+), 27 deletions(-) create mode 100644 lua/custom/plugins/lsp.lua create mode 100644 lua/custom/plugins/mason-extras.lua diff --git a/init.lua b/init.lua index a2e8fc7b5ff..fcdfa2a3a5c 100644 --- a/init.lua +++ b/init.lua @@ -641,26 +641,6 @@ require('lazy').setup({ Lua = {}, }, }, - - -- my customizations - clangd = {}, - gopls = {}, - pyright = { - settings = { - pyright = { - -- Using Ruff's import organizer - disableOrganizeImports = true, - }, - python = { - analysis = { - -- Ignore all files for analysis to exclusively use Ruff for linting - ignore = { '*' }, - }, - }, - }, - }, - ts_ls = {}, - ruff = {}, } -- Ensure the servers and tools above are installed @@ -673,13 +653,6 @@ require('lazy').setup({ local ensure_installed = vim.tbl_keys(servers or {}) vim.list_extend(ensure_installed, { -- You can add other tools here that you want Mason to install - - -- my customizations - 'markdownlint', - 'mypy', - 'jq', - 'prettier', - 'codelldb', }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } diff --git a/lua/custom/plugins/lsp.lua b/lua/custom/plugins/lsp.lua new file mode 100644 index 00000000000..562766ac07d --- /dev/null +++ b/lua/custom/plugins/lsp.lua @@ -0,0 +1,16 @@ +vim.lsp.config('pyright', { + settings = { + pyright = { disableOrganizeImports = true }, + python = { analysis = { ignore = { '*' } } }, + }, +}) + +return { + { + 'mason-org/mason-lspconfig.nvim', + opts = { + ensure_installed = { 'clangd', 'gopls', 'pyright', 'ts_ls', 'ruff' }, + automatic_enable = true, + }, + }, +} diff --git a/lua/custom/plugins/mason-extras.lua b/lua/custom/plugins/mason-extras.lua new file mode 100644 index 00000000000..0b34986fca6 --- /dev/null +++ b/lua/custom/plugins/mason-extras.lua @@ -0,0 +1,12 @@ +vim.api.nvim_create_autocmd('User', { + pattern = 'VeryLazy', once = true, + callback = function() + local mr = require 'mason-registry' + mr.refresh(function() + local p = mr.get_package 'codelldb' + if not p:is_installed() then p:install() end + end) + end, +}) + +return {} From 50382dcdb54dda7a1dcc154442aebfc1c55d8508 Mon Sep 17 00:00:00 2001 From: Brian Henderson Date: Tue, 14 Apr 2026 22:50:00 +0200 Subject: [PATCH 14/14] refactor: polish lsp.lua and mason-extras.lua - Restore pyright inline comments explaining Ruff delegation - Add header comment documenting mason-lspconfig/vim.lsp.config coupling - Unwrap lsp.lua outer spec table (consistency with blink-cmp.lua, conform.lua) - pcall mason-registry.get_package (defensive against unknown package name) - Split inline autocmd opts across lines (style) --- lua/custom/plugins/lsp.lua | 24 ++++++++++++++++-------- lua/custom/plugins/mason-extras.lua | 7 ++++--- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/lua/custom/plugins/lsp.lua b/lua/custom/plugins/lsp.lua index 562766ac07d..9315e1c72e5 100644 --- a/lua/custom/plugins/lsp.lua +++ b/lua/custom/plugins/lsp.lua @@ -1,16 +1,24 @@ +-- Pyright settings merge via vim.lsp.config deep-merge; mason-lspconfig's +-- automatic_enable fires vim.lsp.enable() for each ensure_installed server. vim.lsp.config('pyright', { settings = { - pyright = { disableOrganizeImports = true }, - python = { analysis = { ignore = { '*' } } }, + pyright = { + -- Using Ruff's import organizer + disableOrganizeImports = true, + }, + python = { + analysis = { + -- Ignore all files for analysis to exclusively use Ruff for linting + ignore = { '*' }, + }, + }, }, }) return { - { - 'mason-org/mason-lspconfig.nvim', - opts = { - ensure_installed = { 'clangd', 'gopls', 'pyright', 'ts_ls', 'ruff' }, - automatic_enable = true, - }, + 'mason-org/mason-lspconfig.nvim', + opts = { + ensure_installed = { 'clangd', 'gopls', 'pyright', 'ts_ls', 'ruff' }, + automatic_enable = true, }, } diff --git a/lua/custom/plugins/mason-extras.lua b/lua/custom/plugins/mason-extras.lua index 0b34986fca6..3ab31626894 100644 --- a/lua/custom/plugins/mason-extras.lua +++ b/lua/custom/plugins/mason-extras.lua @@ -1,10 +1,11 @@ vim.api.nvim_create_autocmd('User', { - pattern = 'VeryLazy', once = true, + pattern = 'VeryLazy', + once = true, callback = function() local mr = require 'mason-registry' mr.refresh(function() - local p = mr.get_package 'codelldb' - if not p:is_installed() then p:install() end + local ok, p = pcall(mr.get_package, 'codelldb') + if ok and not p:is_installed() then p:install() end end) end, })