From f3af156b9fae682360c41c2f36faa8393637e1db Mon Sep 17 00:00:00 2001 From: Vicente Date: Tue, 17 Feb 2026 23:54:11 +0100 Subject: [PATCH 01/35] added minimap --- lazy-lock.json | 7 ++++--- lua/plugins/colorscheme.lua | 1 + lua/plugins/lualine.lua | 3 +++ lua/plugins/minimap.lua | 17 +++++++++++++++++ lua/plugins/vim-scrollbar.lua | 1 + 5 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 lua/plugins/minimap.lua diff --git a/lazy-lock.json b/lazy-lock.json index 1280170..35e950d 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -3,10 +3,10 @@ "auto-dark-mode.nvim": { "branch": "master", "commit": "c31de126963ffe9403901b4b0990dde0e6999cc6" }, "auto-session": { "branch": "main", "commit": "dcbc339a1a0e6505f755d980ad11f892b6a8d492" }, "barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" }, - "blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" }, + "blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" }, "codediff.nvim": { "branch": "main", "commit": "7e5cda21dab96901cbc4bf3b15828aa8c7b490a7" }, - "conform.nvim": { "branch": "master", "commit": "c2526f1cde528a66e086ab1668e996d162c75f4f" }, - "copilot.lua": { "branch": "master", "commit": "3faffefbd6ddeb52578535ec6b730e0b72d7fd1a" }, + "conform.nvim": { "branch": "master", "commit": "8314f4c9e205e7f30b62147069729f9a1227d8bf" }, + "copilot.lua": { "branch": "master", "commit": "e78d1ffebdf6ccb6fd8be4e6898030c1cf5f9b64" }, "cutlass.nvim": { "branch": "main", "commit": "d01b5c1943050fcda8edf5c89d4419c41a65890e" }, "definition-or-references.nvim": { "branch": "main", "commit": "7318f9479d2db357d2908599c3ec14bec7c589dd" }, "fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" }, @@ -22,6 +22,7 @@ "mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" }, "multicursor.nvim": { "branch": "1.0", "commit": "630dd29dd696bc977cb81d7dd2fa6bb280f60fc4" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" }, + "neominimap.nvim": { "branch": "main", "commit": "2fa422dd4fb9427c70118e4d2840ad7c5b5722b9" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" }, "nvim-highlight-colors": { "branch": "main", "commit": "e2cb22089cc2358b2b995c09578224f142de6039" }, diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua index 0d63ea1..1582f8d 100644 --- a/lua/plugins/colorscheme.lua +++ b/lua/plugins/colorscheme.lua @@ -19,6 +19,7 @@ return { highlights = { LspReferenceText = { link = "CursorColumn", extend = true }, NeoTreeCursorLine = { bg = "${cursorline}", bold = true }, -- Neo-tree/onedarkpro bug fix + NeominimapCursorLine = { bg = "${cursorline}", bold = true }, -- Neo-tree/onedarkpro bug fix }, }) vim.cmd.colorscheme("onedark_vivid") diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index c2d131c..19f5a90 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -21,6 +21,9 @@ return { opts = { options = { always_show_tabline = false, + disabled_filetypes = { + statusline = { "neominimap" }, + }, }, sections = { lualine_a = { diff --git a/lua/plugins/minimap.lua b/lua/plugins/minimap.lua new file mode 100644 index 0000000..9486d2d --- /dev/null +++ b/lua/plugins/minimap.lua @@ -0,0 +1,17 @@ +---@module "neominimap.config.meta" +return { + "Isrothy/neominimap.nvim", + version = "v3.x.x", + lazy = false, -- NOTE: NO NEED to Lazy load + init = function() + -- vim.opt.wrap = false + -- vim.opt.sidescrolloff = 36 -- Set a large value + + --- Put your configuration here + vim.g.neominimap = { + auto_enable = true, + layout = "split", + current_line_position = "percent", + } + end, +} diff --git a/lua/plugins/vim-scrollbar.lua b/lua/plugins/vim-scrollbar.lua index 450f687..2b85752 100644 --- a/lua/plugins/vim-scrollbar.lua +++ b/lua/plugins/vim-scrollbar.lua @@ -30,6 +30,7 @@ return { excluded_filetypes = { "neo-tree", "neo-tree-popup", + "neominimap", }, }, } From 134747f8f1fa5a408a1905f64886f26b5ce38aed Mon Sep 17 00:00:00 2001 From: Vicente Date: Tue, 17 Feb 2026 23:57:07 +0100 Subject: [PATCH 02/35] updated deps --- lazy-lock.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 35e950d..2c8dc43 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,23 +1,23 @@ { "LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" }, - "auto-dark-mode.nvim": { "branch": "master", "commit": "c31de126963ffe9403901b4b0990dde0e6999cc6" }, - "auto-session": { "branch": "main", "commit": "dcbc339a1a0e6505f755d980ad11f892b6a8d492" }, + "auto-dark-mode.nvim": { "branch": "master", "commit": "e300259ec777a40b4b9e3c8e6ade203e78d15881" }, + "auto-session": { "branch": "main", "commit": "62437532b38495551410b3f377bcf4aaac574ebe" }, "barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" }, - "blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" }, - "codediff.nvim": { "branch": "main", "commit": "7e5cda21dab96901cbc4bf3b15828aa8c7b490a7" }, - "conform.nvim": { "branch": "master", "commit": "8314f4c9e205e7f30b62147069729f9a1227d8bf" }, + "blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" }, + "codediff.nvim": { "branch": "main", "commit": "9ba04ddf48827f7f765e0d1eeb3a22650323c2a6" }, + "conform.nvim": { "branch": "master", "commit": "c2526f1cde528a66e086ab1668e996d162c75f4f" }, "copilot.lua": { "branch": "master", "commit": "e78d1ffebdf6ccb6fd8be4e6898030c1cf5f9b64" }, "cutlass.nvim": { "branch": "main", "commit": "d01b5c1943050fcda8edf5c89d4419c41a65890e" }, "definition-or-references.nvim": { "branch": "main", "commit": "7318f9479d2db357d2908599c3ec14bec7c589dd" }, "fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, - "gitsigns.nvim": { "branch": "main", "commit": "31217271a7314c343606acb4072a94a039a19fb5" }, + "gitsigns.nvim": { "branch": "main", "commit": "9f3c6dd7868bcc116e9c1c1929ce063b978fa519" }, "harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, - "live-server.nvim": { "branch": "main", "commit": "d6a253569ebb813c622f56971f55f56d044f6ab5" }, + "live-server.nvim": { "branch": "main", "commit": "6897c94950e05d5b22440c6db8fa24c5c51d8d12" }, "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, - "markdown-preview.nvim": { "branch": "main", "commit": "e2d58c41372ed58de2b781b8bdf74fd027c6a3f3" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "ae609525ddf01c153c39305730b1791800ffe4fe" }, + "markdown-preview.nvim": { "branch": "main", "commit": "58ee5617fd9d5b8ed35681d215d9e0ffc7d954f3" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "21c2a84ce368e99b18f52ab348c4c02c32c02fcf" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" }, "mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" }, "multicursor.nvim": { "branch": "1.0", "commit": "630dd29dd696bc977cb81d7dd2fa6bb280f60fc4" }, @@ -27,10 +27,10 @@ "nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" }, "nvim-highlight-colors": { "branch": "main", "commit": "e2cb22089cc2358b2b995c09578224f142de6039" }, "nvim-hlslens": { "branch": "main", "commit": "be2d7b2be01860b5445a007ff2bc72b29896db6b" }, - "nvim-lspconfig": { "branch": "master", "commit": "66fd02ad1c7ea31616d3ca678fa04e6d0b360824" }, + "nvim-lspconfig": { "branch": "master", "commit": "44acfe887d4056f704ccc4f17513ed41c9e2b2e6" }, "nvim-scrollbar": { "branch": "main", "commit": "f8e87b96cd6362ef8579be456afee3b38fd7e2a8" }, "nvim-surround": { "branch": "main", "commit": "1098d7b3c34adcfa7feb3289ee434529abd4afd1" }, - "nvim-treesitter": { "branch": "main", "commit": "45a07f869b0cffba342276f2c77ba7c116d35db8" }, + "nvim-treesitter": { "branch": "main", "commit": "2bd9b9b4f12eed175fba35ca2db8e8584546a4ec" }, "nvim-web-devicons": { "branch": "master", "commit": "746ffbb17975ebd6c40142362eee1b0249969c5c" }, "onedarkpro.nvim": { "branch": "main", "commit": "743bf248cf238a0625f3a204eecefafcf6281a9f" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, From 1d23c46d3346ec5512c74946c9bea23bd9abde87 Mon Sep 17 00:00:00 2001 From: Vicente Date: Wed, 18 Feb 2026 00:03:01 +0100 Subject: [PATCH 03/35] add command to toggle minimap --- lua/plugins/minimap.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/plugins/minimap.lua b/lua/plugins/minimap.lua index 9486d2d..86b76a9 100644 --- a/lua/plugins/minimap.lua +++ b/lua/plugins/minimap.lua @@ -13,5 +13,9 @@ return { layout = "split", current_line_position = "percent", } + + vim.api.nvim_create_user_command("MinimapToggle", function() + vim.cmd("Neominimap Toggle") + end, { desc = "Toggle minimap" }) end, } From fd5c12e9128ef2a859168442b4f80e5062920dbc Mon Sep 17 00:00:00 2001 From: Vicente Date: Wed, 18 Feb 2026 13:28:47 +0100 Subject: [PATCH 04/35] fix minimap float layout --- lazy-lock.json | 2 +- lua/plugins/minimap.lua | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 2c8dc43..abf8c11 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -6,7 +6,7 @@ "blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" }, "codediff.nvim": { "branch": "main", "commit": "9ba04ddf48827f7f765e0d1eeb3a22650323c2a6" }, "conform.nvim": { "branch": "master", "commit": "c2526f1cde528a66e086ab1668e996d162c75f4f" }, - "copilot.lua": { "branch": "master", "commit": "e78d1ffebdf6ccb6fd8be4e6898030c1cf5f9b64" }, + "copilot.lua": { "branch": "master", "commit": "dd3e345d59051464573d821b042f0a0c82410b5d" }, "cutlass.nvim": { "branch": "main", "commit": "d01b5c1943050fcda8edf5c89d4419c41a65890e" }, "definition-or-references.nvim": { "branch": "main", "commit": "7318f9479d2db357d2908599c3ec14bec7c589dd" }, "fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" }, diff --git a/lua/plugins/minimap.lua b/lua/plugins/minimap.lua index 86b76a9..77a1ed0 100644 --- a/lua/plugins/minimap.lua +++ b/lua/plugins/minimap.lua @@ -10,8 +10,10 @@ return { --- Put your configuration here vim.g.neominimap = { auto_enable = true, - layout = "split", current_line_position = "percent", + float = { + window_border = "none", + }, } vim.api.nvim_create_user_command("MinimapToggle", function() From a1dcbaf5ac4e6eae9eb29cea263c213eabfd0dce Mon Sep 17 00:00:00 2001 From: Vicente Date: Wed, 18 Feb 2026 15:23:08 +0100 Subject: [PATCH 05/35] update color --- lua/plugins/colorscheme.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua index 1582f8d..60daea8 100644 --- a/lua/plugins/colorscheme.lua +++ b/lua/plugins/colorscheme.lua @@ -19,7 +19,7 @@ return { highlights = { LspReferenceText = { link = "CursorColumn", extend = true }, NeoTreeCursorLine = { bg = "${cursorline}", bold = true }, -- Neo-tree/onedarkpro bug fix - NeominimapCursorLine = { bg = "${cursorline}", bold = true }, -- Neo-tree/onedarkpro bug fix + NeominimapCursorLine = { bg = "${gray}", bold = true }, -- Neo-tree/onedarkpro bug fix }, }) vim.cmd.colorscheme("onedark_vivid") From 8ada8ac2f6544865de66b9cb16a94abdb5a8981d Mon Sep 17 00:00:00 2001 From: Vicente Date: Fri, 20 Feb 2026 12:11:39 +0100 Subject: [PATCH 06/35] update neotree width --- lua/plugins/neo-tree.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua index 18b80e6..e2eb4be 100644 --- a/lua/plugins/neo-tree.lua +++ b/lua/plugins/neo-tree.lua @@ -77,7 +77,7 @@ return { end, }, window = { - width = 60, + width = 40, position = "right", mappings = { [""] = false, From 85162dce34e672903eafad11790965bbc0705df7 Mon Sep 17 00:00:00 2001 From: Vicente Date: Mon, 23 Feb 2026 12:27:05 +0100 Subject: [PATCH 07/35] updated deps --- lazy-lock.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index abf8c11..ef82a02 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -4,9 +4,9 @@ "auto-session": { "branch": "main", "commit": "62437532b38495551410b3f377bcf4aaac574ebe" }, "barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" }, "blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" }, - "codediff.nvim": { "branch": "main", "commit": "9ba04ddf48827f7f765e0d1eeb3a22650323c2a6" }, - "conform.nvim": { "branch": "master", "commit": "c2526f1cde528a66e086ab1668e996d162c75f4f" }, - "copilot.lua": { "branch": "master", "commit": "dd3e345d59051464573d821b042f0a0c82410b5d" }, + "codediff.nvim": { "branch": "main", "commit": "0a2f5d71cdf2e8e0ca37acb604cf7cb09998b045" }, + "conform.nvim": { "branch": "master", "commit": "e969e302bced7ffb9a0a0323629f31feb0ca35a6" }, + "copilot.lua": { "branch": "master", "commit": "5c01badd42049a63ac9e5d6c8ea85aaf66cb940f" }, "cutlass.nvim": { "branch": "main", "commit": "d01b5c1943050fcda8edf5c89d4419c41a65890e" }, "definition-or-references.nvim": { "branch": "main", "commit": "7318f9479d2db357d2908599c3ec14bec7c589dd" }, "fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" }, @@ -16,21 +16,21 @@ "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "live-server.nvim": { "branch": "main", "commit": "6897c94950e05d5b22440c6db8fa24c5c51d8d12" }, "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, - "markdown-preview.nvim": { "branch": "main", "commit": "58ee5617fd9d5b8ed35681d215d9e0ffc7d954f3" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "21c2a84ce368e99b18f52ab348c4c02c32c02fcf" }, + "markdown-preview.nvim": { "branch": "main", "commit": "858391a1d01dc0daa5233184b4600e1cc0d8d9fc" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "6c4830e37743b060d13c9269394176aea6a0fbc8" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" }, "mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" }, "multicursor.nvim": { "branch": "1.0", "commit": "630dd29dd696bc977cb81d7dd2fa6bb280f60fc4" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" }, - "neominimap.nvim": { "branch": "main", "commit": "2fa422dd4fb9427c70118e4d2840ad7c5b5722b9" }, + "neominimap.nvim": { "branch": "main", "commit": "6a9d8b0d2f2c0d9d7853b377fa225990cb24837a" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" }, "nvim-highlight-colors": { "branch": "main", "commit": "e2cb22089cc2358b2b995c09578224f142de6039" }, "nvim-hlslens": { "branch": "main", "commit": "be2d7b2be01860b5445a007ff2bc72b29896db6b" }, - "nvim-lspconfig": { "branch": "master", "commit": "44acfe887d4056f704ccc4f17513ed41c9e2b2e6" }, + "nvim-lspconfig": { "branch": "master", "commit": "5a855bcfec7973767a1a472335684bbd71d2fa2b" }, "nvim-scrollbar": { "branch": "main", "commit": "f8e87b96cd6362ef8579be456afee3b38fd7e2a8" }, - "nvim-surround": { "branch": "main", "commit": "1098d7b3c34adcfa7feb3289ee434529abd4afd1" }, - "nvim-treesitter": { "branch": "main", "commit": "2bd9b9b4f12eed175fba35ca2db8e8584546a4ec" }, + "nvim-surround": { "branch": "main", "commit": "2800277e75eda268df2bfab6ebc53e2635455318" }, + "nvim-treesitter": { "branch": "main", "commit": "dc42c209f3820bdfaae0956f15de29689aa6b451" }, "nvim-web-devicons": { "branch": "master", "commit": "746ffbb17975ebd6c40142362eee1b0249969c5c" }, "onedarkpro.nvim": { "branch": "main", "commit": "743bf248cf238a0625f3a204eecefafcf6281a9f" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, From c39bd125bf1a8a547184ebefe4a5dce05b2c3df5 Mon Sep 17 00:00:00 2001 From: Vicente Date: Wed, 25 Feb 2026 13:47:22 +0100 Subject: [PATCH 08/35] update codediff width --- lua/plugins/codediff.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/codediff.lua b/lua/plugins/codediff.lua index 0d2cb7b..811f1c9 100644 --- a/lua/plugins/codediff.lua +++ b/lua/plugins/codediff.lua @@ -8,7 +8,7 @@ return { opts = { explorer = { position = "right", - width = 60, + width = 50, view_mode = "tree", }, keymaps = { From 62a5867e7cf123d8b25b4da5ba68786992617ec6 Mon Sep 17 00:00:00 2001 From: Vicente Date: Thu, 26 Feb 2026 12:08:07 +0100 Subject: [PATCH 09/35] updated codediff width --- lua/plugins/codediff.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/codediff.lua b/lua/plugins/codediff.lua index 811f1c9..c5eba18 100644 --- a/lua/plugins/codediff.lua +++ b/lua/plugins/codediff.lua @@ -8,7 +8,7 @@ return { opts = { explorer = { position = "right", - width = 50, + width = 40, view_mode = "tree", }, keymaps = { From 22d74a537d9bca7c60abf71686cef25ac7593f95 Mon Sep 17 00:00:00 2001 From: Vicente Date: Mon, 9 Mar 2026 09:41:49 +0100 Subject: [PATCH 10/35] adapt smaller screen & remove borders --- lua/options.lua | 1 - lua/plugins/codediff.lua | 2 +- lua/plugins/snacks.lua | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/options.lua b/lua/options.lua index 61a80ba..9a95ae9 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -26,7 +26,6 @@ vim.filetype.add({ }, }) vim.o.mousescroll = f.isMac() and "ver:1,hor:1" or "ver:3,hor:3" -vim.o.winborder = "rounded" -- Reserve a space in the gutter -- This will avoid an annoying layout shift in the screen diff --git a/lua/plugins/codediff.lua b/lua/plugins/codediff.lua index c5eba18..5ca5e94 100644 --- a/lua/plugins/codediff.lua +++ b/lua/plugins/codediff.lua @@ -8,7 +8,7 @@ return { opts = { explorer = { position = "right", - width = 40, + -- width = 40, view_mode = "tree", }, keymaps = { diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index e7d54a2..df721cd 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -86,7 +86,6 @@ return { win = { height = 0.95, width = 0.95, - border = "rounded", }, }, picker = { From 5c9051f4068d9fe72d1eba5fddf9d6cd1dc001be Mon Sep 17 00:00:00 2001 From: Vicente Date: Mon, 9 Mar 2026 09:45:21 +0100 Subject: [PATCH 11/35] updated deps --- lazy-lock.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index ef82a02..f0c1e9f 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -5,37 +5,37 @@ "barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" }, "blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" }, "codediff.nvim": { "branch": "main", "commit": "0a2f5d71cdf2e8e0ca37acb604cf7cb09998b045" }, - "conform.nvim": { "branch": "master", "commit": "e969e302bced7ffb9a0a0323629f31feb0ca35a6" }, - "copilot.lua": { "branch": "master", "commit": "5c01badd42049a63ac9e5d6c8ea85aaf66cb940f" }, + "conform.nvim": { "branch": "master", "commit": "40dcec5555f960b0a04340d76eabdf4efe78599d" }, + "copilot.lua": { "branch": "master", "commit": "575646d22e4a80758935e92f7be7e210c1ceb5bc" }, "cutlass.nvim": { "branch": "main", "commit": "d01b5c1943050fcda8edf5c89d4419c41a65890e" }, "definition-or-references.nvim": { "branch": "main", "commit": "7318f9479d2db357d2908599c3ec14bec7c589dd" }, "fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, - "gitsigns.nvim": { "branch": "main", "commit": "9f3c6dd7868bcc116e9c1c1929ce063b978fa519" }, + "gitsigns.nvim": { "branch": "main", "commit": "7c4faa3540d0781a28588cafbd4dd187a28ac6e3" }, "harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "live-server.nvim": { "branch": "main", "commit": "6897c94950e05d5b22440c6db8fa24c5c51d8d12" }, "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, "markdown-preview.nvim": { "branch": "main", "commit": "858391a1d01dc0daa5233184b4600e1cc0d8d9fc" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "6c4830e37743b060d13c9269394176aea6a0fbc8" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "a324581a3c83fdacdb9804b79de1cbe00ce18550" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" }, "mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" }, - "multicursor.nvim": { "branch": "1.0", "commit": "630dd29dd696bc977cb81d7dd2fa6bb280f60fc4" }, - "neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" }, + "multicursor.nvim": { "branch": "1.0", "commit": "811681faf44d8031685614cc00a148cd3ece697c" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "9d6826582a3e8c84787bd7355df22a2812a1ad59" }, "neominimap.nvim": { "branch": "main", "commit": "6a9d8b0d2f2c0d9d7853b377fa225990cb24837a" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" }, "nvim-highlight-colors": { "branch": "main", "commit": "e2cb22089cc2358b2b995c09578224f142de6039" }, "nvim-hlslens": { "branch": "main", "commit": "be2d7b2be01860b5445a007ff2bc72b29896db6b" }, - "nvim-lspconfig": { "branch": "master", "commit": "5a855bcfec7973767a1a472335684bbd71d2fa2b" }, + "nvim-lspconfig": { "branch": "master", "commit": "2163c54bb6cfec53e3e555665ada945b8c8331b9" }, "nvim-scrollbar": { "branch": "main", "commit": "f8e87b96cd6362ef8579be456afee3b38fd7e2a8" }, - "nvim-surround": { "branch": "main", "commit": "2800277e75eda268df2bfab6ebc53e2635455318" }, - "nvim-treesitter": { "branch": "main", "commit": "dc42c209f3820bdfaae0956f15de29689aa6b451" }, - "nvim-web-devicons": { "branch": "master", "commit": "746ffbb17975ebd6c40142362eee1b0249969c5c" }, - "onedarkpro.nvim": { "branch": "main", "commit": "743bf248cf238a0625f3a204eecefafcf6281a9f" }, + "nvim-surround": { "branch": "main", "commit": "61319d4bd1c5e336e197defa15bd104c51f0fb29" }, + "nvim-treesitter": { "branch": "main", "commit": "5cb05e1b0fa3c469958a2b26f36b3fe930af221c" }, + "nvim-web-devicons": { "branch": "master", "commit": "737cf6c657898d0c697311d79d361288a1343d50" }, + "onedarkpro.nvim": { "branch": "main", "commit": "05b0d6446a4dcf866edc7ad637a13e4d7e2d5c32" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "scope.nvim": { "branch": "main", "commit": "228aabdb1b9cc74f0c0ccec88e79873857236e49" }, - "snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" }, + "snacks.nvim": { "branch": "main", "commit": "9912042fc8bca2209105526ac7534e9a0c2071b2" }, "ts-comments.nvim": { "branch": "main", "commit": "123a9fb12e7229342f807ec9e6de478b1102b041" }, "wildfire.nvim": { "branch": "master", "commit": "918a1873c2b8010baa034f373cf28c53ce4f038f" } } From 34abf897a010196c2eebe1d442570873c6e2ee1a Mon Sep 17 00:00:00 2001 From: Vicente Date: Tue, 17 Mar 2026 10:43:42 +0100 Subject: [PATCH 12/35] updated deps --- lazy-lock.json | 20 ++++++++++---------- lua/keymaps.lua | 3 +++ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index f0c1e9f..b9cf733 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -5,8 +5,8 @@ "barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" }, "blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" }, "codediff.nvim": { "branch": "main", "commit": "0a2f5d71cdf2e8e0ca37acb604cf7cb09998b045" }, - "conform.nvim": { "branch": "master", "commit": "40dcec5555f960b0a04340d76eabdf4efe78599d" }, - "copilot.lua": { "branch": "master", "commit": "575646d22e4a80758935e92f7be7e210c1ceb5bc" }, + "conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" }, + "copilot.lua": { "branch": "master", "commit": "8e2a91828210d6043744468f6d7027d256a41f42" }, "cutlass.nvim": { "branch": "main", "commit": "d01b5c1943050fcda8edf5c89d4419c41a65890e" }, "definition-or-references.nvim": { "branch": "main", "commit": "7318f9479d2db357d2908599c3ec14bec7c589dd" }, "fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" }, @@ -14,10 +14,10 @@ "gitsigns.nvim": { "branch": "main", "commit": "7c4faa3540d0781a28588cafbd4dd187a28ac6e3" }, "harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, - "live-server.nvim": { "branch": "main", "commit": "6897c94950e05d5b22440c6db8fa24c5c51d8d12" }, + "live-server.nvim": { "branch": "main", "commit": "446b2211de3819f67e807b768ebd200054e1cf06" }, "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, - "markdown-preview.nvim": { "branch": "main", "commit": "858391a1d01dc0daa5233184b4600e1cc0d8d9fc" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "a324581a3c83fdacdb9804b79de1cbe00ce18550" }, + "markdown-preview.nvim": { "branch": "main", "commit": "d211d554e1e7f57088419b2d9349cf02eb311271" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "a676ab7282da8d651e175118bcf54483ca11e46d" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" }, "mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" }, "multicursor.nvim": { "branch": "1.0", "commit": "811681faf44d8031685614cc00a148cd3ece697c" }, @@ -27,15 +27,15 @@ "nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" }, "nvim-highlight-colors": { "branch": "main", "commit": "e2cb22089cc2358b2b995c09578224f142de6039" }, "nvim-hlslens": { "branch": "main", "commit": "be2d7b2be01860b5445a007ff2bc72b29896db6b" }, - "nvim-lspconfig": { "branch": "master", "commit": "2163c54bb6cfec53e3e555665ada945b8c8331b9" }, + "nvim-lspconfig": { "branch": "master", "commit": "dd261ad5266ab5bbec249d21efeceda98ff3e1a6" }, "nvim-scrollbar": { "branch": "main", "commit": "f8e87b96cd6362ef8579be456afee3b38fd7e2a8" }, "nvim-surround": { "branch": "main", "commit": "61319d4bd1c5e336e197defa15bd104c51f0fb29" }, - "nvim-treesitter": { "branch": "main", "commit": "5cb05e1b0fa3c469958a2b26f36b3fe930af221c" }, - "nvim-web-devicons": { "branch": "master", "commit": "737cf6c657898d0c697311d79d361288a1343d50" }, - "onedarkpro.nvim": { "branch": "main", "commit": "05b0d6446a4dcf866edc7ad637a13e4d7e2d5c32" }, + "nvim-treesitter": { "branch": "main", "commit": "2f5d4c3f3c675962242096bcc8e586d76dd72eb2" }, + "nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" }, + "onedarkpro.nvim": { "branch": "main", "commit": "dab7b623d48b50330c43234958c0ba2de9b501d5" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "scope.nvim": { "branch": "main", "commit": "228aabdb1b9cc74f0c0ccec88e79873857236e49" }, - "snacks.nvim": { "branch": "main", "commit": "9912042fc8bca2209105526ac7534e9a0c2071b2" }, + "snacks.nvim": { "branch": "main", "commit": "a049339328e2599ad6e85a69fa034ac501e921b2" }, "ts-comments.nvim": { "branch": "main", "commit": "123a9fb12e7229342f807ec9e6de478b1102b041" }, "wildfire.nvim": { "branch": "master", "commit": "918a1873c2b8010baa034f373cf28c53ce4f038f" } } diff --git a/lua/keymaps.lua b/lua/keymaps.lua index 30e9f78..5794125 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -173,3 +173,6 @@ end, { desc = "Delete mark in current line" }) -- Folds vim.keymap.set("n", "ff", "za", { desc = "Toggle fold" }) + +-- Search in visual mode +vim.keymap.set("x", "/", "` Date: Tue, 17 Mar 2026 11:33:55 +0100 Subject: [PATCH 13/35] updated deps --- lazy-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index b9cf733..d5c2e40 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -3,7 +3,7 @@ "auto-dark-mode.nvim": { "branch": "master", "commit": "e300259ec777a40b4b9e3c8e6ade203e78d15881" }, "auto-session": { "branch": "main", "commit": "62437532b38495551410b3f377bcf4aaac574ebe" }, "barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" }, - "blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" }, + "blink.cmp": { "branch": "main", "commit": "451168851e8e2466bc97ee3e026c3dcb9141ce07" }, "codediff.nvim": { "branch": "main", "commit": "0a2f5d71cdf2e8e0ca37acb604cf7cb09998b045" }, "conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" }, "copilot.lua": { "branch": "master", "commit": "8e2a91828210d6043744468f6d7027d256a41f42" }, @@ -27,10 +27,10 @@ "nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" }, "nvim-highlight-colors": { "branch": "main", "commit": "e2cb22089cc2358b2b995c09578224f142de6039" }, "nvim-hlslens": { "branch": "main", "commit": "be2d7b2be01860b5445a007ff2bc72b29896db6b" }, - "nvim-lspconfig": { "branch": "master", "commit": "dd261ad5266ab5bbec249d21efeceda98ff3e1a6" }, + "nvim-lspconfig": { "branch": "master", "commit": "dc2f86d2b66a6e01a98c37cdadd3be3e90f8ab9a" }, "nvim-scrollbar": { "branch": "main", "commit": "f8e87b96cd6362ef8579be456afee3b38fd7e2a8" }, "nvim-surround": { "branch": "main", "commit": "61319d4bd1c5e336e197defa15bd104c51f0fb29" }, - "nvim-treesitter": { "branch": "main", "commit": "2f5d4c3f3c675962242096bcc8e586d76dd72eb2" }, + "nvim-treesitter": { "branch": "main", "commit": "2cc172c28e5550e00e6beead4599b1469469c1c7" }, "nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" }, "onedarkpro.nvim": { "branch": "main", "commit": "dab7b623d48b50330c43234958c0ba2de9b501d5" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, From 3ea1df826b00e3414c5c63b670967dc874fe3d7b Mon Sep 17 00:00:00 2001 From: Vicente Date: Thu, 26 Mar 2026 08:59:08 +0100 Subject: [PATCH 14/35] updated deps --- lazy-lock.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index d5c2e40..a312979 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -6,36 +6,36 @@ "blink.cmp": { "branch": "main", "commit": "451168851e8e2466bc97ee3e026c3dcb9141ce07" }, "codediff.nvim": { "branch": "main", "commit": "0a2f5d71cdf2e8e0ca37acb604cf7cb09998b045" }, "conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" }, - "copilot.lua": { "branch": "master", "commit": "8e2a91828210d6043744468f6d7027d256a41f42" }, + "copilot.lua": { "branch": "master", "commit": "538f15c4eaad8661389a4a0d1ace2d6e079fac29" }, "cutlass.nvim": { "branch": "main", "commit": "d01b5c1943050fcda8edf5c89d4419c41a65890e" }, "definition-or-references.nvim": { "branch": "main", "commit": "7318f9479d2db357d2908599c3ec14bec7c589dd" }, "fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, - "gitsigns.nvim": { "branch": "main", "commit": "7c4faa3540d0781a28588cafbd4dd187a28ac6e3" }, + "gitsigns.nvim": { "branch": "main", "commit": "0a80125bace82d82847d40bc2c38a22d62c6dc2d" }, "harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, - "live-server.nvim": { "branch": "main", "commit": "446b2211de3819f67e807b768ebd200054e1cf06" }, + "live-server.nvim": { "branch": "main", "commit": "1ee8ab4cbd18e2b2b38236321a73edcaba023fbd" }, "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, - "markdown-preview.nvim": { "branch": "main", "commit": "d211d554e1e7f57088419b2d9349cf02eb311271" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "a676ab7282da8d651e175118bcf54483ca11e46d" }, + "markdown-preview.nvim": { "branch": "main", "commit": "793b32e327bd51143d7cc345aa3ecd10c357ddee" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "a979821a975897b88493843301950c456a725982" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" }, "mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" }, - "multicursor.nvim": { "branch": "1.0", "commit": "811681faf44d8031685614cc00a148cd3ece697c" }, + "multicursor.nvim": { "branch": "1.0", "commit": "704b99f10a72cc05d370cfeb294ff83412a8ab55" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "9d6826582a3e8c84787bd7355df22a2812a1ad59" }, "neominimap.nvim": { "branch": "main", "commit": "6a9d8b0d2f2c0d9d7853b377fa225990cb24837a" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" }, "nvim-highlight-colors": { "branch": "main", "commit": "e2cb22089cc2358b2b995c09578224f142de6039" }, "nvim-hlslens": { "branch": "main", "commit": "be2d7b2be01860b5445a007ff2bc72b29896db6b" }, - "nvim-lspconfig": { "branch": "master", "commit": "dc2f86d2b66a6e01a98c37cdadd3be3e90f8ab9a" }, + "nvim-lspconfig": { "branch": "master", "commit": "46204c8fdaa36a9aa3768780450e4bc7a210025f" }, "nvim-scrollbar": { "branch": "main", "commit": "f8e87b96cd6362ef8579be456afee3b38fd7e2a8" }, "nvim-surround": { "branch": "main", "commit": "61319d4bd1c5e336e197defa15bd104c51f0fb29" }, - "nvim-treesitter": { "branch": "main", "commit": "2cc172c28e5550e00e6beead4599b1469469c1c7" }, + "nvim-treesitter": { "branch": "main", "commit": "6620ae1c44dfa8623b22d0cbf873a9e8d073b849" }, "nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" }, "onedarkpro.nvim": { "branch": "main", "commit": "dab7b623d48b50330c43234958c0ba2de9b501d5" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "scope.nvim": { "branch": "main", "commit": "228aabdb1b9cc74f0c0ccec88e79873857236e49" }, - "snacks.nvim": { "branch": "main", "commit": "a049339328e2599ad6e85a69fa034ac501e921b2" }, + "snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" }, "ts-comments.nvim": { "branch": "main", "commit": "123a9fb12e7229342f807ec9e6de478b1102b041" }, "wildfire.nvim": { "branch": "master", "commit": "918a1873c2b8010baa034f373cf28c53ce4f038f" } } From f1c86a31f3d989d8eaae184deef78babbf7ce538 Mon Sep 17 00:00:00 2001 From: Vicente Date: Wed, 1 Apr 2026 09:45:11 +0200 Subject: [PATCH 15/35] updated deps --- lazy-lock.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index a312979..708593d 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -6,31 +6,31 @@ "blink.cmp": { "branch": "main", "commit": "451168851e8e2466bc97ee3e026c3dcb9141ce07" }, "codediff.nvim": { "branch": "main", "commit": "0a2f5d71cdf2e8e0ca37acb604cf7cb09998b045" }, "conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" }, - "copilot.lua": { "branch": "master", "commit": "538f15c4eaad8661389a4a0d1ace2d6e079fac29" }, + "copilot.lua": { "branch": "master", "commit": "faa347cef2a9429eec14dada549e000a3b8d0fc9" }, "cutlass.nvim": { "branch": "main", "commit": "d01b5c1943050fcda8edf5c89d4419c41a65890e" }, "definition-or-references.nvim": { "branch": "main", "commit": "7318f9479d2db357d2908599c3ec14bec7c589dd" }, "fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, - "gitsigns.nvim": { "branch": "main", "commit": "0a80125bace82d82847d40bc2c38a22d62c6dc2d" }, + "gitsigns.nvim": { "branch": "main", "commit": "0f00d07c2c3106ba6abd594ac1c17f211141b7b5" }, "harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "live-server.nvim": { "branch": "main", "commit": "1ee8ab4cbd18e2b2b38236321a73edcaba023fbd" }, "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, "markdown-preview.nvim": { "branch": "main", "commit": "793b32e327bd51143d7cc345aa3ecd10c357ddee" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "a979821a975897b88493843301950c456a725982" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "25f609e7fca78af7cede4f9fa3af8a94b1c4950b" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" }, "mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" }, "multicursor.nvim": { "branch": "1.0", "commit": "704b99f10a72cc05d370cfeb294ff83412a8ab55" }, - "neo-tree.nvim": { "branch": "v3.x", "commit": "9d6826582a3e8c84787bd7355df22a2812a1ad59" }, - "neominimap.nvim": { "branch": "main", "commit": "6a9d8b0d2f2c0d9d7853b377fa225990cb24837a" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "84c75e7a7e443586f60508d12fc50f90d9aee14e" }, + "neominimap.nvim": { "branch": "main", "commit": "5538a69ecf833c705973d5fb8c2bccd3f2cecf93" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" }, "nvim-highlight-colors": { "branch": "main", "commit": "e2cb22089cc2358b2b995c09578224f142de6039" }, "nvim-hlslens": { "branch": "main", "commit": "be2d7b2be01860b5445a007ff2bc72b29896db6b" }, - "nvim-lspconfig": { "branch": "master", "commit": "46204c8fdaa36a9aa3768780450e4bc7a210025f" }, + "nvim-lspconfig": { "branch": "master", "commit": "8e2084bf5e40c79c1f42210a6ef96a0a4793a763" }, "nvim-scrollbar": { "branch": "main", "commit": "f8e87b96cd6362ef8579be456afee3b38fd7e2a8" }, "nvim-surround": { "branch": "main", "commit": "61319d4bd1c5e336e197defa15bd104c51f0fb29" }, - "nvim-treesitter": { "branch": "main", "commit": "6620ae1c44dfa8623b22d0cbf873a9e8d073b849" }, + "nvim-treesitter": { "branch": "main", "commit": "7caec274fd19c12b55902a5b795100d21531391f" }, "nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" }, "onedarkpro.nvim": { "branch": "main", "commit": "dab7b623d48b50330c43234958c0ba2de9b501d5" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, From 5048fef63b13ad1da4ad44834f9727f386fe645e Mon Sep 17 00:00:00 2001 From: Vicente Date: Wed, 1 Apr 2026 09:49:51 +0200 Subject: [PATCH 16/35] updated deps --- lazy-lock.json | 2 +- lua/plugins/codediff.lua | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 708593d..3c878dc 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -4,7 +4,7 @@ "auto-session": { "branch": "main", "commit": "62437532b38495551410b3f377bcf4aaac574ebe" }, "barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" }, "blink.cmp": { "branch": "main", "commit": "451168851e8e2466bc97ee3e026c3dcb9141ce07" }, - "codediff.nvim": { "branch": "main", "commit": "0a2f5d71cdf2e8e0ca37acb604cf7cb09998b045" }, + "codediff.nvim": { "branch": "main", "commit": "832f1ecc5f8b15a44cf7537e31d3266d657775b1" }, "conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" }, "copilot.lua": { "branch": "master", "commit": "faa347cef2a9429eec14dada549e000a3b8d0fc9" }, "cutlass.nvim": { "branch": "main", "commit": "d01b5c1943050fcda8edf5c89d4419c41a65890e" }, diff --git a/lua/plugins/codediff.lua b/lua/plugins/codediff.lua index 5ca5e94..f583874 100644 --- a/lua/plugins/codediff.lua +++ b/lua/plugins/codediff.lua @@ -7,8 +7,6 @@ return { }, opts = { explorer = { - position = "right", - -- width = 40, view_mode = "tree", }, keymaps = { From 1abfd10de6e094408c63ed95edbccd1d0f6233cc Mon Sep 17 00:00:00 2001 From: Vicente Date: Wed, 1 Apr 2026 21:11:57 +0200 Subject: [PATCH 17/35] fix windows clipboard error due to timeout = 0 --- lua/options.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/options.lua b/lua/options.lua index 9a95ae9..d76c5ae 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -15,7 +15,7 @@ vim.o.softtabstop = 2 -- Defines the number of spaces to insert for a key vim.o.tabstop = 2 -- Sets the number of spaces a character counts for vim.o.splitright = true -- Opens new vertical splits to the right of the current split vim.o.timeoutlen = 500 -- Sets the time in milliseconds to wait for key codes -vim.o.ttimeoutlen = 0 -- Disables the time Neovim waits for a key code +vim.o.ttimeoutlen = 1 -- Disables the time Neovim waits for a key code vim.wo.scl = "yes" -- Sets "sidescrolloff" to "yes," making the cursor stay a certain number of columns away from the screen edge when scrolling horizontally vim.o.scrolloff = 20 -- Specifies the minimum number of screen lines to keep above and below the cursor vim.o.pumheight = 10 -- Sets the maximum height of the popup menu From ab2eb3a20956d4e06e6deb614e970eb9c431d985 Mon Sep 17 00:00:00 2001 From: Vicente Date: Wed, 1 Apr 2026 21:12:27 +0200 Subject: [PATCH 18/35] removed wildfire in favour of native incremental selection --- lazy-lock.json | 11 +++++------ lua/keymaps.lua | 17 +++++++++++++++++ lua/plugins/wildfire.lua | 15 --------------- 3 files changed, 22 insertions(+), 21 deletions(-) delete mode 100644 lua/plugins/wildfire.lua diff --git a/lazy-lock.json b/lazy-lock.json index 3c878dc..5542b2b 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,6 +1,6 @@ { "LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" }, - "auto-dark-mode.nvim": { "branch": "master", "commit": "e300259ec777a40b4b9e3c8e6ade203e78d15881" }, + "auto-dark-mode.nvim": { "branch": "main", "commit": "54058b4fe414bd64bd2904a6f8a63f1f14e3d8df" }, "auto-session": { "branch": "main", "commit": "62437532b38495551410b3f377bcf4aaac574ebe" }, "barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" }, "blink.cmp": { "branch": "main", "commit": "451168851e8e2466bc97ee3e026c3dcb9141ce07" }, @@ -9,11 +9,11 @@ "copilot.lua": { "branch": "master", "commit": "faa347cef2a9429eec14dada549e000a3b8d0fc9" }, "cutlass.nvim": { "branch": "main", "commit": "d01b5c1943050fcda8edf5c89d4419c41a65890e" }, "definition-or-references.nvim": { "branch": "main", "commit": "7318f9479d2db357d2908599c3ec14bec7c589dd" }, - "fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" }, + "fidget.nvim": { "branch": "main", "commit": "889e2e96edef4e144965571d46f7a77bcc4d0ddf" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, "gitsigns.nvim": { "branch": "main", "commit": "0f00d07c2c3106ba6abd594ac1c17f211141b7b5" }, "harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" }, - "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, + "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, "live-server.nvim": { "branch": "main", "commit": "1ee8ab4cbd18e2b2b38236321a73edcaba023fbd" }, "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, "markdown-preview.nvim": { "branch": "main", "commit": "793b32e327bd51143d7cc345aa3ecd10c357ddee" }, @@ -30,12 +30,11 @@ "nvim-lspconfig": { "branch": "master", "commit": "8e2084bf5e40c79c1f42210a6ef96a0a4793a763" }, "nvim-scrollbar": { "branch": "main", "commit": "f8e87b96cd6362ef8579be456afee3b38fd7e2a8" }, "nvim-surround": { "branch": "main", "commit": "61319d4bd1c5e336e197defa15bd104c51f0fb29" }, - "nvim-treesitter": { "branch": "main", "commit": "7caec274fd19c12b55902a5b795100d21531391f" }, + "nvim-treesitter": { "branch": "main", "commit": "c82bf96f0a773d85304feeb695e1e23b2207ac35" }, "nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" }, "onedarkpro.nvim": { "branch": "main", "commit": "dab7b623d48b50330c43234958c0ba2de9b501d5" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "scope.nvim": { "branch": "main", "commit": "228aabdb1b9cc74f0c0ccec88e79873857236e49" }, "snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" }, - "ts-comments.nvim": { "branch": "main", "commit": "123a9fb12e7229342f807ec9e6de478b1102b041" }, - "wildfire.nvim": { "branch": "master", "commit": "918a1873c2b8010baa034f373cf28c53ce4f038f" } + "ts-comments.nvim": { "branch": "main", "commit": "123a9fb12e7229342f807ec9e6de478b1102b041" } } diff --git a/lua/keymaps.lua b/lua/keymaps.lua index 5794125..775890e 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -176,3 +176,20 @@ vim.keymap.set("n", "ff", "za", { desc = "Toggle fold" }) -- Search in visual mode vim.keymap.set("x", "/", "`", function() + if vim.treesitter.get_parser(nil, nil, { error = false }) then + require("vim.treesitter._select").select_parent(vim.v.count1) + else + vim.lsp.buf.selection_range(vim.v.count1) + end +end, { desc = "Select parent treesitter node or outer incremental lsp selections" }) + +vim.keymap.set({ "n", "x", "o" }, f.isMac() and "" or "⊘", function() + if vim.treesitter.get_parser(nil, nil, { error = false }) then + require("vim.treesitter._select").select_child(vim.v.count1) + else + vim.lsp.buf.selection_range(-vim.v.count1) + end +end, { desc = "Select child treesitter node or inner incremental lsp selections" }) diff --git a/lua/plugins/wildfire.lua b/lua/plugins/wildfire.lua deleted file mode 100644 index 4a449b5..0000000 --- a/lua/plugins/wildfire.lua +++ /dev/null @@ -1,15 +0,0 @@ -local f = require("plugins.common.utils") -return { - "sustech-data/wildfire.nvim", - event = "VeryLazy", - dependencies = { - "nvim-treesitter/nvim-treesitter", - }, - opts = { - keymaps = { - init_selection = "", - node_incremental = "", - node_decremental = f.isMac() and "" or "⊘", -- strange unicode mapped in windows because it cant understand shift+enter - }, - }, -} From a88d75ae170bd943df567024366c65d13b8135ef Mon Sep 17 00:00:00 2001 From: Vicente Date: Wed, 1 Apr 2026 21:42:34 +0200 Subject: [PATCH 19/35] bring back wildfire --- lazy-lock.json | 3 ++- lua/keymaps.lua | 17 ----------------- lua/plugins/wildfire.lua | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 18 deletions(-) create mode 100644 lua/plugins/wildfire.lua diff --git a/lazy-lock.json b/lazy-lock.json index 5542b2b..c147fa6 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -36,5 +36,6 @@ "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "scope.nvim": { "branch": "main", "commit": "228aabdb1b9cc74f0c0ccec88e79873857236e49" }, "snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" }, - "ts-comments.nvim": { "branch": "main", "commit": "123a9fb12e7229342f807ec9e6de478b1102b041" } + "ts-comments.nvim": { "branch": "main", "commit": "123a9fb12e7229342f807ec9e6de478b1102b041" }, + "wildfire.nvim": { "branch": "master", "commit": "918a1873c2b8010baa034f373cf28c53ce4f038f" } } diff --git a/lua/keymaps.lua b/lua/keymaps.lua index 775890e..5794125 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -176,20 +176,3 @@ vim.keymap.set("n", "ff", "za", { desc = "Toggle fold" }) -- Search in visual mode vim.keymap.set("x", "/", "`", function() - if vim.treesitter.get_parser(nil, nil, { error = false }) then - require("vim.treesitter._select").select_parent(vim.v.count1) - else - vim.lsp.buf.selection_range(vim.v.count1) - end -end, { desc = "Select parent treesitter node or outer incremental lsp selections" }) - -vim.keymap.set({ "n", "x", "o" }, f.isMac() and "" or "⊘", function() - if vim.treesitter.get_parser(nil, nil, { error = false }) then - require("vim.treesitter._select").select_child(vim.v.count1) - else - vim.lsp.buf.selection_range(-vim.v.count1) - end -end, { desc = "Select child treesitter node or inner incremental lsp selections" }) diff --git a/lua/plugins/wildfire.lua b/lua/plugins/wildfire.lua new file mode 100644 index 0000000..4a449b5 --- /dev/null +++ b/lua/plugins/wildfire.lua @@ -0,0 +1,15 @@ +local f = require("plugins.common.utils") +return { + "sustech-data/wildfire.nvim", + event = "VeryLazy", + dependencies = { + "nvim-treesitter/nvim-treesitter", + }, + opts = { + keymaps = { + init_selection = "", + node_incremental = "", + node_decremental = f.isMac() and "" or "⊘", -- strange unicode mapped in windows because it cant understand shift+enter + }, + }, +} From 6126a7cf866c1cf1a3e39e1c464aaf1d830bc2df Mon Sep 17 00:00:00 2001 From: Vicente Date: Sat, 4 Apr 2026 12:40:23 +0200 Subject: [PATCH 20/35] bring back some borders --- lua/options.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/options.lua b/lua/options.lua index d76c5ae..d18c86a 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -26,6 +26,7 @@ vim.filetype.add({ }, }) vim.o.mousescroll = f.isMac() and "ver:1,hor:1" or "ver:3,hor:3" +vim.o.winborder = "rounded" -- Reserve a space in the gutter -- This will avoid an annoying layout shift in the screen From b84fe8220f64ca8cd73943523404483c09226806 Mon Sep 17 00:00:00 2001 From: Vicente Date: Sat, 4 Apr 2026 13:20:31 +0200 Subject: [PATCH 21/35] added unstaged hunks to navigation --- lua/plugins/gitsigns.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index 7509839..f4a1ca3 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -19,10 +19,10 @@ return { }, on_attach = function(bufnr) vim.keymap.set("n", "", function() - gitsigns.nav_hunk("prev") + gitsigns.nav_hunk("prev", { target = "all" }) end, { buffer = bufnr }) vim.keymap.set("n", "", function() - gitsigns.nav_hunk("next") + gitsigns.nav_hunk("next", { target = "all" }) end, { buffer = bufnr }) vim.keymap.set("n", "gi", gitsigns.preview_hunk) vim.keymap.set("n", "gu", gitsigns.reset_hunk) From dd47bd57ca025ebfa7a5ea5de2094b6e4cf4629d Mon Sep 17 00:00:00 2001 From: Vicente Date: Sat, 4 Apr 2026 15:11:40 +0200 Subject: [PATCH 22/35] undo added unstaged hunks to navigation --- lua/plugins/gitsigns.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index f4a1ca3..7509839 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -19,10 +19,10 @@ return { }, on_attach = function(bufnr) vim.keymap.set("n", "", function() - gitsigns.nav_hunk("prev", { target = "all" }) + gitsigns.nav_hunk("prev") end, { buffer = bufnr }) vim.keymap.set("n", "", function() - gitsigns.nav_hunk("next", { target = "all" }) + gitsigns.nav_hunk("next") end, { buffer = bufnr }) vim.keymap.set("n", "gi", gitsigns.preview_hunk) vim.keymap.set("n", "gu", gitsigns.reset_hunk) From dcf694187957161c83dd5380b606011cc2673426 Mon Sep 17 00:00:00 2001 From: Vicente Date: Thu, 9 Apr 2026 23:40:14 +0200 Subject: [PATCH 23/35] migrate from lazy.vim to native vim.pack --- init.lua | 28 +- lazy-lock.json | 41 --- lua/{plugins => }/common/utils.lua | 0 lua/keymaps.lua | 10 +- lua/options.lua | 2 +- lua/plugins/autopairs.lua | 17 -- lua/plugins/barbar.lua | 102 ------- lua/plugins/blink.lua | 49 ---- lua/plugins/codediff.lua | 19 -- lua/plugins/colorizer.lua | 8 - lua/plugins/colorscheme.lua | 36 --- lua/plugins/comment.lua | 6 - lua/plugins/conform.lua | 55 ---- lua/plugins/copilot.lua | 21 -- lua/plugins/cutlass.lua | 9 - lua/plugins/definition-or-references.lua | 23 -- lua/plugins/gitsigns.lua | 36 --- lua/plugins/harpoon.lua | 52 ---- lua/plugins/init.lua | 1 - lua/plugins/lsp.lua | 48 ---- lua/plugins/lualine.lua | 64 ----- lua/plugins/markdown-preview.lua | 12 - lua/plugins/minimap.lua | 23 -- lua/plugins/multicursor.lua | 39 --- lua/plugins/neo-tree.lua | 115 -------- lua/plugins/nvim-surround.lua | 36 --- lua/plugins/scope.lua | 4 - lua/plugins/sessions.lua | 12 - lua/plugins/snacks.lua | 350 ----------------------- lua/plugins/treesitter.lua | 48 ---- lua/plugins/vim-scrollbar.lua | 36 --- lua/plugins/wildfire.lua | 15 - nvim-pack-lock.json | 161 +++++++++++ plugin/00-colorscheme.lua | 25 ++ plugin/01-treesitter.lua | 38 +++ plugin/02-blink.lua | 51 ++++ plugin/03-lsp.lua | 45 +++ plugin/autopairs.lua | 9 + plugin/barbar.lua | 111 +++++++ plugin/codediff.lua | 11 + plugin/colorizer.lua | 2 + plugin/conform.lua | 45 +++ plugin/copilot.lua | 12 + plugin/cutlass.lua | 2 + plugin/definition-or-references.lua | 14 + plugin/gitsigns.lua | 51 ++++ plugin/harpoon.lua | 48 ++++ plugin/lualine.lua | 48 ++++ plugin/markdown-preview.lua | 9 + plugin/multicursor.lua | 27 ++ plugin/neo-tree.lua | 86 ++++++ plugin/neominimap.lua | 11 + plugin/nvim-surround.lua | 16 ++ plugin/sessions.lua | 8 + plugin/snacks.lua | 223 +++++++++++++++ plugin/ts-comments.lua | 3 + plugin/wildfire.lua | 13 + 57 files changed, 1092 insertions(+), 1294 deletions(-) delete mode 100644 lazy-lock.json rename lua/{plugins => }/common/utils.lua (100%) delete mode 100644 lua/plugins/autopairs.lua delete mode 100644 lua/plugins/barbar.lua delete mode 100644 lua/plugins/blink.lua delete mode 100644 lua/plugins/codediff.lua delete mode 100644 lua/plugins/colorizer.lua delete mode 100644 lua/plugins/colorscheme.lua delete mode 100644 lua/plugins/comment.lua delete mode 100644 lua/plugins/conform.lua delete mode 100644 lua/plugins/copilot.lua delete mode 100644 lua/plugins/cutlass.lua delete mode 100644 lua/plugins/definition-or-references.lua delete mode 100644 lua/plugins/gitsigns.lua delete mode 100644 lua/plugins/harpoon.lua delete mode 100644 lua/plugins/init.lua delete mode 100644 lua/plugins/lsp.lua delete mode 100644 lua/plugins/lualine.lua delete mode 100644 lua/plugins/markdown-preview.lua delete mode 100644 lua/plugins/minimap.lua delete mode 100644 lua/plugins/multicursor.lua delete mode 100644 lua/plugins/neo-tree.lua delete mode 100644 lua/plugins/nvim-surround.lua delete mode 100644 lua/plugins/scope.lua delete mode 100644 lua/plugins/sessions.lua delete mode 100644 lua/plugins/snacks.lua delete mode 100644 lua/plugins/treesitter.lua delete mode 100644 lua/plugins/vim-scrollbar.lua delete mode 100644 lua/plugins/wildfire.lua create mode 100644 nvim-pack-lock.json create mode 100644 plugin/00-colorscheme.lua create mode 100644 plugin/01-treesitter.lua create mode 100644 plugin/02-blink.lua create mode 100644 plugin/03-lsp.lua create mode 100644 plugin/autopairs.lua create mode 100644 plugin/barbar.lua create mode 100644 plugin/codediff.lua create mode 100644 plugin/colorizer.lua create mode 100644 plugin/conform.lua create mode 100644 plugin/copilot.lua create mode 100644 plugin/cutlass.lua create mode 100644 plugin/definition-or-references.lua create mode 100644 plugin/gitsigns.lua create mode 100644 plugin/harpoon.lua create mode 100644 plugin/lualine.lua create mode 100644 plugin/markdown-preview.lua create mode 100644 plugin/multicursor.lua create mode 100644 plugin/neo-tree.lua create mode 100644 plugin/neominimap.lua create mode 100644 plugin/nvim-surround.lua create mode 100644 plugin/sessions.lua create mode 100644 plugin/snacks.lua create mode 100644 plugin/ts-comments.lua create mode 100644 plugin/wildfire.lua diff --git a/init.lua b/init.lua index c706f35..1a00b36 100644 --- a/init.lua +++ b/init.lua @@ -1,20 +1,18 @@ -require("options") - -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) -end -vim.opt.rtp:prepend(lazypath) +vim.loader.enable() +require("options") require("keymaps") require("autocmd") require("commands") -require("lazy").setup("plugins", { change_detection = { notify = false } }) +vim.api.nvim_create_autocmd("PackChanged", { + callback = function(ev) + local name, kind = ev.data.spec.name, ev.data.kind + if name == "nvim-treesitter" and kind == "update" then + if not ev.data.active then + vim.cmd.packadd("nvim-treesitter") + end + vim.cmd("TSUpdate") + end + end, +}) diff --git a/lazy-lock.json b/lazy-lock.json deleted file mode 100644 index c147fa6..0000000 --- a/lazy-lock.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" }, - "auto-dark-mode.nvim": { "branch": "main", "commit": "54058b4fe414bd64bd2904a6f8a63f1f14e3d8df" }, - "auto-session": { "branch": "main", "commit": "62437532b38495551410b3f377bcf4aaac574ebe" }, - "barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" }, - "blink.cmp": { "branch": "main", "commit": "451168851e8e2466bc97ee3e026c3dcb9141ce07" }, - "codediff.nvim": { "branch": "main", "commit": "832f1ecc5f8b15a44cf7537e31d3266d657775b1" }, - "conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" }, - "copilot.lua": { "branch": "master", "commit": "faa347cef2a9429eec14dada549e000a3b8d0fc9" }, - "cutlass.nvim": { "branch": "main", "commit": "d01b5c1943050fcda8edf5c89d4419c41a65890e" }, - "definition-or-references.nvim": { "branch": "main", "commit": "7318f9479d2db357d2908599c3ec14bec7c589dd" }, - "fidget.nvim": { "branch": "main", "commit": "889e2e96edef4e144965571d46f7a77bcc4d0ddf" }, - "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, - "gitsigns.nvim": { "branch": "main", "commit": "0f00d07c2c3106ba6abd594ac1c17f211141b7b5" }, - "harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" }, - "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, - "live-server.nvim": { "branch": "main", "commit": "1ee8ab4cbd18e2b2b38236321a73edcaba023fbd" }, - "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, - "markdown-preview.nvim": { "branch": "main", "commit": "793b32e327bd51143d7cc345aa3ecd10c357ddee" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "25f609e7fca78af7cede4f9fa3af8a94b1c4950b" }, - "mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" }, - "mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" }, - "multicursor.nvim": { "branch": "1.0", "commit": "704b99f10a72cc05d370cfeb294ff83412a8ab55" }, - "neo-tree.nvim": { "branch": "v3.x", "commit": "84c75e7a7e443586f60508d12fc50f90d9aee14e" }, - "neominimap.nvim": { "branch": "main", "commit": "5538a69ecf833c705973d5fb8c2bccd3f2cecf93" }, - "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, - "nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" }, - "nvim-highlight-colors": { "branch": "main", "commit": "e2cb22089cc2358b2b995c09578224f142de6039" }, - "nvim-hlslens": { "branch": "main", "commit": "be2d7b2be01860b5445a007ff2bc72b29896db6b" }, - "nvim-lspconfig": { "branch": "master", "commit": "8e2084bf5e40c79c1f42210a6ef96a0a4793a763" }, - "nvim-scrollbar": { "branch": "main", "commit": "f8e87b96cd6362ef8579be456afee3b38fd7e2a8" }, - "nvim-surround": { "branch": "main", "commit": "61319d4bd1c5e336e197defa15bd104c51f0fb29" }, - "nvim-treesitter": { "branch": "main", "commit": "c82bf96f0a773d85304feeb695e1e23b2207ac35" }, - "nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" }, - "onedarkpro.nvim": { "branch": "main", "commit": "dab7b623d48b50330c43234958c0ba2de9b501d5" }, - "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, - "scope.nvim": { "branch": "main", "commit": "228aabdb1b9cc74f0c0ccec88e79873857236e49" }, - "snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" }, - "ts-comments.nvim": { "branch": "main", "commit": "123a9fb12e7229342f807ec9e6de478b1102b041" }, - "wildfire.nvim": { "branch": "master", "commit": "918a1873c2b8010baa034f373cf28c53ce4f038f" } -} diff --git a/lua/plugins/common/utils.lua b/lua/common/utils.lua similarity index 100% rename from lua/plugins/common/utils.lua rename to lua/common/utils.lua diff --git a/lua/keymaps.lua b/lua/keymaps.lua index 5794125..95e75e2 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -1,4 +1,4 @@ -local f = require("plugins.common.utils") +local f = require("common.utils") local marks = require("marks") local function feedkeys(keys) @@ -176,3 +176,11 @@ vim.keymap.set("n", "ff", "za", { desc = "Toggle fold" }) -- Search in visual mode vim.keymap.set("x", "/", "`pu", function() + vim.pack.update() +end, { desc = "vimpack update - code action to skip some" }) + +vim.keymap.set("n", "pr", function() + vim.pack.update(nil, { target = "lockfile", force = true }) +end, { desc = "vimpack to lockfile versions" }) diff --git a/lua/options.lua b/lua/options.lua index d18c86a..6aea1bb 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -1,4 +1,4 @@ -local f = require("plugins.common.utils") +local f = require("common.utils") vim.o.clipboard = "unnamedplus" -- Enables system clipboard integration; yanked text will be available in the system clipboard vim.o.expandtab = true -- Converts tabs to spaces when you input them diff --git a/lua/plugins/autopairs.lua b/lua/plugins/autopairs.lua deleted file mode 100644 index 30d0444..0000000 --- a/lua/plugins/autopairs.lua +++ /dev/null @@ -1,17 +0,0 @@ -return { - "windwp/nvim-autopairs", - event = "InsertEnter", - config = function() - -- import nvim-autopairs - local autopairs = require("nvim-autopairs") - - -- configure autopairs - autopairs.setup({ - check_ts = true, -- enable treesitter - ts_config = { - lua = { "string" }, -- don't add pairs in lua string treesitter nodes - javascript = { "template_string" }, -- don't add pairs in javscript template_string treesitter nodes - }, - }) - end, -} diff --git a/lua/plugins/barbar.lua b/lua/plugins/barbar.lua deleted file mode 100644 index 926009c..0000000 --- a/lua/plugins/barbar.lua +++ /dev/null @@ -1,102 +0,0 @@ -local f = require("plugins.common.utils") - -return { - "romgrk/barbar.nvim", - event = "VeryLazy", - dependencies = { - "lewis6991/gitsigns.nvim", - "nvim-tree/nvim-web-devicons", - }, - init = function() - vim.g.barbar_auto_setup = false - end, - config = function() - local barbar = require("barbar") - local state = require("barbar.state") - local render = require("barbar.ui.render") - local harpoon = require("harpoon") - - barbar.setup({ - animation = false, - tabpages = false, - icons = { - button = false, - pinned = { filename = true, buffer_index = true }, - diagnostics = { - [vim.diagnostic.severity.ERROR] = { enabled = true, icon = f.diagnosticIcons.ERROR }, - }, - separator = { - left = " ", - }, - }, - }) - - f.HighlightGroups.register(function() - local default_error_hl = vim.api.nvim_get_hl(0, { name = "ErrorMsg" }) - local default_buffer_hl = - vim.tbl_extend("force", vim.api.nvim_get_hl(0, { name = "Directory" }), { bold = true }) - - vim.api.nvim_set_hl(0, "BufferVisibleERROR", default_error_hl) - vim.api.nvim_set_hl(0, "BufferCurrentERROR", default_error_hl) - vim.api.nvim_set_hl(0, "BufferCurrent", default_buffer_hl) - vim.api.nvim_set_hl(0, "BufferCurrentMod", default_buffer_hl) - vim.api.nvim_set_hl(0, "BufferCurrentSign", default_buffer_hl) - end) - - vim.keymap.set({ "n", "v" }, "", ":BufferPrevious", { silent = true }) - vim.keymap.set({ "n", "v" }, "", ":BufferNext", { silent = true }) - vim.keymap.set("n", "<", ":BufferMovePrevious", { silent = true }) - vim.keymap.set("n", ">", ":BufferMoveNext", { silent = true }) - - local function unpin_all() - for _, buf in ipairs(state.buffers) do - local data = state.get_buffer_data(buf) - data.pinned = false - end - end - - local function get_buffer_by_mark(mark) - for _, buf in ipairs(vim.api.nvim_list_bufs()) do - local buffer_path = vim.api.nvim_buf_get_name(buf) - - if buffer_path == "" or mark.value == "" then - goto continue - end - - local mark_pattern = mark.value:gsub("([%(%)%.%%%+%-%*%?%[%]%^%$])", "%%%1") - if string.match(buffer_path, mark_pattern) then - return buf - end - - local buffer_path_pattern = buffer_path:gsub("([%(%)%.%%%+%-%*%?%[%]%^%$])", "%%%1") - if string.match(mark.value, buffer_path_pattern) then - return buf - end - - ::continue:: - end - end - - local function refresh_all_harpoon_tabs() - local list = harpoon:list() - unpin_all() - for _, mark in ipairs(list.items) do - local buf = get_buffer_by_mark(mark) - if buf == nil then - vim.cmd("badd " .. mark.value) - buf = get_buffer_by_mark(mark) - end - if buf ~= nil then - state.toggle_pin(buf) - end - end - render.update() - end - - vim.api.nvim_create_autocmd({ "BufEnter", "BufAdd", "BufLeave", "User" }, { - pattern = { "*", "HarpoonRefresh" }, -- Add a specific pattern for User event - callback = refresh_all_harpoon_tabs, - }) - end, - version = "^1.0.0", -} diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua deleted file mode 100644 index f6b580f..0000000 --- a/lua/plugins/blink.lua +++ /dev/null @@ -1,49 +0,0 @@ -local f = require("plugins.common.utils") -return { - "saghen/blink.cmp", - dependencies = { - "rafamadriz/friendly-snippets", - { "L3MON4D3/LuaSnip", version = "v2.*" }, - }, - version = "v1.*", - opts = { - sources = { - default = function() - if vim.bo.filetype == "copilot-chat" then - return {} - end - return { "lsp", "path", "buffer" } - end, - }, - keymap = { - preset = "enter", - [f.isMac() and "" or "⊘"] = { "show", "hide" }, - [""] = {}, - [""] = {}, - [""] = {}, - [""] = {}, - [""] = { "scroll_documentation_up", "fallback" }, - [""] = { "scroll_documentation_down", "fallback" }, - }, - appearance = { - nerd_font_variant = "normal", - }, - signature = { - enabled = true, - }, - completion = { - menu = { - draw = { - columns = { { "kind_icon" }, { "label", "label_description", gap = 1 }, { "kind" } }, - }, - }, - documentation = { - auto_show = true, - auto_show_delay_ms = 0, - }, - }, - snippets = { - preset = "luasnip", - }, - }, -} diff --git a/lua/plugins/codediff.lua b/lua/plugins/codediff.lua deleted file mode 100644 index f583874..0000000 --- a/lua/plugins/codediff.lua +++ /dev/null @@ -1,19 +0,0 @@ -return { - "esmuellert/codediff.nvim", - dependencies = { "MunifTanjim/nui.nvim" }, - cmd = "CodeDiff", - keys = { - { "dd", "CodeDiff", desc = "Code diff" }, - }, - opts = { - explorer = { - view_mode = "tree", - }, - keymaps = { - view = { - next_file = "", - prev_file = "", - }, - }, - }, -} diff --git a/lua/plugins/colorizer.lua b/lua/plugins/colorizer.lua deleted file mode 100644 index 9344157..0000000 --- a/lua/plugins/colorizer.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - "brenoprata10/nvim-highlight-colors", - config = function() - require("nvim-highlight-colors").setup({ - enable_tailwind = true, - }) - end, -} diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua deleted file mode 100644 index 60daea8..0000000 --- a/lua/plugins/colorscheme.lua +++ /dev/null @@ -1,36 +0,0 @@ -local f = require("plugins.common.utils") - -return { - { - -- windows with wsl does not listen for background change - -- last message in: https://chatgpt.com/share/681f1213-6938-8013-adcb-802845e8bb32 - "f-person/auto-dark-mode.nvim", - enabled = not f.isMac(), - opts = {}, - }, - { - "olimorris/onedarkpro.nvim", - priority = 1000, -- Ensure it loads first - config = function() - require("onedarkpro").setup({ - styles = { - functions = "bold", - }, - highlights = { - LspReferenceText = { link = "CursorColumn", extend = true }, - NeoTreeCursorLine = { bg = "${cursorline}", bold = true }, -- Neo-tree/onedarkpro bug fix - NeominimapCursorLine = { bg = "${gray}", bold = true }, -- Neo-tree/onedarkpro bug fix - }, - }) - vim.cmd.colorscheme("onedark_vivid") - vim.api.nvim_create_autocmd("OptionSet", { - pattern = "background", - callback = function(_) - vim.cmd.colorscheme(vim.o.background == "light" and "onelight" or "onedark_vivid") - - f.HighlightGroups.executeAll() - end, - }) - end, - }, -} diff --git a/lua/plugins/comment.lua b/lua/plugins/comment.lua deleted file mode 100644 index fca81c7..0000000 --- a/lua/plugins/comment.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - "folke/ts-comments.nvim", - opts = {}, - event = "VeryLazy", - enabled = vim.fn.has("nvim-0.10.0") == 1, -} diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua deleted file mode 100644 index f863073..0000000 --- a/lua/plugins/conform.lua +++ /dev/null @@ -1,55 +0,0 @@ -local f = require("plugins.common.utils") -local function use_biome_if_installed_locally(bufnr) - local biome_info = require("conform").get_formatter_info("biome", bufnr) - if biome_info and biome_info.available and biome_info.command:match("node_modules/.bin/biome") then - return { "biome" } - end - - return { "prettier" } -end - -return { - "stevearc/conform.nvim", - opts = { - formatters_by_ft = { - ["javascript"] = use_biome_if_installed_locally, - ["javascriptreact"] = use_biome_if_installed_locally, - ["typescript"] = use_biome_if_installed_locally, - ["typescriptreact"] = use_biome_if_installed_locally, - ["graphql"] = use_biome_if_installed_locally, - ["css"] = { "prettier" }, - ["scss"] = { "prettier" }, - ["html"] = { "prettier" }, - ["json"] = { "prettier" }, - ["jsonc"] = { "prettier" }, - ["yaml"] = { "prettier" }, - ["markdown.mdx"] = { "prettier" }, - ["lua"] = { "stylua" }, - ["markdown"] = function() - if not f.isMac() == 1 then - return { "prettier" } - end - return {} - end, - }, - format_on_save = { - lsp_format = "fallback", - timeout = 500, - }, - }, - config = function(_, opts) - local conform = require("conform") - vim.api.nvim_create_user_command("SaveWithoutFormat", function() - -- disable conform plugin for formatting on save - conform.setup({ format_on_save = false }) - - -- saving - vim.api.nvim_command("update") - - -- enabling conform plugin, not sure if it retrieves the original config in plugins/confom.lua - require("conform").setup({ format_on_save = true }) - end, { desc = "Save file without formatting" }) - - conform.setup(opts) - end, -} diff --git a/lua/plugins/copilot.lua b/lua/plugins/copilot.lua deleted file mode 100644 index 5a8d1f0..0000000 --- a/lua/plugins/copilot.lua +++ /dev/null @@ -1,21 +0,0 @@ -local f = require("plugins.common.utils") -return { - { - "zbirenbaum/copilot.lua", - cmd = "Copilot", - event = "InsertEnter", - enabled = f.isMac(), - opts = { - copilot_node_command = vim.fn.expand("$VOLTA_HOME") .. "/tools/image/node/22.21.0/bin/node", - suggestion = { - auto_trigger = true, - keymap = { - accept = "", - }, - }, - }, - config = function(_, opts) - require("copilot").setup(opts) - end, - }, -} diff --git a/lua/plugins/cutlass.lua b/lua/plugins/cutlass.lua deleted file mode 100644 index 9230f35..0000000 --- a/lua/plugins/cutlass.lua +++ /dev/null @@ -1,9 +0,0 @@ --- Cutlass overrides the delete operations c, C, s, S, d, D, x, X. --- to actually just delete and not affect the current yank -return { - "gbprod/cutlass.nvim", - opts = { - cut_key = "x", - override_del = true, - }, -} diff --git a/lua/plugins/definition-or-references.lua b/lua/plugins/definition-or-references.lua deleted file mode 100644 index 59b43d9..0000000 --- a/lua/plugins/definition-or-references.lua +++ /dev/null @@ -1,23 +0,0 @@ -return { - "KostkaBrukowa/definition-or-references.nvim", - config = function() - require("definition-or-references").setup({ - on_references_result = function() - Snacks.picker.lsp_references() - end, - }) - vim.keymap.set("n", "gd", require("definition-or-references").definition_or_references, { silent = true }) - vim.keymap.set( - "n", - "gs", - ':vs lua require("definition-or-references").definition_or_references()', - { silent = true } - ) - vim.keymap.set( - "n", - "gt", - 'tab split | lua require("definition-or-references").definition_or_references()', - { silent = true } - ) - end, -} diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua deleted file mode 100644 index 7509839..0000000 --- a/lua/plugins/gitsigns.lua +++ /dev/null @@ -1,36 +0,0 @@ -return { - "lewis6991/gitsigns.nvim", - event = { "BufReadPre", "BufNewFile" }, - config = function() - local gitsigns = require("gitsigns") - local opts = { - current_line_blame = true, - current_line_blame_opts = { - delay = 300, - }, - current_line_blame_formatter = " , - ", - signs = { - delete = { text = "" }, - topdelete = { text = "" }, - }, - signs_staged = { - delete = { text = "" }, - topdelete = { text = "" }, - }, - on_attach = function(bufnr) - vim.keymap.set("n", "", function() - gitsigns.nav_hunk("prev") - end, { buffer = bufnr }) - vim.keymap.set("n", "", function() - gitsigns.nav_hunk("next") - end, { buffer = bufnr }) - vim.keymap.set("n", "gi", gitsigns.preview_hunk) - vim.keymap.set("n", "gu", gitsigns.reset_hunk) - vim.keymap.set("n", "gs", gitsigns.stage_hunk) - end, - } - - gitsigns.setup(opts) - require("scrollbar.handlers.gitsigns").setup() - end, -} diff --git a/lua/plugins/harpoon.lua b/lua/plugins/harpoon.lua deleted file mode 100644 index a917fbb..0000000 --- a/lua/plugins/harpoon.lua +++ /dev/null @@ -1,52 +0,0 @@ -return { - "ThePrimeagen/harpoon", - branch = "harpoon2", - dependencies = { "nvim-lua/plenary.nvim" }, - config = function() - local harpoon = require("harpoon") - local harpoon_extensions = require("harpoon.extensions") - harpoon.setup() - harpoon:extend(harpoon_extensions.builtins.highlight_current_file()) - - vim.keymap.set("n", "A", function() - harpoon:list():prepend() - vim.cmd(":do User") - end) - vim.keymap.set("n", "a", function() - harpoon:list():add() - vim.cmd(":do User") - end) - vim.keymap.set("n", "tt", function() - harpoon.ui:toggle_quick_menu(harpoon:list()) - end) - - vim.keymap.set("n", "h", function() - harpoon:list():select(1) - end) - vim.keymap.set("n", "j", function() - harpoon:list():select(2) - end) - vim.keymap.set("n", "k", function() - harpoon:list():select(3) - end) - vim.keymap.set("n", "l", function() - harpoon:list():select(4) - end) - vim.keymap.set("n", "H", function() - vim.cmd("vsplit") - harpoon:list():select(1) - end) - vim.keymap.set("n", "J", function() - vim.cmd("vsplit") - harpoon:list():select(2) - end) - vim.keymap.set("n", "K", function() - vim.cmd("vsplit") - harpoon:list():select(3) - end) - vim.keymap.set("n", "L", function() - vim.cmd("vsplit") - harpoon:list():select(4) - end) - end, -} diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua deleted file mode 100644 index a564707..0000000 --- a/lua/plugins/init.lua +++ /dev/null @@ -1 +0,0 @@ -return {} diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua deleted file mode 100644 index b4e1971..0000000 --- a/lua/plugins/lsp.lua +++ /dev/null @@ -1,48 +0,0 @@ -return { - { - "WhoIsSethDaniel/mason-tool-installer.nvim", - dependencies = { - { "mason-org/mason.nvim", opts = {} }, - { "mason-org/mason-lspconfig.nvim", opts = {}, lazy = false }, - }, - opts = { - ensure_installed = { - "tailwindcss", - "jsonls", - "emmet_language_server", - "cssls", - { "eslint", version = "4.8.0" }, -- latest version throwing error when no config file is found - "lua_ls", - "tsgo", - "prettier", - "stylua", - { - "gopls", - condition = function() - return vim.fn.executable("go") == 1 -- Install only if Go is in the path - end, - }, - }, - }, - }, - { - "L3MON4D3/LuaSnip", - dependencies = { - "rafamadriz/friendly-snippets", - }, - event = "InsertEnter", - config = function() - require("luasnip.loaders.from_vscode").lazy_load() - end, - }, - { - "neovim/nvim-lspconfig", - cmd = { "LspInfo", "LspInstall", "LspStart" }, - event = { "BufReadPre", "BufNewFile" }, - dependencies = { - { "saghen/blink.cmp" }, - { "mason-org/mason-lspconfig.nvim" }, - { "j-hui/fidget.nvim", opts = {} }, - }, - }, -} diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua deleted file mode 100644 index 19f5a90..0000000 --- a/lua/plugins/lualine.lua +++ /dev/null @@ -1,64 +0,0 @@ -local f = require("plugins.common.utils") - -local custom_tabs = { - { - "tabs", - show_modified_status = false, - }, -} - -local custom_filename = { - { "filename", path = 1, symbols = { - modified = f.diagnosticIcons.modified, - } }, -} - -return { - "nvim-lualine/lualine.nvim", - dependencies = { - { "nvim-tree/nvim-web-devicons" }, - }, - opts = { - options = { - always_show_tabline = false, - disabled_filetypes = { - statusline = { "neominimap" }, - }, - }, - sections = { - lualine_a = { - function() - -- Get the current working directory - local cwd = vim.fn.getcwd() - - -- Extract the last folder from the path - return "󰉋 " .. vim.fn.fnamemodify(cwd, ":t") - end, - }, - lualine_b = {}, - lualine_c = custom_filename, - lualine_x = { - { - "diagnostics", - symbols = { - error = f.diagnosticIcons.ERROR, - warn = f.diagnosticIcons.WARN, - info = f.diagnosticIcons.INFO, - hint = f.diagnosticIcons.HINT, - }, - }, - "filetype", - }, - lualine_y = f.isMac() and {} or { "branch" }, - lualine_z = custom_tabs, - }, - inactive_sections = { - lualine_c = custom_filename, - lualine_x = {}, - lualine_z = custom_tabs, - }, - extensions = { - "neo-tree", - }, - }, -} diff --git a/lua/plugins/markdown-preview.lua b/lua/plugins/markdown-preview.lua deleted file mode 100644 index 06de3e3..0000000 --- a/lua/plugins/markdown-preview.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - "selimacerbas/markdown-preview.nvim", - dependencies = { "selimacerbas/live-server.nvim" }, - config = function() - require("markdown_preview").setup({ - -- all optional; sane defaults shown - port = 8421, - open_browser = true, - debounce_ms = 300, - }) - end, -} diff --git a/lua/plugins/minimap.lua b/lua/plugins/minimap.lua deleted file mode 100644 index 77a1ed0..0000000 --- a/lua/plugins/minimap.lua +++ /dev/null @@ -1,23 +0,0 @@ ----@module "neominimap.config.meta" -return { - "Isrothy/neominimap.nvim", - version = "v3.x.x", - lazy = false, -- NOTE: NO NEED to Lazy load - init = function() - -- vim.opt.wrap = false - -- vim.opt.sidescrolloff = 36 -- Set a large value - - --- Put your configuration here - vim.g.neominimap = { - auto_enable = true, - current_line_position = "percent", - float = { - window_border = "none", - }, - } - - vim.api.nvim_create_user_command("MinimapToggle", function() - vim.cmd("Neominimap Toggle") - end, { desc = "Toggle minimap" }) - end, -} diff --git a/lua/plugins/multicursor.lua b/lua/plugins/multicursor.lua deleted file mode 100644 index c824d09..0000000 --- a/lua/plugins/multicursor.lua +++ /dev/null @@ -1,39 +0,0 @@ -local f = require("plugins.common.utils") -return { - "jake-stewart/multicursor.nvim", - branch = "1.0", - event = "VeryLazy", - config = function() - local mc = require("multicursor-nvim") - - mc.setup() - - -- Add cursors above/below the main cursor. - vim.keymap.set({ "n", "v" }, f.isMac() and "" or "", function() - mc.addCursor("k") - end) - vim.keymap.set({ "n", "v" }, f.isMac() and "" or "", function() - mc.addCursor("j") - end) - - -- Add a cursor and jump to the next word under cursor. - vim.keymap.set({ "n", "v" }, f.isMac() and "" or "", function() - mc.addCursor("*") - end) - - -- Add and remove cursors with alt + left click. - vim.keymap.set("n", "", mc.handleMouse) - - vim.keymap.set("n", "", function() - if not mc.cursorsEnabled() then - mc.enableCursors() - elseif mc.hasCursors() then - mc.clearCursors() - else - -- Default handler. - vim.cmd("nohlsearch") -- Clear highlighting on pressing Escape - vim.cmd("echo ''") -- clear the statusbar - end - end) - end, -} diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua deleted file mode 100644 index e2eb4be..0000000 --- a/lua/plugins/neo-tree.lua +++ /dev/null @@ -1,115 +0,0 @@ -local f = require("plugins.common.utils") -local function on_move(data) - Snacks.rename.on_rename_file(data.source, data.destination) -end -return { - "nvim-neo-tree/neo-tree.nvim", - branch = "v3.x", - event = "VeryLazy", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended - "MunifTanjim/nui.nvim", - "ThePrimeagen/harpoon", - }, - config = function() - vim.keymap.set( - "n", - f.isMac() and "" or "", - "Neotree toggle", - { desc = "Toggle file explorer on current file" } - ) - local events = require("neo-tree.events") - require("neo-tree").setup({ - commands = { - add_to_harpoon = function(state) - local node = state.tree:get_node() - local filepath = node:get_id() - local harpoon = require("harpoon") - -- Get the project root - local project_root = vim.fn.getcwd() - -- Convert the absolute path to a relative path - local relative_filepath = vim.fn.fnamemodify(filepath, ":." .. project_root) - local item = { - value = relative_filepath, - context = { - row = 1, - col = 0, - }, - } - harpoon:list():add(item) - vim.cmd(":do User") - end, - copy_path = function(state) - local node = state.tree:get_node() - local filepath = node:get_id() - local filename = node.name - local modify = vim.fn.fnamemodify - local results = { - modify(filepath, ":."), - filename, - filepath, - } - vim.ui.select({ - "1. Relative path: " .. results[1], - "2. Filename: " .. results[2], - "3. Absolute path: " .. results[3], - }, { prompt = "Choose to copy to clipboard:" }, function(choice) - if choice then - local i = tonumber(choice:sub(1, 1)) - if i then - local result = results[i] - vim.fn.setreg('"', result) - vim.fn.setreg("+", result) - vim.notify("Copied: " .. result) - else - vim.notify("Invalid selection") - end - else - vim.notify("Selection cancelled") - end - end) - end, - find_in_folder = function(state) - local node = state.tree:get_node() - local filepath = node:get_id() - Snacks.picker.grep({ dirs = { filepath } }) - end, - }, - window = { - width = 40, - position = "right", - mappings = { - [""] = false, - ["a"] = "add_to_harpoon", - ["y"] = "copy_path", - ["ff"] = "find_in_folder", - [""] = { "scroll_preview", config = { direction = 10 } }, - [""] = { "scroll_preview", config = { direction = -10 } }, - [""] = "close_window", - }, - }, - filesystem = { - filtered_items = { - hide_dotfiles = false, - always_show = {}, - }, - use_libuv_file_watcher = false, - follow_current_file = { - enabled = true, - leave_dirs_open = true, - }, - }, - event_handlers = { - { - event = events.FILE_MOVED, - handler = on_move, -- not working, review with updated snacks.nvim - }, - { - event = events.FILE_RENAMED, - handler = on_move, -- not working, review with updated snacks.nvim - }, - }, - }) - end, -} diff --git a/lua/plugins/nvim-surround.lua b/lua/plugins/nvim-surround.lua deleted file mode 100644 index 111a624..0000000 --- a/lua/plugins/nvim-surround.lua +++ /dev/null @@ -1,36 +0,0 @@ -return { - "kylechui/nvim-surround", - version = "*", -- Use for stability; omit to use `main` branch for the latest features - event = "VeryLazy", - config = function() - vim.keymap.set("v", "(", "(nvim-surround-visual)(lvi(", { desc = "Surround with brackets ()" }) - vim.keymap.set("v", "[", "(nvim-surround-visual)[lvi[", { desc = "Surround with square brackets []" }) - vim.keymap.set("v", "{", "(nvim-surround-visual){lvi{", { desc = "Surround with curly brackets {}" }) - vim.keymap.set("v", '"', '(nvim-surround-visual)"lvi"', { desc = 'Surround with curly brackets ""' }) - vim.keymap.set("v", "`", "(nvim-surround-visual)`lvi`", { desc = "Surround with curly brackets ``" }) - vim.keymap.set("v", "<", "(nvim-surround-visual)", { desc = "Surround with less/greater than <>" }) - -- surround selected text with input - vim.keymap.set( - "v", - "t", - "(nvim-surround-visual)t", - { desc = "Surround with anything from input, html tags" } - ) - require("nvim-surround").setup({ - surrounds = { - ["("] = { - add = { "(", ")" }, - }, - ["{"] = { - add = { "{", "}" }, - }, - ["<"] = { - add = { "<", ">" }, - }, - ["["] = { - add = { "[", "]" }, - }, - }, - }) - end, -} diff --git a/lua/plugins/scope.lua b/lua/plugins/scope.lua deleted file mode 100644 index 263d8d5..0000000 --- a/lua/plugins/scope.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - "tiagovla/scope.nvim", - config = true, -} diff --git a/lua/plugins/sessions.lua b/lua/plugins/sessions.lua deleted file mode 100644 index 7c2dc56..0000000 --- a/lua/plugins/sessions.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - "rmagatti/auto-session", - lazy = false, - dependencies = { - "tiagovla/scope.nvim", - }, - opts = { - suppressed_dirs = { "~/", "/" }, - pre_save_cmds = { "ScopeSaveState" }, - post_restore_cmds = { "ScopeLoadState" }, - }, -} diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua deleted file mode 100644 index df721cd..0000000 --- a/lua/plugins/snacks.lua +++ /dev/null @@ -1,350 +0,0 @@ -local f = require("plugins.common.utils") -local TERMINAL_SHELL = "fish" - -local LAZYGIT_KEYMAP = f.isMac() and "" or "" - -local global_keys = { - [""] = { f.isMac() and "" or "" }, - [""] = { f.isMac() and "" or "" }, - [""] = { "list_scroll_down" }, - [""] = { "list_scroll_up" }, - ["s"] = "edit_vsplit", - ["t"] = "tab", - [""] = { - "history_forward", - mode = "i", - }, - [""] = { - "history_back", - mode = "i", - }, - [f.isMac() and "" or ""] = { "qflist", mode = { "n", "i" } }, - [""] = { "preview_scroll_down", mode = { "n", "i" } }, - [""] = { "preview_scroll_up", mode = { "n", "i" } }, - ["a"] = "add_to_harpoon", -} - -local buffer_keys = { - ["w"] = "bufdelete", - ["v"] = "list_down", - ["c"] = "list_up", -} - -return { - "folke/snacks.nvim", - priority = 1000, - lazy = false, - opts = { - image = {}, - indent = {}, - statuscolumn = { - left = { "sign", "git" }, - right = { "mark", "fold" }, - folds = { - open = true, - }, - git = { - patterns = { "GitSign" }, - }, - refresh = 100, - }, - words = { - debounce = 50, - enabled = true, - notify_jump = true, - }, - lazygit = { - config = { - editPreset = "nvim-remote", - os = { - edit = TERMINAL_SHELL - .. ' -c \'if test -z "$NVIM"; nvim -- {{filename}}; else; nvim --server "$NVIM" --remote-send "' - .. LAZYGIT_KEYMAP - .. '"; nvim --server "$NVIM" --remote {{filename}}; end\'', - - editAtLine = TERMINAL_SHELL - .. ' -c \'if test -z "$NVIM"; nvim +{{line}} -- {{filename}}; else; nvim --server "$NVIM" --remote-send "' - .. LAZYGIT_KEYMAP - .. '"; nvim --server "$NVIM" --remote {{filename}}; nvim --server "$NVIM" --remote-send ":{{line}}"; end\'', - }, - }, - win = { - height = 0.95, - width = 0.95, - keys = { - { - LAZYGIT_KEYMAP, - function() - Snacks.lazygit() - end, - mode = "t", - }, - }, - }, - }, - terminal = { - win = { - height = 0.95, - width = 0.95, - }, - }, - picker = { - actions = { - add_to_harpoon = function(picker) - local harpoon = require("harpoon") - local full_path = picker:current() - local cwd_path = picker:cwd() - - local item = { - value = full_path.file:gsub("^" .. vim.pesc(cwd_path) .. "/", ""), - context = { - row = 1, - col = 0, - }, - } - harpoon:list():add(item) - - vim.api.nvim_exec_autocmds("User", { - pattern = "HarpoonRefresh", -- Use a specific pattern for better targeting - }) - end, - }, - previewers = { - git = { - builtin = false, - }, - }, - formatters = { - filename = { - filename_first = true, - truncate = 80, - }, - file = { - filename_first = true, - truncate = 80, - }, - }, - win = { - input = { - keys = global_keys, - }, - list = { - keys = global_keys, - }, - }, - sources = { - git_log_line = { - focus = "list", - layout = { - preset = "vertical", - }, - }, - git_log_file = { - focus = "list", - layout = { - preset = "vertical", - }, - }, - buffers = { - focus = "list", - layout = { - preset = "vertical", - }, - win = { - input = { - keys = buffer_keys, - }, - list = { - keys = buffer_keys, - }, - }, - preview = function(ctx) - local previewers = require("snacks.picker.preview") - previewers.file(ctx) - - local path = require("snacks.picker.util").path(ctx.item) - if path then - local relative_path = require("snacks.picker.util").truncpath(path, 999) - ctx.preview:set_title(relative_path) - end - end, - }, - grep = { - args = { - "--hidden", - "-i", - }, - format = "filename", - }, - grep_word = { - format = "filename", - }, - files = { - cmd = "rg", - args = { - "--files", -- Search for files - "--hidden", -- Include hidden files and directories - "--iglob", - "!.git", -- Exclude the .git directory - }, - }, - select = { - focus = "list", - }, - lsp_references = { - focus = "list", - format = "filename", - }, - lsp_implementations = { - focus = "list", - format = "filename", - }, - }, - }, - }, - keys = { - { - LAZYGIT_KEYMAP, - function() - Snacks.lazygit() - end, - mode = "n", - desc = "Open Lazygit", - }, - { - f.isMac() and "" or "", - function() - Snacks.terminal(TERMINAL_SHELL) - end, - desc = "Open Terminal", - }, - { - f.isMac() and "" or "", - function() - Snacks.terminal.toggle(TERMINAL_SHELL) - end, - mode = "t", - desc = "Toggle Terminal when opened", - }, - { - "", - function() - Snacks.words.jump(1, true) - end, - desc = "Next occurence", - }, - { - "", - function() - Snacks.words.jump(-1, true) - end, - desc = "Prev occurence", - }, - { - "v", - function() - Snacks.picker.buffers({ - on_show = function(picker) - -- start in the next buffer - picker:action("list_down") - end, - }) - end, - }, - { - "p", - function() - Snacks.picker.files() - end, - }, - { - "ff", - function() - Snacks.picker.grep() - end, - mode = "n", - }, - { - "ff", - function() - Snacks.picker.grep_word({ - focus = "list", - live = true, - }) - end, - mode = "v", - }, - { - "fr", - function() - Snacks.picker.resume() - end, - }, - { - "fg", - function() - Snacks.picker.git_log_line() - end, - }, - { - "fG", - function() - Snacks.picker.git_log_file() - end, - }, - { - "fl", - function() - Snacks.picker.git_status({ focus = "list" }) - end, - }, - { - "gr", - function() - Snacks.picker.lsp_references() - end, - nowait = true, - }, - { - "gi", - function() - Snacks.picker.lsp_implementations() - end, - nowait = true, - }, - }, - config = function(_, opts) - local custom_default = require("snacks.picker.config.layouts").default - custom_default.layout.width = 0.95 - custom_default.layout.height = 0.9 - custom_default.layout[2].min_width = 85 - custom_default.layout[2].width = 85 - - local custom_vertical = require("snacks.picker.config.layouts").vertical - custom_vertical.layout.height = 0.95 - custom_vertical.layout.backdrop = true - custom_vertical.layout.width = 0.8 - custom_vertical.layout[3].height = 0.8 - - -- change the style of the path in all pickers - f.HighlightGroups.register(function() - vim.api.nvim_set_hl(0, "SnacksPickerDir", vim.api.nvim_get_hl(0, { name = "Comment", link = false })) - end) - - vim.api.nvim_create_user_command("CloseOtherBuffers", function() - Snacks.bufdelete.other() - end, { desc = "Close all other buffers" }) - - vim.api.nvim_create_user_command("SnacksPickers", function() - Snacks.picker() - end, { desc = "Show all Snacks pickers" }) - - vim.api.nvim_create_user_command("SymbolsPicker", function() - Snacks.picker.lsp_symbols({ - focus = "list", - }) - end, { desc = "Show Symbols for this file (Snack picker)" }) - - require("snacks").setup(opts) - end, -} diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua deleted file mode 100644 index 7d393f2..0000000 --- a/lua/plugins/treesitter.lua +++ /dev/null @@ -1,48 +0,0 @@ --- in WSL nvim > 0.11.0 breaks treesitter main, check after 0.11.5 --- also takes too long to quit -return { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - opts = { - ensure_installed = { - "bash", - "css", - "go", - "graphql", - "html", - "javascript", - "jsdoc", - "json", - "json5", - "lua", - "markdown", - "regex", - "scss", - "sql", - "terraform", - "toml", - "tsx", - "typescript", - "vue", - "yaml", - }, - }, - config = function(_, opts) - require("nvim-treesitter").setup() - require("nvim-treesitter").install(opts.ensure_installed) - - vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" - vim.treesitter.language.register("markdown", { "mdx" }) - - vim.api.nvim_create_autocmd("FileType", { - group = vim.api.nvim_create_augroup("EnableTreesitterHighlighting", { clear = true }), - desc = "Try to enable tree-sitter syntax highlighting", - pattern = "*", -- run on *all* filetypes - callback = function() - pcall(function() - vim.treesitter.start() - end) - end, - }) - end, -} diff --git a/lua/plugins/vim-scrollbar.lua b/lua/plugins/vim-scrollbar.lua deleted file mode 100644 index 2b85752..0000000 --- a/lua/plugins/vim-scrollbar.lua +++ /dev/null @@ -1,36 +0,0 @@ -local f = require("plugins.common.utils") - -return { - "petertriho/nvim-scrollbar", - dependencies = { - { - "kevinhwang91/nvim-hlslens", - event = "VeryLazy", - config = function() - require("scrollbar.handlers.search").setup({ - override_lens = function() - return "" - end, - }) - end, - }, - "lewis6991/gitsigns.nvim", - }, - opts = { - handlers = { - handle = false, - }, - marks = { - Error = { text = { f.diagnosticIcons.ERROR, f.diagnosticIcons.ERROR } }, - Warn = { text = { f.diagnosticIcons.WARN, f.diagnosticIcons.WARN } }, - Info = { text = { f.diagnosticIcons.INFO, f.diagnosticIcons.INFO } }, - Hint = { text = { f.diagnosticIcons.HINT, f.diagnosticIcons.HINT } }, - GitDelete = { text = "" }, - }, - excluded_filetypes = { - "neo-tree", - "neo-tree-popup", - "neominimap", - }, - }, -} diff --git a/lua/plugins/wildfire.lua b/lua/plugins/wildfire.lua deleted file mode 100644 index 4a449b5..0000000 --- a/lua/plugins/wildfire.lua +++ /dev/null @@ -1,15 +0,0 @@ -local f = require("plugins.common.utils") -return { - "sustech-data/wildfire.nvim", - event = "VeryLazy", - dependencies = { - "nvim-treesitter/nvim-treesitter", - }, - opts = { - keymaps = { - init_selection = "", - node_incremental = "", - node_decremental = f.isMac() and "" or "⊘", -- strange unicode mapped in windows because it cant understand shift+enter - }, - }, -} diff --git a/nvim-pack-lock.json b/nvim-pack-lock.json new file mode 100644 index 0000000..095a914 --- /dev/null +++ b/nvim-pack-lock.json @@ -0,0 +1,161 @@ +{ + "plugins": { + "LuaSnip": { + "rev": "5a1e39223db9a0498024a77b8441169d260c8c25", + "src": "https://github.com/L3MON4D3/LuaSnip", + "version": "'v2.5.0'" + }, + "auto-dark-mode.nvim": { + "rev": "54058b4fe414bd64bd2904a6f8a63f1f14e3d8df", + "src": "https://github.com/f-person/auto-dark-mode.nvim" + }, + "auto-session": { + "rev": "62437532b38495551410b3f377bcf4aaac574ebe", + "src": "https://github.com/rmagatti/auto-session" + }, + "barbar.nvim": { + "rev": "53b5a2f34b68875898f0531032fbf090e3952ad7", + "src": "https://github.com/romgrk/barbar.nvim" + }, + "blink.cmp": { + "rev": "451168851e8e2466bc97ee3e026c3dcb9141ce07", + "src": "https://github.com/saghen/blink.cmp" + }, + "codediff.nvim": { + "rev": "832f1ecc5f8b15a44cf7537e31d3266d657775b1", + "src": "https://github.com/esmuellert/codediff.nvim" + }, + "conform.nvim": { + "rev": "086a40dc7ed8242c03be9f47fbcee68699cc2395", + "src": "https://github.com/stevearc/conform.nvim" + }, + "copilot.lua": { + "rev": "faa347cef2a9429eec14dada549e000a3b8d0fc9", + "src": "https://github.com/zbirenbaum/copilot.lua" + }, + "cutlass.nvim": { + "rev": "d01b5c1943050fcda8edf5c89d4419c41a65890e", + "src": "https://github.com/gbprod/cutlass.nvim" + }, + "definition-or-references.nvim": { + "rev": "7318f9479d2db357d2908599c3ec14bec7c589dd", + "src": "https://github.com/KostkaBrukowa/definition-or-references.nvim" + }, + "fidget.nvim": { + "rev": "889e2e96edef4e144965571d46f7a77bcc4d0ddf", + "src": "https://github.com/j-hui/fidget.nvim" + }, + "friendly-snippets": { + "rev": "6cd7280adead7f586db6fccbd15d2cac7e2188b9", + "src": "https://github.com/rafamadriz/friendly-snippets" + }, + "gitsigns.nvim": { + "rev": "0f00d07c2c3106ba6abd594ac1c17f211141b7b5", + "src": "https://github.com/lewis6991/gitsigns.nvim" + }, + "harpoon": { + "rev": "87b1a3506211538f460786c23f98ec63ad9af4e5", + "src": "https://github.com/ThePrimeagen/harpoon" + }, + "live-server.nvim": { + "rev": "1ee8ab4cbd18e2b2b38236321a73edcaba023fbd", + "src": "https://github.com/selimacerbas/live-server.nvim" + }, + "lualine.nvim": { + "rev": "47f91c416daef12db467145e16bed5bbfe00add8", + "src": "https://github.com/nvim-lualine/lualine.nvim" + }, + "markdown-preview.nvim": { + "rev": "793b32e327bd51143d7cc345aa3ecd10c357ddee", + "src": "https://github.com/selimacerbas/markdown-preview.nvim" + }, + "mason-lspconfig.nvim": { + "rev": "25f609e7fca78af7cede4f9fa3af8a94b1c4950b", + "src": "https://github.com/mason-org/mason-lspconfig.nvim" + }, + "mason-tool-installer.nvim": { + "rev": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc", + "src": "https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim" + }, + "mason.nvim": { + "rev": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65", + "src": "https://github.com/mason-org/mason.nvim" + }, + "mini.nvim": { + "rev": "69b7433355664cf76898eb86a12a019f39bd86d1", + "src": "https://github.com/nvim-mini/mini.nvim" + }, + "multicursor.nvim": { + "rev": "704b99f10a72cc05d370cfeb294ff83412a8ab55", + "src": "https://github.com/jake-stewart/multicursor.nvim" + }, + "neo-tree.nvim": { + "rev": "84c75e7a7e443586f60508d12fc50f90d9aee14e", + "src": "https://github.com/nvim-neo-tree/neo-tree.nvim" + }, + "neominimap.nvim": { + "rev": "5538a69ecf833c705973d5fb8c2bccd3f2cecf93", + "src": "https://github.com/Isrothy/neominimap.nvim" + }, + "nui.nvim": { + "rev": "de740991c12411b663994b2860f1a4fd0937c130", + "src": "https://github.com/MunifTanjim/nui.nvim" + }, + "nvim-autopairs": { + "rev": "59bce2eef357189c3305e25bc6dd2d138c1683f5", + "src": "https://github.com/windwp/nvim-autopairs" + }, + "nvim-highlight-colors": { + "rev": "e2cb22089cc2358b2b995c09578224f142de6039", + "src": "https://github.com/brenoprata10/nvim-highlight-colors" + }, + "nvim-hlslens": { + "rev": "be2d7b2be01860b5445a007ff2bc72b29896db6b", + "src": "https://github.com/kevinhwang91/nvim-hlslens" + }, + "nvim-lspconfig": { + "rev": "8e2084bf5e40c79c1f42210a6ef96a0a4793a763", + "src": "https://github.com/neovim/nvim-lspconfig" + }, + "nvim-scrollbar": { + "rev": "f8e87b96cd6362ef8579be456afee3b38fd7e2a8", + "src": "https://github.com/petertriho/nvim-scrollbar" + }, + "nvim-surround": { + "rev": "61319d4bd1c5e336e197defa15bd104c51f0fb29", + "src": "https://github.com/kylechui/nvim-surround" + }, + "nvim-treesitter": { + "rev": "c82bf96f0a773d85304feeb695e1e23b2207ac35", + "src": "https://github.com/nvim-treesitter/nvim-treesitter" + }, + "nvim-web-devicons": { + "rev": "6e76c5e47e957fbf080b1fdac165c66dbd2e7cfb", + "src": "https://github.com/nvim-tree/nvim-web-devicons" + }, + "onedarkpro.nvim": { + "rev": "dab7b623d48b50330c43234958c0ba2de9b501d5", + "src": "https://github.com/olimorris/onedarkpro.nvim" + }, + "plenary.nvim": { + "rev": "b9fd5226c2f76c951fc8ed5923d85e4de065e509", + "src": "https://github.com/nvim-lua/plenary.nvim" + }, + "scope.nvim": { + "rev": "228aabdb1b9cc74f0c0ccec88e79873857236e49", + "src": "https://github.com/tiagovla/scope.nvim" + }, + "snacks.nvim": { + "rev": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e", + "src": "https://github.com/folke/snacks.nvim" + }, + "ts-comments.nvim": { + "rev": "123a9fb12e7229342f807ec9e6de478b1102b041", + "src": "https://github.com/folke/ts-comments.nvim" + }, + "wildfire.nvim": { + "rev": "918a1873c2b8010baa034f373cf28c53ce4f038f", + "src": "https://github.com/sustech-data/wildfire.nvim" + } + } +} diff --git a/plugin/00-colorscheme.lua b/plugin/00-colorscheme.lua new file mode 100644 index 0000000..ad9724b --- /dev/null +++ b/plugin/00-colorscheme.lua @@ -0,0 +1,25 @@ +local f = require("common.utils") + +vim.pack.add({ "https://github.com/f-person/auto-dark-mode.nvim" }) +require("auto-dark-mode").setup({}) + +vim.pack.add({ "https://github.com/olimorris/onedarkpro.nvim" }) +require("onedarkpro").setup({ + styles = { + functions = "bold", + }, + highlights = { + LspReferenceText = { link = "CursorColumn", extend = true }, + NeoTreeCursorLine = { bg = "${cursorline}", bold = true }, + NeominimapCursorLine = { bg = "${gray}", bold = true }, + }, +}) +vim.cmd.colorscheme("onedark_vivid") + +vim.api.nvim_create_autocmd("OptionSet", { + pattern = "background", + callback = function(_) + vim.cmd.colorscheme(vim.o.background == "light" and "onelight" or "onedark_vivid") + f.HighlightGroups.executeAll() + end, +}) \ No newline at end of file diff --git a/plugin/01-treesitter.lua b/plugin/01-treesitter.lua new file mode 100644 index 0000000..ab5d280 --- /dev/null +++ b/plugin/01-treesitter.lua @@ -0,0 +1,38 @@ +vim.pack.add({ "https://github.com/nvim-treesitter/nvim-treesitter" }) +require("nvim-treesitter").setup() +require("nvim-treesitter").install({ + "bash", + "css", + "go", + "graphql", + "html", + "javascript", + "jsdoc", + "json", + "json5", + "lua", + "markdown", + "regex", + "scss", + "sql", + "terraform", + "toml", + "tsx", + "typescript", + "vue", + "yaml", +}) + +vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" +vim.treesitter.language.register("markdown", { "mdx" }) + +vim.api.nvim_create_autocmd("FileType", { + group = vim.api.nvim_create_augroup("EnableTreesitterHighlighting", { clear = true }), + desc = "Try to enable tree-sitter syntax highlighting", + pattern = "*", + callback = function() + pcall(function() + vim.treesitter.start() + end) + end, +}) \ No newline at end of file diff --git a/plugin/02-blink.lua b/plugin/02-blink.lua new file mode 100644 index 0000000..c94e209 --- /dev/null +++ b/plugin/02-blink.lua @@ -0,0 +1,51 @@ +local f = require("common.utils") + +vim.pack.add({ + "https://github.com/rafamadriz/friendly-snippets", + { src = "https://github.com/L3MON4D3/LuaSnip", version = "v2.5.0" }, +}) + +vim.pack.add({ { src = "https://github.com/saghen/blink.cmp", version = vim.version.range("1.*") } }) +require("blink.cmp").setup({ + fuzzy = { + implementation = "lua", + }, + sources = { + default = function() + if vim.bo.filetype == "copilot-chat" then + return {} + end + return { "lsp", "path", "buffer" } + end, + }, + keymap = { + preset = "enter", + [f.isMac() and "" or "⊘"] = { "show", "hide" }, + [""] = {}, + [""] = {}, + [""] = {}, + [""] = {}, + [""] = { "scroll_documentation_up", "fallback" }, + [""] = { "scroll_documentation_down", "fallback" }, + }, + appearance = { + nerd_font_variant = "normal", + }, + signature = { + enabled = true, + }, + completion = { + menu = { + draw = { + columns = { { "kind_icon" }, { "label", "label_description", gap = 1 }, { "kind" } }, + }, + }, + documentation = { + auto_show = true, + auto_show_delay_ms = 0, + }, + }, + snippets = { + preset = "luasnip", + }, +}) diff --git a/plugin/03-lsp.lua b/plugin/03-lsp.lua new file mode 100644 index 0000000..c107e7e --- /dev/null +++ b/plugin/03-lsp.lua @@ -0,0 +1,45 @@ +vim.pack.add({ + "https://github.com/mason-org/mason.nvim", + "https://github.com/mason-org/mason-lspconfig.nvim", + "https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim", +}) + +vim.cmd.packadd("mason.nvim") +require("mason").setup({}) + +vim.cmd.packadd("mason-lspconfig.nvim") +require("mason-lspconfig").setup({}) + +vim.pack.add({ "https://github.com/j-hui/fidget.nvim" }) +require("fidget").setup({}) + +local tools = { + "tailwindcss", + "jsonls", + "emmet_language_server", + "cssls", + { "eslint", version = "4.8.0" }, + "lua_ls", + "ts_ls", + "prettier", + "stylua", +} + +if vim.fn.executable("go") == 1 then + table.insert(tools, "gopls") +end + +require("mason-tool-installer").setup({ + ensure_installed = tools, +}) + +vim.pack.add({ + "https://github.com/nvim-lua/plenary.nvim", + "https://github.com/nvim-tree/nvim-web-devicons", + "https://github.com/MunifTanjim/nui.nvim", + "https://github.com/ThePrimeagen/harpoon", + "https://github.com/saghen/blink.cmp", + "https://github.com/neovim/nvim-lspconfig", +}) +vim.cmd.packadd("nvim-lspconfig") +vim.lsp.enable({ "lua_ls" }) diff --git a/plugin/autopairs.lua b/plugin/autopairs.lua new file mode 100644 index 0000000..826a053 --- /dev/null +++ b/plugin/autopairs.lua @@ -0,0 +1,9 @@ +vim.pack.add({ "https://github.com/windwp/nvim-autopairs" }) +local autopairs = require("nvim-autopairs") +autopairs.setup({ + check_ts = true, + ts_config = { + lua = { "string" }, + javascript = { "template_string" }, + }, +}) \ No newline at end of file diff --git a/plugin/barbar.lua b/plugin/barbar.lua new file mode 100644 index 0000000..3335521 --- /dev/null +++ b/plugin/barbar.lua @@ -0,0 +1,111 @@ +local f = require("common.utils") + +vim.pack.add({ "https://github.com/romgrk/barbar.nvim" }) +vim.pack.add({ "https://github.com/lewis6991/gitsigns.nvim" }) + +vim.g.barbar_auto_setup = false + +local barbar = require("barbar") +local state = require("barbar.state") +local render = require("barbar.ui.render") +local harpoon = require("harpoon") + +barbar.setup({ + animation = false, + tabpages = false, + icons = { + button = false, + pinned = { filename = true, buffer_index = true }, + diagnostics = { [vim.diagnostic.severity.ERROR] = { enabled = true, icon = f.diagnosticIcons.ERROR } }, + separator = { left = " " }, + }, +}) + +f.HighlightGroups.register(function() + local default_error_hl = vim.api.nvim_get_hl(0, { name = "ErrorMsg" }) + local default_buffer_hl = vim.tbl_extend("force", vim.api.nvim_get_hl(0, { name = "Directory" }), { bold = true }) + vim.api.nvim_set_hl(0, "BufferVisibleERROR", default_error_hl) + vim.api.nvim_set_hl(0, "BufferCurrentERROR", default_error_hl) + vim.api.nvim_set_hl(0, "BufferCurrent", default_buffer_hl) + vim.api.nvim_set_hl(0, "BufferCurrentMod", default_buffer_hl) + vim.api.nvim_set_hl(0, "BufferCurrentSign", default_buffer_hl) +end) + +vim.keymap.set({ "n", "v" }, "", ":BufferPrevious", { silent = true }) +vim.keymap.set({ "n", "v" }, "", ":BufferNext", { silent = true }) +vim.keymap.set("n", "<", ":BufferMovePrevious", { silent = true }) +vim.keymap.set("n", ">", ":BufferMoveNext", { silent = true }) + +local function unpin_all() + for _, buf in ipairs(state.buffers) do + local data = state.get_buffer_data(buf) + data.pinned = false + end +end + +local function get_buffer_by_mark(mark) + for _, buf in ipairs(vim.api.nvim_list_bufs()) do + local buffer_path = vim.api.nvim_buf_get_name(buf) + if buffer_path == "" or mark.value == "" then + goto continue + end + local mark_pattern = mark.value:gsub("([%(%)%.%%%+%-%*%?%[%]%^%$])", "%%%1") + if string.match(buffer_path, mark_pattern) then + return buf + end + local buffer_path_pattern = buffer_path:gsub("([%(%)%.%%%+%-%*%?%[%]%^%$])", "%%%1") + if string.match(mark.value, buffer_path_pattern) then + return buf + end + ::continue:: + end +end + +local function refresh_all_harpoon_tabs() + local ok, harpoon = pcall(require, "harpoon") + if not ok then + return + end + local list = harpoon:list() + if not list or not list.items then + return + end + unpin_all() + for _, mark in ipairs(list.items) do + local buf = get_buffer_by_mark(mark) + if buf == nil then + vim.cmd("badd " .. mark.value) + buf = get_buffer_by_mark(mark) + end + if buf ~= nil then + state.toggle_pin(buf) + end + end + render.update() +end + +vim.api.nvim_create_autocmd({ "BufEnter", "BufAdd", "BufLeave", "User" }, { + pattern = { "*", "HarpoonRefresh" }, + callback = function() + local ok, harpoon = pcall(require, "harpoon") + if not ok or not harpoon.list then + return + end + local list = harpoon:list() + if not list or not list.items then + return + end + unpin_all() + for _, mark in ipairs(list.items) do + local buf = get_buffer_by_mark(mark) + if buf == nil then + vim.cmd("badd " .. mark.value) + buf = get_buffer_by_mark(mark) + end + if buf ~= nil then + state.toggle_pin(buf) + end + end + render.update() + end, +}) \ No newline at end of file diff --git a/plugin/codediff.lua b/plugin/codediff.lua new file mode 100644 index 0000000..893f45f --- /dev/null +++ b/plugin/codediff.lua @@ -0,0 +1,11 @@ +vim.pack.add({ + "https://github.com/esmuellert/codediff.nvim", + "https://github.com/MunifTanjim/nui.nvim", +}) +vim.keymap.set("n", "dd", "CodeDiff", { desc = "Code diff" }) +require("codediff").setup({ + explorer = { view_mode = "tree" }, + keymaps = { + view = { next_file = "", prev_file = "" }, + }, +}) \ No newline at end of file diff --git a/plugin/colorizer.lua b/plugin/colorizer.lua new file mode 100644 index 0000000..53a1687 --- /dev/null +++ b/plugin/colorizer.lua @@ -0,0 +1,2 @@ +vim.pack.add({ "https://github.com/brenoprata10/nvim-highlight-colors" }) +require("nvim-highlight-colors").setup({ enable_tailwind = true }) \ No newline at end of file diff --git a/plugin/conform.lua b/plugin/conform.lua new file mode 100644 index 0000000..bf3bd19 --- /dev/null +++ b/plugin/conform.lua @@ -0,0 +1,45 @@ +vim.pack.add({ "https://github.com/stevearc/conform.nvim" }) +vim.cmd.packadd("conform.nvim") + +local f = require("common.utils") + +local function use_biome_if_installed_locally(bufnr) + local biome_info = require("conform").get_formatter_info("biome", bufnr) + if biome_info and biome_info.available and biome_info.command:match("node_modules/.bin/biome") then + return { "biome" } + end + return { "prettier" } +end + +local conform = require("conform") + +conform.setup({ + formatters_by_ft = { + ["javascript"] = use_biome_if_installed_locally, + ["javascriptreact"] = use_biome_if_installed_locally, + ["typescript"] = use_biome_if_installed_locally, + ["typescriptreact"] = use_biome_if_installed_locally, + ["graphql"] = use_biome_if_installed_locally, + ["css"] = { "prettier" }, + ["scss"] = { "prettier" }, + ["html"] = { "prettier" }, + ["json"] = { "prettier" }, + ["jsonc"] = { "prettier" }, + ["yaml"] = { "prettier" }, + ["markdown.mdx"] = { "prettier" }, + ["lua"] = { "stylua" }, + ["markdown"] = function() + if not f.isMac() == 1 then + return { "prettier" } + end + return {} + end, + }, + format_on_save = { lsp_format = "fallback", timeout = 500 }, +}) + +vim.api.nvim_create_user_command("SaveWithoutFormat", function() + conform.setup({ format_on_save = false }) + vim.api.nvim_command("update") + conform.setup({ format_on_save = true }) +end, { desc = "Save file without formatting" }) diff --git a/plugin/copilot.lua b/plugin/copilot.lua new file mode 100644 index 0000000..1f2bbfd --- /dev/null +++ b/plugin/copilot.lua @@ -0,0 +1,12 @@ +local f = require("common.utils") + +if f.isMac() then + vim.pack.add({ "https://github.com/zbirenbaum/copilot.lua" }) + require("copilot").setup({ + copilot_node_command = vim.fn.expand("$VOLTA_HOME") .. "/tools/image/node/22.21.0/bin/node", + suggestion = { + auto_trigger = true, + keymap = { accept = "" }, + }, + }) +end \ No newline at end of file diff --git a/plugin/cutlass.lua b/plugin/cutlass.lua new file mode 100644 index 0000000..ebe56f7 --- /dev/null +++ b/plugin/cutlass.lua @@ -0,0 +1,2 @@ +vim.pack.add({ "https://github.com/gbprod/cutlass.nvim" }) +require("cutlass").setup({ cut_key = "x", override_del = true }) \ No newline at end of file diff --git a/plugin/definition-or-references.lua b/plugin/definition-or-references.lua new file mode 100644 index 0000000..caf8ba3 --- /dev/null +++ b/plugin/definition-or-references.lua @@ -0,0 +1,14 @@ +vim.pack.add({ "https://github.com/KostkaBrukowa/definition-or-references.nvim" }) +require("definition-or-references").setup({ + on_references_result = function() + Snacks.picker.lsp_references() + end, +}) +vim.keymap.set("n", "gd", require("definition-or-references").definition_or_references, { silent = true }) +vim.keymap.set("n", "gs", ':vs lua require("definition-or-references").definition_or_references()', { silent = true }) +vim.keymap.set( + "n", + "gt", + 'tab split | lua require("definition-or-references").definition_or_references()', + { silent = true } +) \ No newline at end of file diff --git a/plugin/gitsigns.lua b/plugin/gitsigns.lua new file mode 100644 index 0000000..76195af --- /dev/null +++ b/plugin/gitsigns.lua @@ -0,0 +1,51 @@ +vim.pack.add({ "https://github.com/lewis6991/gitsigns.nvim" }) +local gitsigns = require("gitsigns") +local opts = { + current_line_blame = true, + current_line_blame_opts = { delay = 300 }, + current_line_blame_formatter = " , - ", + signs = { + delete = { text = "" }, + topdelete = { text = "" }, + }, + signs_staged = { + delete = { text = "" }, + topdelete = { text = "" }, + }, + on_attach = function(bufnr) + vim.keymap.set("n", "", function() + gitsigns.nav_hunk("prev") + end, { buffer = bufnr }) + vim.keymap.set("n", "", function() + gitsigns.nav_hunk("next") + end, { buffer = bufnr }) + vim.keymap.set("n", "gi", gitsigns.preview_hunk) + vim.keymap.set("n", "gu", gitsigns.reset_hunk) + vim.keymap.set("n", "gs", gitsigns.stage_hunk) + end, +} +gitsigns.setup(opts) + +vim.pack.add({ "https://github.com/kevinhwang91/nvim-hlslens" }) +vim.pack.add({ "https://github.com/petertriho/nvim-scrollbar" }) + +require("scrollbar.handlers.search").setup({ + override_lens = function() + return "" + end, +}) + +local f = require("common.utils") +require("scrollbar").setup({ + handlers = { handle = false }, + marks = { + Error = { text = { f.diagnosticIcons.ERROR, f.diagnosticIcons.ERROR } }, + Warn = { text = { f.diagnosticIcons.WARN, f.diagnosticIcons.WARN } }, + Info = { text = { f.diagnosticIcons.INFO, f.diagnosticIcons.INFO } }, + Hint = { text = { f.diagnosticIcons.HINT, f.diagnosticIcons.HINT } }, + GitDelete = { text = "" }, + }, + excluded_filetypes = { "neo-tree", "neo-tree-popup", "neominimap" }, +}) + +require("scrollbar.handlers.gitsigns").setup() \ No newline at end of file diff --git a/plugin/harpoon.lua b/plugin/harpoon.lua new file mode 100644 index 0000000..b2e896b --- /dev/null +++ b/plugin/harpoon.lua @@ -0,0 +1,48 @@ +vim.pack.add({ + "https://github.com/nvim-lua/plenary.nvim", + "https://github.com/ThePrimeagen/harpoon", +}) +local harpoon = require("harpoon") +harpoon.setup() + +vim.keymap.set("n", "A", function() + harpoon:list():prepend() + vim.cmd(":do User") +end) +vim.keymap.set("n", "a", function() + harpoon:list():add() + vim.cmd(":do User") +end) +vim.keymap.set("n", "tt", function() + harpoon.ui:toggle_quick_menu(harpoon:list()) +end) + +vim.keymap.set("n", "h", function() + harpoon:list():select(1) +end) +vim.keymap.set("n", "j", function() + harpoon:list():select(2) +end) +vim.keymap.set("n", "k", function() + harpoon:list():select(3) +end) +vim.keymap.set("n", "l", function() + harpoon:list():select(4) +end) + +vim.keymap.set("n", "H", function() + vim.cmd("vsplit") + harpoon:list():select(1) +end) +vim.keymap.set("n", "J", function() + vim.cmd("vsplit") + harpoon:list():select(2) +end) +vim.keymap.set("n", "K", function() + vim.cmd("vsplit") + harpoon:list():select(3) +end) +vim.keymap.set("n", "L", function() + vim.cmd("vsplit") + harpoon:list():select(4) +end) \ No newline at end of file diff --git a/plugin/lualine.lua b/plugin/lualine.lua new file mode 100644 index 0000000..c63c980 --- /dev/null +++ b/plugin/lualine.lua @@ -0,0 +1,48 @@ +local f = require("common.utils") + +vim.pack.add({ "https://github.com/nvim-lualine/lualine.nvim" }) + +local custom_tabs = { + { "tabs", show_modified_status = false }, +} + +local custom_filename = { + { "filename", path = 1, symbols = { modified = f.diagnosticIcons.modified } }, +} + +require("lualine").setup({ + options = { + always_show_tabline = false, + disabled_filetypes = { statusline = { "neominimap" } }, + }, + sections = { + lualine_a = { + function() + local cwd = vim.fn.getcwd() + return "󰉋 " .. vim.fn.fnamemodify(cwd, ":t") + end, + }, + lualine_b = {}, + lualine_c = custom_filename, + lualine_x = { + { + "diagnostics", + symbols = { + error = f.diagnosticIcons.ERROR, + warn = f.diagnosticIcons.WARN, + info = f.diagnosticIcons.INFO, + hint = f.diagnosticIcons.HINT, + }, + }, + "filetype", + }, + lualine_y = f.isMac() and {} or { "branch" }, + lualine_z = custom_tabs, + }, + inactive_sections = { + lualine_c = custom_filename, + lualine_x = {}, + lualine_z = custom_tabs, + }, + extensions = { "neo-tree" }, +}) \ No newline at end of file diff --git a/plugin/markdown-preview.lua b/plugin/markdown-preview.lua new file mode 100644 index 0000000..9326eb5 --- /dev/null +++ b/plugin/markdown-preview.lua @@ -0,0 +1,9 @@ +vim.pack.add({ + "https://github.com/selimacerbas/markdown-preview.nvim", + "https://github.com/selimacerbas/live-server.nvim", +}) +require("markdown_preview").setup({ + port = 8421, + open_browser = true, + debounce_ms = 300, +}) \ No newline at end of file diff --git a/plugin/multicursor.lua b/plugin/multicursor.lua new file mode 100644 index 0000000..42e028a --- /dev/null +++ b/plugin/multicursor.lua @@ -0,0 +1,27 @@ +local f = require("common.utils") + +vim.pack.add({ "https://github.com/jake-stewart/multicursor.nvim" }) +local mc = require("multicursor-nvim") +mc.setup() + +vim.keymap.set({ "n", "v" }, f.isMac() and "" or "", function() + mc.addCursor("k") +end) +vim.keymap.set({ "n", "v" }, f.isMac() and "" or "", function() + mc.addCursor("j") +end) +vim.keymap.set({ "n", "v" }, f.isMac() and "" or "", function() + mc.addCursor("*") +end) +vim.keymap.set("n", "", mc.handleMouse) + +vim.keymap.set("n", "", function() + if not mc.cursorsEnabled() then + mc.enableCursors() + elseif mc.hasCursors() then + mc.clearCursors() + else + vim.cmd("nohlsearch") + vim.cmd("echo ''") + end +end) \ No newline at end of file diff --git a/plugin/neo-tree.lua b/plugin/neo-tree.lua new file mode 100644 index 0000000..4509443 --- /dev/null +++ b/plugin/neo-tree.lua @@ -0,0 +1,86 @@ +local f = require("common.utils") +local function on_move(data) + Snacks.rename.on_rename_file(data.source, data.destination) +end + +vim.pack.add({ + "https://github.com/nvim-neo-tree/neo-tree.nvim", + "https://github.com/ThePrimeagen/harpoon", +}) +local events = require("neo-tree.events") +require("neo-tree").setup({ + commands = { + add_to_harpoon = function(state) + local node = state.tree:get_node() + local filepath = node:get_id() + local project_root = vim.fn.getcwd() + local relative_filepath = vim.fn.fnamemodify(filepath, ":." .. project_root) + local item = { + value = relative_filepath, + context = { row = 1, col = 0 }, + } + harpoon:list():add(item) + vim.cmd(":do User") + end, + copy_path = function(state) + local node = state.tree:get_node() + local filepath = node:get_id() + local filename = node.name + local modify = vim.fn.fnamemodify + local results = { modify(filepath, ":."), filename, filepath } + vim.ui.select({ + "1. Relative path: " .. results[1], + "2. Filename: " .. results[2], + "3. Absolute path: " .. results[3], + }, { prompt = "Choose to copy to clipboard:" }, function(choice) + if choice then + local i = tonumber(choice:sub(1, 1)) + if i then + local result = results[i] + vim.fn.setreg('"', result) + vim.fn.setreg("+", result) + vim.notify("Copied: " .. result) + else + vim.notify("Invalid selection") + end + else + vim.notify("Selection cancelled") + end + end) + end, + find_in_folder = function(state) + local node = state.tree:get_node() + local filepath = node:get_id() + Snacks.picker.grep({ dirs = { filepath } }) + end, + }, + window = { + width = 40, + position = "right", + mappings = { + [""] = false, + ["a"] = "add_to_harpoon", + ["y"] = "copy_path", + ["ff"] = "find_in_folder", + [""] = { "scroll_preview", config = { direction = 10 } }, + [""] = { "scroll_preview", config = { direction = -10 } }, + [""] = "close_window", + }, + }, + filesystem = { + filtered_items = { hide_dotfiles = false, always_show = {} }, + use_libuv_file_watcher = false, + follow_current_file = { enabled = true, leave_dirs_open = true }, + }, + event_handlers = { + { event = events.FILE_MOVED, handler = on_move }, + { event = events.FILE_RENAMED, handler = on_move }, + }, +}) + +vim.keymap.set( + "n", + f.isMac() and "" or "", + "Neotree toggle", + { desc = "Toggle file explorer on current file" } +) \ No newline at end of file diff --git a/plugin/neominimap.lua b/plugin/neominimap.lua new file mode 100644 index 0000000..4cac990 --- /dev/null +++ b/plugin/neominimap.lua @@ -0,0 +1,11 @@ +vim.pack.add({ "https://github.com/Isrothy/neominimap.nvim" }) + +vim.g.neominimap = { + auto_enable = true, + current_line_position = "percent", + float = { window_border = "none" }, +} + +vim.api.nvim_create_user_command("MinimapToggle", function() + vim.cmd("Neominimap Toggle") +end, { desc = "Toggle minimap" }) \ No newline at end of file diff --git a/plugin/nvim-surround.lua b/plugin/nvim-surround.lua new file mode 100644 index 0000000..58c2912 --- /dev/null +++ b/plugin/nvim-surround.lua @@ -0,0 +1,16 @@ +vim.pack.add({ "https://github.com/kylechui/nvim-surround" }) +vim.keymap.set("v", "(", "(nvim-surround-visual)(lvi(", { desc = "Surround with brackets ()" }) +vim.keymap.set("v", "[", "(nvim-surround-visual)[lvi[", { desc = "Surround with square brackets []" }) +vim.keymap.set("v", "{", "(nvim-surround-visual){lvi{", { desc = "Surround with curly brackets {}" }) +vim.keymap.set("v", '"', '(nvim-surround-visual)"lvi"', { desc = 'Surround with curly brackets ""' }) +vim.keymap.set("v", "`", "(nvim-surround-visual)`lvi`", { desc = "Surround with curly brackets ``" }) +vim.keymap.set("v", "<", "(nvim-surround-visual)", { desc = "Surround with less/greater than <>" }) +vim.keymap.set("v", "t", "(nvim-surround-visual)t", { desc = "Surround with anything from input, html tags" }) +require("nvim-surround").setup({ + surrounds = { + ["("] = { add = { "(", ")" } }, + ["{"] = { add = { "{", "}" } }, + ["<"] = { add = { "<", ">" } }, + ["["] = { add = { "[", "]" } }, + }, +}) \ No newline at end of file diff --git a/plugin/sessions.lua b/plugin/sessions.lua new file mode 100644 index 0000000..349b190 --- /dev/null +++ b/plugin/sessions.lua @@ -0,0 +1,8 @@ +vim.pack.add({ "https://github.com/rmagatti/auto-session" }) +vim.pack.add({ "https://github.com/tiagovla/scope.nvim" }) +require("scope").setup({}) +require("auto-session").setup({ + suppressed_dirs = { "~/", "/" }, + pre_save_cmds = { "ScopeSaveState" }, + post_restore_cmds = { "ScopeLoadState" }, +}) \ No newline at end of file diff --git a/plugin/snacks.lua b/plugin/snacks.lua new file mode 100644 index 0000000..de2b6cc --- /dev/null +++ b/plugin/snacks.lua @@ -0,0 +1,223 @@ +vim.pack.add({ "https://github.com/folke/snacks.nvim" }) +local f = require("common.utils") +local TERMINAL_SHELL = "fish" +local LAZYGIT_KEYMAP = f.isMac() and "" or "" + +local global_keys = { + [""] = { f.isMac() and "" or "" }, + [""] = { f.isMac() and "" or "" }, + [""] = { "list_scroll_down" }, + [""] = { "list_scroll_up" }, + ["s"] = "edit_vsplit", + ["t"] = "tab", + [""] = { "history_forward", mode = "i" }, + [""] = { "history_back", mode = "i" }, + [f.isMac() and "" or ""] = { "qflist", mode = { "n", "i" } }, + [""] = { "preview_scroll_down", mode = { "n", "i" } }, + [""] = { "preview_scroll_up", mode = { "n", "i" } }, + ["a"] = "add_to_harpoon", +} + +local buffer_keys = { + ["w"] = "bufdelete", + ["v"] = "list_down", + ["c"] = "list_up", +} + +require("snacks").setup({ + image = {}, + indent = {}, + statuscolumn = { + left = { "sign", "git" }, + right = { "mark", "fold" }, + folds = { open = true }, + git = { patterns = { "GitSign" } }, + refresh = 100, + }, + words = { + debounce = 50, + enabled = true, + notify_jump = true, + }, + lazygit = { + config = { + editPreset = "nvim-remote", + os = { + edit = TERMINAL_SHELL + .. ' -c \'if test -z "$NVIM"; nvim -- {{filename}}; else; nvim --server "$NVIM" --remote-send "' + .. LAZYGIT_KEYMAP + .. '"; nvim --server "$NVIM" --remote {{filename}}; end\'', + editAtLine = TERMINAL_SHELL + .. ' -c \'if test -z "$NVIM"; nvim +{{line}} -- {{filename}}; else; nvim --server "$NVIM" --remote-send "' + .. LAZYGIT_KEYMAP + .. '"; nvim --server "$NVIM" --remote {{filename}}; nvim --server "$NVIM" --remote-send ":{{line}}"; end\'', + }, + }, + win = { + height = 0.95, + width = 0.95, + keys = { + { + LAZYGIT_KEYMAP, + function() + Snacks.lazygit() + end, + mode = "t", + }, + }, + }, + }, + terminal = { + win = { height = 0.95, width = 0.95 }, + }, + picker = { + actions = { + add_to_harpoon = function(picker) + local harpoon = require("harpoon") + local full_path = picker:current() + local cwd_path = picker:cwd() + local item = { + value = full_path.file:gsub("^" .. vim.pesc(cwd_path) .. "/", ""), + context = { row = 1, col = 0 }, + } + harpoon:list():add(item) + vim.api.nvim_exec_autocmds("User", { pattern = "HarpoonRefresh" }) + end, + }, + previewers = { git = { builtin = false } }, + formatters = { + filename = { filename_first = true, truncate = 80 }, + file = { filename_first = true, truncate = 80 }, + }, + win = { + input = { keys = global_keys }, + list = { keys = global_keys }, + }, + sources = { + git_log_line = { focus = "list", layout = { preset = "vertical" } }, + git_log_file = { focus = "list", layout = { preset = "vertical" } }, + buffers = { + focus = "list", + layout = { preset = "vertical" }, + win = { + input = { keys = buffer_keys }, + list = { keys = buffer_keys }, + }, + preview = function(ctx) + local previewers = require("snacks.picker.preview") + previewers.file(ctx) + local path = require("snacks.picker.util").path(ctx.item) + if path then + local relative_path = require("snacks.picker.util").truncpath(path, 999) + ctx.preview:set_title(relative_path) + end + end, + }, + grep = { + args = { "--hidden", "-i" }, + format = "filename", + }, + grep_word = { format = "filename" }, + files = { + cmd = "rg", + args = { "--files", "--hidden", "--iglob", "!.git" }, + }, + select = { focus = "list" }, + lsp_references = { focus = "list", format = "filename" }, + lsp_implementations = { focus = "list", format = "filename" }, + }, + }, +}) + +vim.keymap.set("n", LAZYGIT_KEYMAP, function() + Snacks.lazygit() +end, { desc = "Open Lazygit" }) + +vim.keymap.set("n", f.isMac() and "" or "", function() + Snacks.terminal(TERMINAL_SHELL) +end, { desc = "Open Terminal" }) + +vim.keymap.set("t", f.isMac() and "" or "", function() + Snacks.terminal.toggle(TERMINAL_SHELL) +end, { desc = "Toggle Terminal when opened" }) + +vim.keymap.set("n", "", function() + Snacks.words.jump(1, true) +end, { desc = "Next occurence" }) + +vim.keymap.set("n", "", function() + Snacks.words.jump(-1, true) +end, { desc = "Prev occurence" }) + +vim.keymap.set("n", "v", function() + Snacks.picker.buffers({ + on_show = function(picker) + picker:action("list_down") + end, + }) +end) + +vim.keymap.set("n", "p", function() + Snacks.picker.files() +end) + +vim.keymap.set("n", "ff", function() + Snacks.picker.grep() +end) + +vim.keymap.set("v", "ff", function() + Snacks.picker.grep_word({ focus = "list", live = true }) +end) + +vim.keymap.set("n", "fr", function() + Snacks.picker.resume() +end) + +vim.keymap.set("n", "fg", function() + Snacks.picker.git_log_line() +end) + +vim.keymap.set("n", "fG", function() + Snacks.picker.git_log_file() +end) + +vim.keymap.set("n", "fl", function() + Snacks.picker.git_status({ focus = "list" }) +end) + +vim.keymap.set("n", "gr", function() + Snacks.picker.lsp_references() +end, { nowait = true }) + +vim.keymap.set("n", "gi", function() + Snacks.picker.lsp_implementations() +end, { nowait = true }) + +local custom_default = require("snacks.picker.config.layouts").default +custom_default.layout.width = 0.95 +custom_default.layout.height = 0.9 +custom_default.layout[2].min_width = 85 +custom_default.layout[2].width = 85 + +local custom_vertical = require("snacks.picker.config.layouts").vertical +custom_vertical.layout.height = 0.95 +custom_vertical.layout.backdrop = true +custom_vertical.layout.width = 0.8 +custom_vertical.layout[3].height = 0.8 + +f.HighlightGroups.register(function() + vim.api.nvim_set_hl(0, "SnacksPickerDir", vim.api.nvim_get_hl(0, { name = "Comment", link = false })) +end) + +vim.api.nvim_create_user_command("CloseOtherBuffers", function() + Snacks.bufdelete.other() +end, { desc = "Close all other buffers" }) + +vim.api.nvim_create_user_command("SnacksPickers", function() + Snacks.picker() +end, { desc = "Show all Snacks pickers" }) + +vim.api.nvim_create_user_command("SymbolsPicker", function() + Snacks.picker.lsp_symbols({ focus = "list" }) +end, { desc = "Show Symbols for this file (Snack picker)" }) + diff --git a/plugin/ts-comments.lua b/plugin/ts-comments.lua new file mode 100644 index 0000000..9de529e --- /dev/null +++ b/plugin/ts-comments.lua @@ -0,0 +1,3 @@ +vim.pack.add({ "https://github.com/folke/ts-comments.nvim" }) +require("ts-comments").setup({}) + diff --git a/plugin/wildfire.lua b/plugin/wildfire.lua new file mode 100644 index 0000000..5584530 --- /dev/null +++ b/plugin/wildfire.lua @@ -0,0 +1,13 @@ +local f = require("common.utils") + +vim.pack.add({ + "https://github.com/sustech-data/wildfire.nvim", + "https://github.com/nvim-treesitter/nvim-treesitter", +}) +require("wildfire").setup({ + keymaps = { + init_selection = "", + node_incremental = "", + node_decremental = f.isMac() and "" or "⊘", + }, +}) \ No newline at end of file From fff2b975f078a408374b001f3b06f62db1e690b6 Mon Sep 17 00:00:00 2001 From: Vicente Date: Fri, 10 Apr 2026 10:41:14 +0200 Subject: [PATCH 24/35] enable ui2 --- init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.lua b/init.lua index 1a00b36..84f176b 100644 --- a/init.lua +++ b/init.lua @@ -1,5 +1,7 @@ vim.loader.enable() +require("vim._core.ui2").enable({}) + require("options") require("keymaps") require("autocmd") From 25f706f8504b31192331489796a9d22d1af81c55 Mon Sep 17 00:00:00 2001 From: Vicente Date: Fri, 10 Apr 2026 10:41:33 +0200 Subject: [PATCH 25/35] moved pack update and restore to custom commands --- lua/commands.lua | 8 ++++++++ lua/keymaps.lua | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lua/commands.lua b/lua/commands.lua index cfda12f..ca80468 100644 --- a/lua/commands.lua +++ b/lua/commands.lua @@ -19,3 +19,11 @@ end, { desc = "Toggle quickfix list" }) create_cmd("ClearAllMarks", function() vim.cmd("delmarks A-Z") end, { desc = "Clear {A-Z} marks" }) + +create_cmd("PackUpdate", function() + vim.pack.update() +end, { desc = "Update all packs" }) + +create_cmd("PackRestore", function() + vim.pack.update(nil, { target = "lockfile", force = true }) +end, { desc = "Restore packs to lockfile versions" }) diff --git a/lua/keymaps.lua b/lua/keymaps.lua index 95e75e2..5afec98 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -176,11 +176,3 @@ vim.keymap.set("n", "ff", "za", { desc = "Toggle fold" }) -- Search in visual mode vim.keymap.set("x", "/", "`pu", function() - vim.pack.update() -end, { desc = "vimpack update - code action to skip some" }) - -vim.keymap.set("n", "pr", function() - vim.pack.update(nil, { target = "lockfile", force = true }) -end, { desc = "vimpack to lockfile versions" }) From 9f962f60aaae1828753b3d063857d4522a053e98 Mon Sep 17 00:00:00 2001 From: Vicente Date: Fri, 10 Apr 2026 10:44:40 +0200 Subject: [PATCH 26/35] updated and removed deps --- nvim-pack-lock.json | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/nvim-pack-lock.json b/nvim-pack-lock.json index 095a914..36a868c 100644 --- a/nvim-pack-lock.json +++ b/nvim-pack-lock.json @@ -1,7 +1,7 @@ { "plugins": { "LuaSnip": { - "rev": "5a1e39223db9a0498024a77b8441169d260c8c25", + "rev": "642b0c595e11608b4c18219e93b88d7637af27bc", "src": "https://github.com/L3MON4D3/LuaSnip", "version": "'v2.5.0'" }, @@ -14,11 +14,11 @@ "src": "https://github.com/rmagatti/auto-session" }, "barbar.nvim": { - "rev": "53b5a2f34b68875898f0531032fbf090e3952ad7", + "rev": "539d73def39c9172b4d4d769f14090e08f37b29d", "src": "https://github.com/romgrk/barbar.nvim" }, "blink.cmp": { - "rev": "451168851e8e2466bc97ee3e026c3dcb9141ce07", + "rev": "78336bc89ee5365633bcf754d93df01678b5c08f", "src": "https://github.com/saghen/blink.cmp" }, "codediff.nvim": { @@ -30,7 +30,7 @@ "src": "https://github.com/stevearc/conform.nvim" }, "copilot.lua": { - "rev": "faa347cef2a9429eec14dada549e000a3b8d0fc9", + "rev": "07aa57148ac28986bab9f55e87ee3d929e2726b1", "src": "https://github.com/zbirenbaum/copilot.lua" }, "cutlass.nvim": { @@ -50,11 +50,11 @@ "src": "https://github.com/rafamadriz/friendly-snippets" }, "gitsigns.nvim": { - "rev": "0f00d07c2c3106ba6abd594ac1c17f211141b7b5", + "rev": "8d82c240f190fc33723d48c308ccc1ed8baad69d", "src": "https://github.com/lewis6991/gitsigns.nvim" }, "harpoon": { - "rev": "87b1a3506211538f460786c23f98ec63ad9af4e5", + "rev": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3", "src": "https://github.com/ThePrimeagen/harpoon" }, "live-server.nvim": { @@ -62,7 +62,7 @@ "src": "https://github.com/selimacerbas/live-server.nvim" }, "lualine.nvim": { - "rev": "47f91c416daef12db467145e16bed5bbfe00add8", + "rev": "f5d2a8570f8b736ddb9bb4be504355bcd6e15ec8", "src": "https://github.com/nvim-lualine/lualine.nvim" }, "markdown-preview.nvim": { @@ -70,7 +70,7 @@ "src": "https://github.com/selimacerbas/markdown-preview.nvim" }, "mason-lspconfig.nvim": { - "rev": "25f609e7fca78af7cede4f9fa3af8a94b1c4950b", + "rev": "63a3c6a80538de1003373a619e29aeda27809ad3", "src": "https://github.com/mason-org/mason-lspconfig.nvim" }, "mason-tool-installer.nvim": { @@ -78,23 +78,19 @@ "src": "https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim" }, "mason.nvim": { - "rev": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65", + "rev": "b03fb0f20bc1d43daf558cda981a2be22e73ac42", "src": "https://github.com/mason-org/mason.nvim" }, - "mini.nvim": { - "rev": "69b7433355664cf76898eb86a12a019f39bd86d1", - "src": "https://github.com/nvim-mini/mini.nvim" - }, "multicursor.nvim": { "rev": "704b99f10a72cc05d370cfeb294ff83412a8ab55", "src": "https://github.com/jake-stewart/multicursor.nvim" }, "neo-tree.nvim": { - "rev": "84c75e7a7e443586f60508d12fc50f90d9aee14e", + "rev": "b48ed11632c8208ffb27dab6acfbf16e4f9e3376", "src": "https://github.com/nvim-neo-tree/neo-tree.nvim" }, "neominimap.nvim": { - "rev": "5538a69ecf833c705973d5fb8c2bccd3f2cecf93", + "rev": "b0fffd0cfbf9c249bc0f08922993579f143a750d", "src": "https://github.com/Isrothy/neominimap.nvim" }, "nui.nvim": { @@ -114,7 +110,7 @@ "src": "https://github.com/kevinhwang91/nvim-hlslens" }, "nvim-lspconfig": { - "rev": "8e2084bf5e40c79c1f42210a6ef96a0a4793a763", + "rev": "c588db330592fa477a70d2fee6ba20a57194bdc3", "src": "https://github.com/neovim/nvim-lspconfig" }, "nvim-scrollbar": { @@ -122,15 +118,15 @@ "src": "https://github.com/petertriho/nvim-scrollbar" }, "nvim-surround": { - "rev": "61319d4bd1c5e336e197defa15bd104c51f0fb29", + "rev": "9291040de8cd8a4439eb64c441e8d5d2bf884a5a", "src": "https://github.com/kylechui/nvim-surround" }, "nvim-treesitter": { - "rev": "c82bf96f0a773d85304feeb695e1e23b2207ac35", + "rev": "4916d6592ede8c07973490d9322f187e07dfefac", "src": "https://github.com/nvim-treesitter/nvim-treesitter" }, "nvim-web-devicons": { - "rev": "6e76c5e47e957fbf080b1fdac165c66dbd2e7cfb", + "rev": "c72328a5494b4502947a022fe69c0c47e53b6aa6", "src": "https://github.com/nvim-tree/nvim-web-devicons" }, "onedarkpro.nvim": { @@ -138,7 +134,7 @@ "src": "https://github.com/olimorris/onedarkpro.nvim" }, "plenary.nvim": { - "rev": "b9fd5226c2f76c951fc8ed5923d85e4de065e509", + "rev": "74b06c6c75e4eeb3108ec01852001636d85a932b", "src": "https://github.com/nvim-lua/plenary.nvim" }, "scope.nvim": { From 9a8cb13a97bbe64eee817ecd5c646547273708ee Mon Sep 17 00:00:00 2001 From: Vicente Date: Fri, 10 Apr 2026 11:53:40 +0200 Subject: [PATCH 27/35] added :Pack command with nice UI --- lua/commands.lua | 8 - plugin/pack.lua | 510 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 510 insertions(+), 8 deletions(-) create mode 100644 plugin/pack.lua diff --git a/lua/commands.lua b/lua/commands.lua index ca80468..cfda12f 100644 --- a/lua/commands.lua +++ b/lua/commands.lua @@ -19,11 +19,3 @@ end, { desc = "Toggle quickfix list" }) create_cmd("ClearAllMarks", function() vim.cmd("delmarks A-Z") end, { desc = "Clear {A-Z} marks" }) - -create_cmd("PackUpdate", function() - vim.pack.update() -end, { desc = "Update all packs" }) - -create_cmd("PackRestore", function() - vim.pack.update(nil, { target = "lockfile", force = true }) -end, { desc = "Restore packs to lockfile versions" }) diff --git a/plugin/pack.lua b/plugin/pack.lua new file mode 100644 index 0000000..0fd8552 --- /dev/null +++ b/plugin/pack.lua @@ -0,0 +1,510 @@ +-- +-- Minimalistic vim.pack UI +-- +-- Provides :Pack command that opens a floating window dashboard +-- for managing plugins (update, clean, log, inspect). +-- + +local api = vim.api +local ns = api.nvim_create_namespace("pack_ui") + +-- Highlight groups +local function setup_highlights() + local links = { + PackUiHeader = "Title", + PackUiButton = "Function", + PackUiPluginLoaded = "String", + PackUiPluginNotLoaded = "Comment", + PackUiPluginMissing = "ErrorMsg", + PackUiVersion = "Number", + PackUiSectionHeader = "Label", + PackUiSeparator = "FloatBorder", + PackUiDetail = "Comment", + PackUiHelp = "SpecialComment", + } + for group, target in pairs(links) do + api.nvim_set_hl(0, group, { link = target, default = true }) + end +end + +-- State +local state = { + bufnr = nil, + winid = nil, + win_autocmd_id = nil, -- WinClosed autocmd ID + line_to_plugin = {}, -- line number (1-based) => plugin name + plugin_lines = {}, -- plugin name => line number (1-based) + expanded = {}, -- plugin name => bool + show_help = false, +} + +-- Cache of path => installed git tag (false = no tag found) +local tag_cache = {} + +-- For versioned plugins, return the actual installed tag from git. +-- Results are cached for the session so git is only called once per plugin. +local function get_installed_tag(path) + if not path then + return nil + end + if tag_cache[path] ~= nil then + return tag_cache[path] or nil + end + local result = + vim.fn.system("git -C " .. vim.fn.shellescape(path) .. " describe --tags --exact-match HEAD 2>/dev/null") + if vim.v.shell_error == 0 then + local tag = vim.trim(result) + tag_cache[path] = tag + return tag + end + tag_cache[path] = false + return nil +end + +-- Get version string from plugin spec +local function get_version_str(p) + local v = p.spec.version + if v == nil then + return "" + end + if type(v) == "string" then + return v + end + return tostring(v) +end + +-- Build lines and highlights for the buffer +local function build_content() + local plugins = vim.pack.get(nil, { info = false }) + + local loaded = {} + local not_loaded = {} + for _, p in ipairs(plugins) do + if p.active then + table.insert(loaded, p) + else + table.insert(not_loaded, p) + end + end + + table.sort(loaded, function(a, b) + return a.spec.name < b.spec.name + end) + table.sort(not_loaded, function(a, b) + return a.spec.name < b.spec.name + end) + + local lines = {} + local hls = {} -- { line, col_start, col_end, hl_group } + local line_to_plugin = {} + local plugin_lines = {} + + local function add(text, hl) + local lnum = #lines + lines[#lines + 1] = text + if hl then + table.insert(hls, { lnum, 0, #text, hl }) + end + end + + local function add_hl(lnum, col_start, col_end, hl) + table.insert(hls, { lnum, col_start, col_end, hl }) + end + + -- Header + local header = string.format(" vim.pack -- %d plugins | %d loaded", #plugins, #loaded) + add(header, "PackUiHeader") + + -- Separator (fill the window width minus the leading space) + local win_width = state.winid and vim.api.nvim_win_get_width(state.winid) or 80 + local sep = " " .. string.rep("─", win_width - 1) + add(sep, "PackUiSeparator") + + -- Action bar + local bar = " [U]pdate All [u] Update [X] Clean [D]elete [L] Log [?] Help" + add(bar) + -- Highlight the bracket keys (gmatch () captures are 1-based; + -- the end capture points one past the match, which is exactly + -- the exclusive end_col that extmarks expect) + local lnum = #lines - 1 + for s, e in bar:gmatch("()%[.-%]()") do + add_hl(lnum, s - 1, e - 1, "PackUiButton") + end + + -- Help section (toggled) + if state.show_help then + add("") + add(" Keymaps:", "PackUiHelp") + add(" U Update all plugins", "PackUiHelp") + add(" u Update plugin under cursor", "PackUiHelp") + add(" X Clean non-active plugins", "PackUiHelp") + add(" D Delete plugin under cursor (non-active only)", "PackUiHelp") + add(" L Open update log file", "PackUiHelp") + add(" Toggle plugin details", "PackUiHelp") + add(" ]] Jump to next plugin", "PackUiHelp") + add(" [[ Jump to previous plugin", "PackUiHelp") + add(" q/Esc Close window", "PackUiHelp") + end + + -- Compute max name width for alignment + local max_name = 0 + for _, p in ipairs(plugins) do + max_name = math.max(max_name, #p.spec.name) + end + + -- Render a plugin line + -- Format: ' %s %s%s%s' => 3 spaces, icon, 1 space, name, pad, version + -- Byte offsets: icon starts at 3, name starts at 3 + #icon_bytes + 1 + local function render_plugin(p, icon, hl_group) + local name = p.spec.name + local pad = string.rep(" ", max_name - #name + 2) + local version = get_version_str(p) + local tag = p.spec.version and get_installed_tag(p.path) or nil + local rev_short = p.rev and p.rev:sub(1, 7) or "" + + local ver_display = tag or (rev_short ~= "" and rev_short or version) + local line = string.format(" %s %s%s%s", icon, name, pad, ver_display) + local lnum_cur = #lines + add(line) + + -- Byte offsets for highlights + local icon_bytes = #icon + local icon_start = 3 + local name_start = icon_start + icon_bytes + 1 + + add_hl(lnum_cur, icon_start, icon_start + icon_bytes, hl_group) + add_hl(lnum_cur, name_start, name_start + #name, hl_group) + if #ver_display > 0 then + local ver_start = name_start + #name + #pad + add_hl(lnum_cur, ver_start, ver_start + #ver_display, "PackUiVersion") + end + + -- Track plugin position (1-based line number for cursor operations) + line_to_plugin[lnum_cur + 1] = name + plugin_lines[name] = lnum_cur + 1 + + -- Expanded details + if state.expanded[name] then + local details = { + string.format(" Path: %s", p.path), + string.format(" Source: %s", p.spec.src), + } + if p.rev then + table.insert(details, string.format(" Rev: %s", p.rev)) + end + for _, d in ipairs(details) do + add(d, "PackUiDetail") + end + end + end + + -- Loaded section + add("") + add(string.format(" Loaded (%d)", #loaded), "PackUiSectionHeader") + for _, p in ipairs(loaded) do + render_plugin(p, "●", "PackUiPluginLoaded") + end + + -- Not Loaded section + if #not_loaded > 0 then + add("") + add(string.format(" Not Loaded (%d)", #not_loaded), "PackUiSectionHeader") + for _, p in ipairs(not_loaded) do + render_plugin(p, "○", "PackUiPluginNotLoaded") + end + end + + state.line_to_plugin = line_to_plugin + state.plugin_lines = plugin_lines + + return lines, hls +end + +-- Render content into the buffer +local function render() + if not state.bufnr or not api.nvim_buf_is_valid(state.bufnr) then + return + end + + local lines, hls = build_content() + + vim.bo[state.bufnr].modifiable = true + api.nvim_buf_set_lines(state.bufnr, 0, -1, false, lines) + vim.bo[state.bufnr].modifiable = false + vim.bo[state.bufnr].modified = false + + -- Apply highlights + api.nvim_buf_clear_namespace(state.bufnr, ns, 0, -1) + for _, hl in ipairs(hls) do + api.nvim_buf_set_extmark(state.bufnr, ns, hl[1], hl[2], { + end_col = hl[3], + hl_group = hl[4], + }) + end +end + +-- Get plugin name at cursor +local function plugin_at_cursor() + if not state.winid or not api.nvim_win_is_valid(state.winid) then + return nil + end + local row = api.nvim_win_get_cursor(state.winid)[1] + return state.line_to_plugin[row] +end + +-- Close the floating window +local function close() + -- Remove autocmd first to prevent it from corrupting state on re-open + if state.win_autocmd_id then + pcall(api.nvim_del_autocmd, state.win_autocmd_id) + state.win_autocmd_id = nil + end + if state.winid and api.nvim_win_is_valid(state.winid) then + api.nvim_win_close(state.winid, true) + end + -- Buffer has bufhidden=wipe, so it is wiped when the window closes. + -- No need to explicitly delete it. + state.winid = nil + state.bufnr = nil + state.expanded = {} + state.show_help = false +end + +-- Jump to next/prev plugin line +local function jump_plugin(direction) + if not state.winid or not api.nvim_win_is_valid(state.winid) then + return + end + local row = api.nvim_win_get_cursor(state.winid)[1] + + -- Collect sorted plugin line numbers + local plines = {} + for lnum, _ in pairs(state.line_to_plugin) do + table.insert(plines, lnum) + end + table.sort(plines) + + if direction > 0 then + for _, lnum in ipairs(plines) do + if lnum > row then + api.nvim_win_set_cursor(state.winid, { lnum, 0 }) + return + end + end + -- Wrap around + if #plines > 0 then + api.nvim_win_set_cursor(state.winid, { plines[1], 0 }) + end + else + for i = #plines, 1, -1 do + if plines[i] < row then + api.nvim_win_set_cursor(state.winid, { plines[i], 0 }) + return + end + end + -- Wrap around + if #plines > 0 then + api.nvim_win_set_cursor(state.winid, { plines[#plines], 0 }) + end + end +end + +-- Forward declaration so keymap closures can reference open() before it is +-- defined (Lua closures capture locals by reference, but the local must be +-- declared in an enclosing scope at the point where the closure is created). +local open + +-- Setup buffer keymaps (buffer-local, survive re-focus since buffer persists) +local function setup_keymaps() + local buf = state.bufnr + local opts = { buffer = buf, silent = true, nowait = true } + + -- Close + vim.keymap.set("n", "q", close, opts) + vim.keymap.set("n", "", close, opts) + + -- Update all + vim.keymap.set("n", "U", function() + close() + vim.pack.update() + end, opts) + + -- Update plugin under cursor + vim.keymap.set("n", "u", function() + local name = plugin_at_cursor() + if name then + close() + vim.pack.update({ name }) + end + end, opts) + + -- Clean non-active plugins + vim.keymap.set("n", "X", function() + local to_clean = vim.iter(vim.pack.get(nil, { info = false })) + :filter(function(x) + return not x.active + end) + :map(function(x) + return x.spec.name + end) + :totable() + + if #to_clean == 0 then + vim.notify("vim.pack: nothing to clean", vim.log.levels.INFO) + return + end + + local msg = string.format("Remove %d non-active plugin(s)?\n\n%s", #to_clean, table.concat(to_clean, "\n")) + local choice = vim.fn.confirm(msg, "&Yes\n&No", 2, "Question") + if choice == 1 then + close() + local ok, err = pcall(vim.pack.del, to_clean) + if ok then + vim.notify(string.format("vim.pack: removed %d plugin(s)", #to_clean), vim.log.levels.INFO) + else + vim.notify("vim.pack: " .. tostring(err), vim.log.levels.ERROR) + end + end + end, opts) + + -- Delete plugin under cursor + vim.keymap.set("n", "D", function() + local name = plugin_at_cursor() + if not name then + return + end + + -- Check if active + local ok, pdata = pcall(vim.pack.get, { name }, { info = false }) + if not ok then + vim.notify(string.format("vim.pack: %s is not installed", name), vim.log.levels.WARN) + return + end + if #pdata > 0 and pdata[1].active then + vim.notify(string.format("vim.pack: %s is active, remove from config first", name), vim.log.levels.WARN) + return + end + + local choice = vim.fn.confirm(string.format("Delete plugin %s?", name), "&Yes\n&No", 2, "Question") + if choice == 1 then + close() + local del_ok, err = pcall(vim.pack.del, { name }) + if del_ok then + vim.notify(string.format("vim.pack: removed %s", name), vim.log.levels.INFO) + else + vim.notify("vim.pack: " .. tostring(err), vim.log.levels.ERROR) + end + end + end, opts) + + -- Open log + vim.keymap.set("n", "L", function() + close() + local log_path = vim.fs.joinpath(vim.fn.stdpath("log"), "nvim-pack.log") + if vim.uv.fs_stat(log_path) then + vim.cmd.edit(log_path) + else + vim.notify("vim.pack: no log file yet", vim.log.levels.INFO) + end + end, opts) + + -- Toggle details + vim.keymap.set("n", "", function() + local name = plugin_at_cursor() + if name then + state.expanded[name] = not state.expanded[name] + render() + -- Restore cursor to the plugin line + if state.plugin_lines[name] then + api.nvim_win_set_cursor(state.winid, { state.plugin_lines[name], 0 }) + end + end + end, opts) + + -- Navigation + vim.keymap.set("n", "]]", function() + jump_plugin(1) + end, opts) + vim.keymap.set("n", "[[", function() + jump_plugin(-1) + end, opts) + + -- Help toggle + vim.keymap.set("n", "?", function() + state.show_help = not state.show_help + render() + end, opts) +end + +-- Open the Pack UI +open = function() + -- If already open, focus it + if state.winid and api.nvim_win_is_valid(state.winid) then + api.nvim_set_current_win(state.winid) + return + end + + setup_highlights() + + -- Create buffer + state.bufnr = api.nvim_create_buf(false, true) + vim.bo[state.bufnr].buftype = "nofile" + vim.bo[state.bufnr].bufhidden = "wipe" + vim.bo[state.bufnr].swapfile = false + vim.bo[state.bufnr].filetype = "pack-ui" + + -- Calculate window size + local cols = vim.o.columns + local lines = vim.o.lines + local width = math.min(cols - 4, math.max(math.floor(cols * 0.8), 60)) + local height = math.min(lines - 4, math.max(math.floor(lines * 0.7), 20)) + local row = math.floor((lines - height) / 2) + local col = math.floor((cols - width) / 2) + + -- Create floating window + state.winid = api.nvim_open_win(state.bufnr, true, { + relative = "editor", + width = width, + height = height, + row = row, + col = col, + style = "minimal", + border = "rounded", + title = " vim.pack ", + title_pos = "center", + }) + + vim.wo[state.winid].cursorline = true + vim.wo[state.winid].wrap = false + + -- Render content + render() + + -- Setup keymaps + setup_keymaps() + + -- Track WinClosed to clean up state if the window is closed externally + -- (e.g., :quit, c). Store the autocmd ID so close() can remove it + -- to prevent races when re-opening immediately after an explicit close. + local captured_winid = state.winid + state.win_autocmd_id = api.nvim_create_autocmd("WinClosed", { + buffer = state.bufnr, + once = true, + callback = function(ev) + -- Only clean up if the closed window matches the one we opened + if vim._tointeger(ev.match) ~= captured_winid then + return + end + state.winid = nil + state.bufnr = nil + state.win_autocmd_id = nil + state.expanded = {} + state.show_help = false + end, + }) +end + +-- Register :Pack command +vim.api.nvim_create_user_command("Pack", function() + open() +end, { desc = "Open vim.pack plugin manager UI" }) From 887eeaec692121329ab52eae980fa4a732352864 Mon Sep 17 00:00:00 2001 From: Vicente Date: Tue, 14 Apr 2026 19:49:45 +0200 Subject: [PATCH 28/35] added restore option in Pack --- plugin/pack.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/plugin/pack.lua b/plugin/pack.lua index 0fd8552..74e6ed1 100644 --- a/plugin/pack.lua +++ b/plugin/pack.lua @@ -121,7 +121,7 @@ local function build_content() add(sep, "PackUiSeparator") -- Action bar - local bar = " [U]pdate All [u] Update [X] Clean [D]elete [L] Log [?] Help" + local bar = " [U]pdate All [u] Update [R]estore [X] Clean [D]elete [L] Log [?] Help" add(bar) -- Highlight the bracket keys (gmatch () captures are 1-based; -- the end capture points one past the match, which is exactly @@ -137,6 +137,7 @@ local function build_content() add(" Keymaps:", "PackUiHelp") add(" U Update all plugins", "PackUiHelp") add(" u Update plugin under cursor", "PackUiHelp") + add(" R Restore plugins to lockfile versions", "PackUiHelp") add(" X Clean non-active plugins", "PackUiHelp") add(" D Delete plugin under cursor (non-active only)", "PackUiHelp") add(" L Open update log file", "PackUiHelp") @@ -338,6 +339,12 @@ local function setup_keymaps() end end, opts) + -- Restore plugins from lockfile + vim.keymap.set("n", "R", function() + close() + vim.pack.update(nil, { target = "lockfile" }) + end, opts) + -- Clean non-active plugins vim.keymap.set("n", "X", function() local to_clean = vim.iter(vim.pack.get(nil, { info = false })) @@ -508,3 +515,7 @@ end vim.api.nvim_create_user_command("Pack", function() open() end, { desc = "Open vim.pack plugin manager UI" }) + +vim.api.nvim_create_user_command("PackRestore", function() + vim.pack.update(nil, { target = "lockfile" }) +end, { desc = "Restore plugins to versions in lockfile" }) From 3cc40b0fe0601b216a28c6f7ec46e1c69c159c76 Mon Sep 17 00:00:00 2001 From: Vicente Date: Tue, 14 Apr 2026 19:56:02 +0200 Subject: [PATCH 29/35] updated deps & removed copilot --- nvim-pack-lock.json | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/nvim-pack-lock.json b/nvim-pack-lock.json index 36a868c..b3c40e4 100644 --- a/nvim-pack-lock.json +++ b/nvim-pack-lock.json @@ -29,10 +29,6 @@ "rev": "086a40dc7ed8242c03be9f47fbcee68699cc2395", "src": "https://github.com/stevearc/conform.nvim" }, - "copilot.lua": { - "rev": "07aa57148ac28986bab9f55e87ee3d929e2726b1", - "src": "https://github.com/zbirenbaum/copilot.lua" - }, "cutlass.nvim": { "rev": "d01b5c1943050fcda8edf5c89d4419c41a65890e", "src": "https://github.com/gbprod/cutlass.nvim" @@ -62,7 +58,7 @@ "src": "https://github.com/selimacerbas/live-server.nvim" }, "lualine.nvim": { - "rev": "f5d2a8570f8b736ddb9bb4be504355bcd6e15ec8", + "rev": "a905eeebc4e63fdc48b5135d3bf8aea5618fb21c", "src": "https://github.com/nvim-lualine/lualine.nvim" }, "markdown-preview.nvim": { @@ -70,7 +66,7 @@ "src": "https://github.com/selimacerbas/markdown-preview.nvim" }, "mason-lspconfig.nvim": { - "rev": "63a3c6a80538de1003373a619e29aeda27809ad3", + "rev": "0a3b42c3e503df87aef6d6513e13148381495c3a", "src": "https://github.com/mason-org/mason-lspconfig.nvim" }, "mason-tool-installer.nvim": { @@ -86,11 +82,11 @@ "src": "https://github.com/jake-stewart/multicursor.nvim" }, "neo-tree.nvim": { - "rev": "b48ed11632c8208ffb27dab6acfbf16e4f9e3376", + "rev": "aa3500f7038a32ed4b0b765cd458b9c429062cac", "src": "https://github.com/nvim-neo-tree/neo-tree.nvim" }, "neominimap.nvim": { - "rev": "b0fffd0cfbf9c249bc0f08922993579f143a750d", + "rev": "0676085d898019f06044923934e38663f5efa290", "src": "https://github.com/Isrothy/neominimap.nvim" }, "nui.nvim": { @@ -110,7 +106,7 @@ "src": "https://github.com/kevinhwang91/nvim-hlslens" }, "nvim-lspconfig": { - "rev": "c588db330592fa477a70d2fee6ba20a57194bdc3", + "rev": "8a9378a822719346a0288fa004dab302ca3c0a8f", "src": "https://github.com/neovim/nvim-lspconfig" }, "nvim-scrollbar": { @@ -130,7 +126,7 @@ "src": "https://github.com/nvim-tree/nvim-web-devicons" }, "onedarkpro.nvim": { - "rev": "dab7b623d48b50330c43234958c0ba2de9b501d5", + "rev": "f5fddfd5122fe00421e199151ae4fe8571a02898", "src": "https://github.com/olimorris/onedarkpro.nvim" }, "plenary.nvim": { From 639b1f0267f670a31e6fcc3ca1b73161f8ab5eb2 Mon Sep 17 00:00:00 2001 From: Vicente Date: Tue, 14 Apr 2026 20:04:19 +0200 Subject: [PATCH 30/35] removed harpoon --- plugin/03-lsp.lua | 1 - plugin/barbar.lua | 67 --------------------------------------------- plugin/harpoon.lua | 48 -------------------------------- plugin/neo-tree.lua | 14 ---------- plugin/snacks.lua | 14 ---------- 5 files changed, 144 deletions(-) delete mode 100644 plugin/harpoon.lua diff --git a/plugin/03-lsp.lua b/plugin/03-lsp.lua index c107e7e..a51be85 100644 --- a/plugin/03-lsp.lua +++ b/plugin/03-lsp.lua @@ -37,7 +37,6 @@ vim.pack.add({ "https://github.com/nvim-lua/plenary.nvim", "https://github.com/nvim-tree/nvim-web-devicons", "https://github.com/MunifTanjim/nui.nvim", - "https://github.com/ThePrimeagen/harpoon", "https://github.com/saghen/blink.cmp", "https://github.com/neovim/nvim-lspconfig", }) diff --git a/plugin/barbar.lua b/plugin/barbar.lua index 3335521..6d727c9 100644 --- a/plugin/barbar.lua +++ b/plugin/barbar.lua @@ -8,7 +8,6 @@ vim.g.barbar_auto_setup = false local barbar = require("barbar") local state = require("barbar.state") local render = require("barbar.ui.render") -local harpoon = require("harpoon") barbar.setup({ animation = false, @@ -43,69 +42,3 @@ local function unpin_all() end end -local function get_buffer_by_mark(mark) - for _, buf in ipairs(vim.api.nvim_list_bufs()) do - local buffer_path = vim.api.nvim_buf_get_name(buf) - if buffer_path == "" or mark.value == "" then - goto continue - end - local mark_pattern = mark.value:gsub("([%(%)%.%%%+%-%*%?%[%]%^%$])", "%%%1") - if string.match(buffer_path, mark_pattern) then - return buf - end - local buffer_path_pattern = buffer_path:gsub("([%(%)%.%%%+%-%*%?%[%]%^%$])", "%%%1") - if string.match(mark.value, buffer_path_pattern) then - return buf - end - ::continue:: - end -end - -local function refresh_all_harpoon_tabs() - local ok, harpoon = pcall(require, "harpoon") - if not ok then - return - end - local list = harpoon:list() - if not list or not list.items then - return - end - unpin_all() - for _, mark in ipairs(list.items) do - local buf = get_buffer_by_mark(mark) - if buf == nil then - vim.cmd("badd " .. mark.value) - buf = get_buffer_by_mark(mark) - end - if buf ~= nil then - state.toggle_pin(buf) - end - end - render.update() -end - -vim.api.nvim_create_autocmd({ "BufEnter", "BufAdd", "BufLeave", "User" }, { - pattern = { "*", "HarpoonRefresh" }, - callback = function() - local ok, harpoon = pcall(require, "harpoon") - if not ok or not harpoon.list then - return - end - local list = harpoon:list() - if not list or not list.items then - return - end - unpin_all() - for _, mark in ipairs(list.items) do - local buf = get_buffer_by_mark(mark) - if buf == nil then - vim.cmd("badd " .. mark.value) - buf = get_buffer_by_mark(mark) - end - if buf ~= nil then - state.toggle_pin(buf) - end - end - render.update() - end, -}) \ No newline at end of file diff --git a/plugin/harpoon.lua b/plugin/harpoon.lua deleted file mode 100644 index b2e896b..0000000 --- a/plugin/harpoon.lua +++ /dev/null @@ -1,48 +0,0 @@ -vim.pack.add({ - "https://github.com/nvim-lua/plenary.nvim", - "https://github.com/ThePrimeagen/harpoon", -}) -local harpoon = require("harpoon") -harpoon.setup() - -vim.keymap.set("n", "A", function() - harpoon:list():prepend() - vim.cmd(":do User") -end) -vim.keymap.set("n", "a", function() - harpoon:list():add() - vim.cmd(":do User") -end) -vim.keymap.set("n", "tt", function() - harpoon.ui:toggle_quick_menu(harpoon:list()) -end) - -vim.keymap.set("n", "h", function() - harpoon:list():select(1) -end) -vim.keymap.set("n", "j", function() - harpoon:list():select(2) -end) -vim.keymap.set("n", "k", function() - harpoon:list():select(3) -end) -vim.keymap.set("n", "l", function() - harpoon:list():select(4) -end) - -vim.keymap.set("n", "H", function() - vim.cmd("vsplit") - harpoon:list():select(1) -end) -vim.keymap.set("n", "J", function() - vim.cmd("vsplit") - harpoon:list():select(2) -end) -vim.keymap.set("n", "K", function() - vim.cmd("vsplit") - harpoon:list():select(3) -end) -vim.keymap.set("n", "L", function() - vim.cmd("vsplit") - harpoon:list():select(4) -end) \ No newline at end of file diff --git a/plugin/neo-tree.lua b/plugin/neo-tree.lua index 4509443..672683b 100644 --- a/plugin/neo-tree.lua +++ b/plugin/neo-tree.lua @@ -5,23 +5,10 @@ end vim.pack.add({ "https://github.com/nvim-neo-tree/neo-tree.nvim", - "https://github.com/ThePrimeagen/harpoon", }) local events = require("neo-tree.events") require("neo-tree").setup({ commands = { - add_to_harpoon = function(state) - local node = state.tree:get_node() - local filepath = node:get_id() - local project_root = vim.fn.getcwd() - local relative_filepath = vim.fn.fnamemodify(filepath, ":." .. project_root) - local item = { - value = relative_filepath, - context = { row = 1, col = 0 }, - } - harpoon:list():add(item) - vim.cmd(":do User") - end, copy_path = function(state) local node = state.tree:get_node() local filepath = node:get_id() @@ -59,7 +46,6 @@ require("neo-tree").setup({ position = "right", mappings = { [""] = false, - ["a"] = "add_to_harpoon", ["y"] = "copy_path", ["ff"] = "find_in_folder", [""] = { "scroll_preview", config = { direction = 10 } }, diff --git a/plugin/snacks.lua b/plugin/snacks.lua index de2b6cc..e65e473 100644 --- a/plugin/snacks.lua +++ b/plugin/snacks.lua @@ -15,7 +15,6 @@ local global_keys = { [f.isMac() and "" or ""] = { "qflist", mode = { "n", "i" } }, [""] = { "preview_scroll_down", mode = { "n", "i" } }, [""] = { "preview_scroll_up", mode = { "n", "i" } }, - ["a"] = "add_to_harpoon", } local buffer_keys = { @@ -71,19 +70,6 @@ require("snacks").setup({ win = { height = 0.95, width = 0.95 }, }, picker = { - actions = { - add_to_harpoon = function(picker) - local harpoon = require("harpoon") - local full_path = picker:current() - local cwd_path = picker:cwd() - local item = { - value = full_path.file:gsub("^" .. vim.pesc(cwd_path) .. "/", ""), - context = { row = 1, col = 0 }, - } - harpoon:list():add(item) - vim.api.nvim_exec_autocmds("User", { pattern = "HarpoonRefresh" }) - end, - }, previewers = { git = { builtin = false } }, formatters = { filename = { filename_first = true, truncate = 80 }, From e709d16f1be4ced248c82a9241358304006320ba Mon Sep 17 00:00:00 2001 From: Vicente Date: Tue, 14 Apr 2026 20:11:38 +0200 Subject: [PATCH 31/35] move marks command to marks custom plugin file --- lua/commands.lua | 4 ---- lua/marks.lua | 8 ++++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lua/commands.lua b/lua/commands.lua index cfda12f..8e9e296 100644 --- a/lua/commands.lua +++ b/lua/commands.lua @@ -15,7 +15,3 @@ create_cmd("QuickfixListToggle", function() vim.cmd("copen") end end, { desc = "Toggle quickfix list" }) - -create_cmd("ClearAllMarks", function() - vim.cmd("delmarks A-Z") -end, { desc = "Clear {A-Z} marks" }) diff --git a/lua/marks.lua b/lua/marks.lua index bb2ceec..8ef2fb6 100644 --- a/lua/marks.lua +++ b/lua/marks.lua @@ -158,4 +158,12 @@ function M.open_marks_list() vim.keymap.set("n", "", close, { buffer = buf, nowait = true, silent = true }) end +function M.clear_all_marks() + vim.cmd("delmarks A-Z") +end + +vim.api.nvim_create_user_command("ClearAllMarks", function() + M.clear_all_marks() +end, { desc = "Clear {A-Z} marks" }) + return M From 4cb768c4521fd079eb9cc3097f02dc7270bf93b1 Mon Sep 17 00:00:00 2001 From: Vicente Date: Tue, 14 Apr 2026 20:11:59 +0200 Subject: [PATCH 32/35] removed copilot --- nvim-pack-lock.json | 4 ---- plugin/copilot.lua | 12 ------------ 2 files changed, 16 deletions(-) delete mode 100644 plugin/copilot.lua diff --git a/nvim-pack-lock.json b/nvim-pack-lock.json index b3c40e4..c26856f 100644 --- a/nvim-pack-lock.json +++ b/nvim-pack-lock.json @@ -49,10 +49,6 @@ "rev": "8d82c240f190fc33723d48c308ccc1ed8baad69d", "src": "https://github.com/lewis6991/gitsigns.nvim" }, - "harpoon": { - "rev": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3", - "src": "https://github.com/ThePrimeagen/harpoon" - }, "live-server.nvim": { "rev": "1ee8ab4cbd18e2b2b38236321a73edcaba023fbd", "src": "https://github.com/selimacerbas/live-server.nvim" diff --git a/plugin/copilot.lua b/plugin/copilot.lua deleted file mode 100644 index 1f2bbfd..0000000 --- a/plugin/copilot.lua +++ /dev/null @@ -1,12 +0,0 @@ -local f = require("common.utils") - -if f.isMac() then - vim.pack.add({ "https://github.com/zbirenbaum/copilot.lua" }) - require("copilot").setup({ - copilot_node_command = vim.fn.expand("$VOLTA_HOME") .. "/tools/image/node/22.21.0/bin/node", - suggestion = { - auto_trigger = true, - keymap = { accept = "" }, - }, - }) -end \ No newline at end of file From 0a7f7b1495a7fe2b866b135aa92dd5d44e94c0fd Mon Sep 17 00:00:00 2001 From: Vicente Date: Tue, 5 May 2026 10:49:51 +0200 Subject: [PATCH 33/35] updated deps & removed minimap --- nvim-pack-lock.json | 32 ++++++++++++++------------------ plugin/neominimap.lua | 11 ----------- 2 files changed, 14 insertions(+), 29 deletions(-) delete mode 100644 plugin/neominimap.lua diff --git a/nvim-pack-lock.json b/nvim-pack-lock.json index c26856f..005270b 100644 --- a/nvim-pack-lock.json +++ b/nvim-pack-lock.json @@ -10,11 +10,11 @@ "src": "https://github.com/f-person/auto-dark-mode.nvim" }, "auto-session": { - "rev": "62437532b38495551410b3f377bcf4aaac574ebe", + "rev": "482d2bdd144e73e5060ce728ac46463684cc9d28", "src": "https://github.com/rmagatti/auto-session" }, "barbar.nvim": { - "rev": "539d73def39c9172b4d4d769f14090e08f37b29d", + "rev": "a4bef5b4fc1f064f2f673172252028eae18191c9", "src": "https://github.com/romgrk/barbar.nvim" }, "blink.cmp": { @@ -22,11 +22,11 @@ "src": "https://github.com/saghen/blink.cmp" }, "codediff.nvim": { - "rev": "832f1ecc5f8b15a44cf7537e31d3266d657775b1", + "rev": "8afc229d38dc13ce71b2ffbb860084b2c726e061", "src": "https://github.com/esmuellert/codediff.nvim" }, "conform.nvim": { - "rev": "086a40dc7ed8242c03be9f47fbcee68699cc2395", + "rev": "dca1a190aa85f9065979ef35802fb77131911106", "src": "https://github.com/stevearc/conform.nvim" }, "cutlass.nvim": { @@ -46,23 +46,23 @@ "src": "https://github.com/rafamadriz/friendly-snippets" }, "gitsigns.nvim": { - "rev": "8d82c240f190fc33723d48c308ccc1ed8baad69d", + "rev": "dd3f588bacbeb041be6facf1742e42097f62165d", "src": "https://github.com/lewis6991/gitsigns.nvim" }, "live-server.nvim": { - "rev": "1ee8ab4cbd18e2b2b38236321a73edcaba023fbd", + "rev": "084d69b63610803c18ddd7541294d83ca748d1dc", "src": "https://github.com/selimacerbas/live-server.nvim" }, "lualine.nvim": { - "rev": "a905eeebc4e63fdc48b5135d3bf8aea5618fb21c", + "rev": "131a558e13f9f28b15cd235557150ccb23f89286", "src": "https://github.com/nvim-lualine/lualine.nvim" }, "markdown-preview.nvim": { - "rev": "793b32e327bd51143d7cc345aa3ecd10c357ddee", + "rev": "29234edae5b8b7db5ae05061ff7197f95ef0ffd5", "src": "https://github.com/selimacerbas/markdown-preview.nvim" }, "mason-lspconfig.nvim": { - "rev": "0a3b42c3e503df87aef6d6513e13148381495c3a", + "rev": "0c2823e0418f3d9230ff8b201c976e84de1cb401", "src": "https://github.com/mason-org/mason-lspconfig.nvim" }, "mason-tool-installer.nvim": { @@ -70,7 +70,7 @@ "src": "https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim" }, "mason.nvim": { - "rev": "b03fb0f20bc1d43daf558cda981a2be22e73ac42", + "rev": "cb8445f8ce85d957416c106b780efd51c6298f89", "src": "https://github.com/mason-org/mason.nvim" }, "multicursor.nvim": { @@ -78,13 +78,9 @@ "src": "https://github.com/jake-stewart/multicursor.nvim" }, "neo-tree.nvim": { - "rev": "aa3500f7038a32ed4b0b765cd458b9c429062cac", + "rev": "ff84e6e1608b24773f1b73cd4182e0bcf2b3d637", "src": "https://github.com/nvim-neo-tree/neo-tree.nvim" }, - "neominimap.nvim": { - "rev": "0676085d898019f06044923934e38663f5efa290", - "src": "https://github.com/Isrothy/neominimap.nvim" - }, "nui.nvim": { "rev": "de740991c12411b663994b2860f1a4fd0937c130", "src": "https://github.com/MunifTanjim/nui.nvim" @@ -102,7 +98,7 @@ "src": "https://github.com/kevinhwang91/nvim-hlslens" }, "nvim-lspconfig": { - "rev": "8a9378a822719346a0288fa004dab302ca3c0a8f", + "rev": "31026a13eefb20681124706a79fc1df6bf11ab27", "src": "https://github.com/neovim/nvim-lspconfig" }, "nvim-scrollbar": { @@ -110,7 +106,7 @@ "src": "https://github.com/petertriho/nvim-scrollbar" }, "nvim-surround": { - "rev": "9291040de8cd8a4439eb64c441e8d5d2bf884a5a", + "rev": "2e93e154de9ff326def6480a4358bfc149d5da2c", "src": "https://github.com/kylechui/nvim-surround" }, "nvim-treesitter": { @@ -118,7 +114,7 @@ "src": "https://github.com/nvim-treesitter/nvim-treesitter" }, "nvim-web-devicons": { - "rev": "c72328a5494b4502947a022fe69c0c47e53b6aa6", + "rev": "4fc505ac7bd7692824a142e96e5f529c133862f8", "src": "https://github.com/nvim-tree/nvim-web-devicons" }, "onedarkpro.nvim": { diff --git a/plugin/neominimap.lua b/plugin/neominimap.lua deleted file mode 100644 index 4cac990..0000000 --- a/plugin/neominimap.lua +++ /dev/null @@ -1,11 +0,0 @@ -vim.pack.add({ "https://github.com/Isrothy/neominimap.nvim" }) - -vim.g.neominimap = { - auto_enable = true, - current_line_position = "percent", - float = { window_border = "none" }, -} - -vim.api.nvim_create_user_command("MinimapToggle", function() - vim.cmd("Neominimap Toggle") -end, { desc = "Toggle minimap" }) \ No newline at end of file From 479f1d7148c0eacbd94d2c5c7e8879c38bba737e Mon Sep 17 00:00:00 2001 From: Vicente Date: Wed, 13 May 2026 12:46:43 +0200 Subject: [PATCH 34/35] improve error handling in marks plugin --- lua/marks.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/marks.lua b/lua/marks.lua index 8ef2fb6..3b88f92 100644 --- a/lua/marks.lua +++ b/lua/marks.lua @@ -39,7 +39,11 @@ function M.go_to_global_mark() vim.cmd("normal! `" .. string.upper(char)) end) if not ok then - print(err) + if err:find("E20") then + vim.notify("Mark '" .. string.upper(char) .. "' not set", vim.log.levels.WARN) + else + vim.notify(err, vim.log.levels.ERROR) + end end end From 6ee81f5d8c692947ace92764ca4460befa7e41cd Mon Sep 17 00:00:00 2001 From: Vicente Date: Mon, 18 May 2026 12:00:06 +0200 Subject: [PATCH 35/35] fix navigate hunks in codediff --- plugin/codediff.lua | 28 +++++++++++++++++++++++++--- plugin/gitsigns.lua | 19 ++++++++++++------- 2 files changed, 37 insertions(+), 10 deletions(-) diff --git a/plugin/codediff.lua b/plugin/codediff.lua index 893f45f..dcd525e 100644 --- a/plugin/codediff.lua +++ b/plugin/codediff.lua @@ -2,10 +2,32 @@ vim.pack.add({ "https://github.com/esmuellert/codediff.nvim", "https://github.com/MunifTanjim/nui.nvim", }) -vim.keymap.set("n", "dd", "CodeDiff", { desc = "Code diff" }) +vim.keymap.set("n", "dD", "CodeDiff", { desc = "Code diff" }) +vim.keymap.set("n", "dd", function() + local base + for _, branch in ipairs({ "main", "master" }) do + vim.fn.system("git rev-parse --verify " .. branch .. " 2>/dev/null") + if vim.v.shell_error == 0 then + base = branch + break + end + end + if not base then + vim.notify("No main or master branch found", vim.log.levels.WARN) + return + end + vim.cmd("CodeDiff " .. base .. "...") +end, { desc = "Code diff vs main/master" }) require("codediff").setup({ explorer = { view_mode = "tree" }, keymaps = { - view = { next_file = "", prev_file = "" }, + view = { + next_file = "", + prev_file = "", + next_hunk = "", + prev_hunk = "", + open_in_prev_tab = "e", + close_on_open_in_prev_tab = true, + }, }, -}) \ No newline at end of file +}) diff --git a/plugin/gitsigns.lua b/plugin/gitsigns.lua index 76195af..6a4a233 100644 --- a/plugin/gitsigns.lua +++ b/plugin/gitsigns.lua @@ -13,12 +13,17 @@ local opts = { topdelete = { text = "" }, }, on_attach = function(bufnr) - vim.keymap.set("n", "", function() - gitsigns.nav_hunk("prev") - end, { buffer = bufnr }) - vim.keymap.set("n", "", function() - gitsigns.nav_hunk("next") - end, { buffer = bufnr }) + -- Avoid setting the keymap before codediff to avoid conflict + local ok, lifecycle = pcall(require, "codediff.ui.lifecycle") + local in_codediff = ok and lifecycle.find_tabpage_by_buffer(bufnr) + if not in_codediff then + vim.keymap.set("n", "", function() + gitsigns.nav_hunk("prev") + end, { buffer = bufnr }) + vim.keymap.set("n", "", function() + gitsigns.nav_hunk("next") + end, { buffer = bufnr }) + end vim.keymap.set("n", "gi", gitsigns.preview_hunk) vim.keymap.set("n", "gu", gitsigns.reset_hunk) vim.keymap.set("n", "gs", gitsigns.stage_hunk) @@ -48,4 +53,4 @@ require("scrollbar").setup({ excluded_filetypes = { "neo-tree", "neo-tree-popup", "neominimap" }, }) -require("scrollbar.handlers.gitsigns").setup() \ No newline at end of file +require("scrollbar.handlers.gitsigns").setup()