From 751803f98bf3baaf7db1c1e2ddd28e082396124a Mon Sep 17 00:00:00 2001 From: kezhenxu94 Date: Wed, 18 Dec 2024 20:49:13 +0800 Subject: [PATCH 01/71] feat(colorscheme): add fzf integration to catppuccin (#5175) ## Description ## Related Issue(s) ## Screenshots ## Checklist - [ ] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/colorscheme.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/colorscheme.lua b/lua/lazyvim/plugins/colorscheme.lua index 93a89668..fa611bf4 100644 --- a/lua/lazyvim/plugins/colorscheme.lua +++ b/lua/lazyvim/plugins/colorscheme.lua @@ -19,6 +19,7 @@ return { cmp = true, dashboard = true, flash = true, + fzf = true, grug_far = true, gitsigns = true, headlines = true, From 28d3ee49709978eb350e5c6bfe1f2ce36138c1d3 Mon Sep 17 00:00:00 2001 From: folke Date: Wed, 18 Dec 2024 12:50:24 +0000 Subject: [PATCH 02/71] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 4e391e96..d2aa5d34 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 17 +*LazyVim.txt* For Neovim Last change: 2024 December 18 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 3a79273f3c3bbd22bcdba795b7b8fe6a949db96e Mon Sep 17 00:00:00 2001 From: Uzzal Devkota Date: Thu, 19 Dec 2024 03:13:04 +0545 Subject: [PATCH 03/71] fix(fzf): fzf.lua compatible hidden scrollbar (#5177) ## Description `--no-scrollbar` option is not supported by [fzf-lua](https://github.com/ibhagwan/fzf-lua) The recommended way is to set `winopts.preview.scrollbar=false` ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/fzf.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index c70a6f14..cf11d8ee 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -89,9 +89,6 @@ return { return { "default-title", fzf_colors = true, - fzf_opts = { - ["--no-scrollbar"] = true, - }, defaults = { -- formatter = "path.filename_first", formatter = "path.dirname_first", @@ -115,6 +112,9 @@ return { winopts = { title = " " .. vim.trim((fzf_opts.prompt or "Select"):gsub("%s*:%s*$", "")) .. " ", title_pos = "center", + preview = { + scrollbar = false, + }, }, }, fzf_opts.kind == "codeaction" and { winopts = { From b51279c6d727a09cd3d2bf3c9d0cf829810280bb Mon Sep 17 00:00:00 2001 From: Manuuurino <2855338+manuuurino@users.noreply.github.com> Date: Wed, 18 Dec 2024 22:28:39 +0100 Subject: [PATCH 04/71] fix(codeium): doesnt automatically load when `vim.g.ai_cmp` is set to false (#5182) ## Description I think the title of the PR says it all. Before the user has to manually load/trigger the plugin via the cmd (`:Codeium Auth`) or by requiring. PS: The copilot extra also has this event. ~~PPS: Ive also noticed that supermaven doesnt have this event setup, perhaps it suffers to the same issue when this option is disabled?~~ Edit: For the PPS, have tested supermaven, i can confirm, it loads properly. ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/ai/codeium.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/ai/codeium.lua b/lua/lazyvim/plugins/extras/ai/codeium.lua index d2d29a00..8d37d750 100644 --- a/lua/lazyvim/plugins/extras/ai/codeium.lua +++ b/lua/lazyvim/plugins/extras/ai/codeium.lua @@ -4,6 +4,7 @@ return { { "Exafunction/codeium.nvim", cmd = "Codeium", + event = "InsertEnter", build = ":Codeium Auth", opts = { enable_cmp_source = vim.g.ai_cmp, From c40692c1b0a95492eead8cc093972c634d54043b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 19 Dec 2024 08:29:06 +0100 Subject: [PATCH 05/71] revert: fix(fzf): fzf.lua compatible hidden scrollbar (#5177) This reverts commit 3a79273f3c3bbd22bcdba795b7b8fe6a949db96e. --- lua/lazyvim/plugins/extras/editor/fzf.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index cf11d8ee..c70a6f14 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -89,6 +89,9 @@ return { return { "default-title", fzf_colors = true, + fzf_opts = { + ["--no-scrollbar"] = true, + }, defaults = { -- formatter = "path.filename_first", formatter = "path.dirname_first", @@ -112,9 +115,6 @@ return { winopts = { title = " " .. vim.trim((fzf_opts.prompt or "Select"):gsub("%s*:%s*$", "")) .. " ", title_pos = "center", - preview = { - scrollbar = false, - }, }, }, fzf_opts.kind == "codeaction" and { winopts = { From 2c2aa625464f29ee556c0980dbb3bccae45a1001 Mon Sep 17 00:00:00 2001 From: folke Date: Thu, 19 Dec 2024 07:30:13 +0000 Subject: [PATCH 06/71] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index d2aa5d34..121bf4af 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 18 +*LazyVim.txt* For Neovim Last change: 2024 December 19 ============================================================================== Table of Contents *LazyVim-table-of-contents* From a3a28bf8e43f7239316942c2f2bac6e74b28586b Mon Sep 17 00:00:00 2001 From: Manuuurino <2855338+manuuurino@users.noreply.github.com> Date: Thu, 19 Dec 2024 15:41:11 +0100 Subject: [PATCH 07/71] perf(supermaven): add lazy-loading (#5183) ## Description As title, somehow these events have been forgotten, ive checked the git history of it aswell. ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/ai/supermaven.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/lazyvim/plugins/extras/ai/supermaven.lua b/lua/lazyvim/plugins/extras/ai/supermaven.lua index e491fd85..5d30f49c 100644 --- a/lua/lazyvim/plugins/extras/ai/supermaven.lua +++ b/lua/lazyvim/plugins/extras/ai/supermaven.lua @@ -1,6 +1,11 @@ return { { "supermaven-inc/supermaven-nvim", + event = "InsertEnter", + cmd = { + "SupermavenUseFree", + "SupermavenUsePro", + }, opts = { keymaps = { accept_suggestion = nil, -- handled by nvim-cmp / blink.cmp From 7a16a752ba1fa535bb54d6492fb8df6c72ab8ba0 Mon Sep 17 00:00:00 2001 From: milanglacier Date: Fri, 20 Dec 2024 03:11:44 -0500 Subject: [PATCH 08/71] feat(lualine): add fzf extensions. (#5203) ## Description Similar to #5175, add `fzf` integration with lualine. Note that similar to #5175, integration with `fzf` is included unconditionally. I think we don't need to check if the users choose `fzf` as their default picker to conditionally add the fzf integration with lualine. ## Screenshots **Before**: Screenshot 2024-12-19 at 17 58 30 **After**: Screenshot 2024-12-19 at 17 59 28 --- lua/lazyvim/plugins/ui.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 2bb2c644..c4cb2a7b 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -159,7 +159,7 @@ return { end, }, }, - extensions = { "neo-tree", "lazy" }, + extensions = { "neo-tree", "lazy", "fzf" }, } -- do not add trouble symbols if aerial is enabled From c1ee761dd88ec71fa9c9eb9706828598e7522c5d Mon Sep 17 00:00:00 2001 From: folke Date: Fri, 20 Dec 2024 08:12:41 +0000 Subject: [PATCH 09/71] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 121bf4af..c584bc23 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 19 +*LazyVim.txt* For Neovim Last change: 2024 December 20 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 857f330c2139c328cfce0251b11713dc179d6a81 Mon Sep 17 00:00:00 2001 From: Igor Guerrero Date: Fri, 20 Dec 2024 11:10:45 -0600 Subject: [PATCH 10/71] fix(blink): remove compatibility with 0.7.6 release (#5212) ## Description With the version update 5 mins ago, I got an error with this setting. I'm not sure if removal is the correct way to fix this but it does runs well on my local. - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/blink.lua | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 139bf6c4..81762b8d 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -118,17 +118,6 @@ return { end end - --- NOTE: compat with latest version. Currenlty 0.7.6 - if not vim.g.lazyvim_blink_main then - ---@diagnostic disable-next-line: inject-field - opts.sources.completion = opts.sources.completion or {} - opts.sources.completion.enabled_providers = enabled - if vim.tbl_get(opts, "completion", "menu", "draw", "treesitter") then - ---@diagnostic disable-next-line: assign-type-mismatch - opts.completion.menu.draw.treesitter = true - end - end - -- Unset custom prop to pass blink.cmp validation opts.sources.compat = nil From 86de9c9e443572b0244ee9bbdcf5f10ecaabaf74 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 20 Dec 2024 18:35:22 +0100 Subject: [PATCH 11/71] fix(luasnip): use blink's luasnip source. Closes #5211 --- lua/lazyvim/plugins/extras/coding/luasnip.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/luasnip.lua b/lua/lazyvim/plugins/extras/coding/luasnip.lua index 6b16ba90..352bf659 100644 --- a/lua/lazyvim/plugins/extras/coding/luasnip.lua +++ b/lua/lazyvim/plugins/extras/coding/luasnip.lua @@ -67,12 +67,8 @@ return { { "saghen/blink.cmp", optional = true, - dependencies = { - { "saghen/blink.compat", opts = { impersonate_nvim_cmp = true } }, - { "saadparwaiz1/cmp_luasnip" }, - }, opts = { - sources = { compat = { "luasnip" } }, + sources = { default = { "luasnip" } }, snippets = { expand = function(snippet) require("luasnip").lsp_expand(snippet) From d0c366e4d861b848bdc710696d5311dca2c6d540 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 18:36:49 +0100 Subject: [PATCH 12/71] chore(main): release 14.6.0 (#5176) :robot: I have created a release *beep* *boop* --- ## [14.6.0](https://github.com/LazyVim/LazyVim/compare/v14.5.0...v14.6.0) (2024-12-20) ### Features * **colorscheme:** add fzf integration to catppuccin ([#5175](https://github.com/LazyVim/LazyVim/issues/5175)) ([751803f](https://github.com/LazyVim/LazyVim/commit/751803f98bf3baaf7db1c1e2ddd28e082396124a)) * **lualine:** add fzf extensions. ([#5203](https://github.com/LazyVim/LazyVim/issues/5203)) ([7a16a75](https://github.com/LazyVim/LazyVim/commit/7a16a752ba1fa535bb54d6492fb8df6c72ab8ba0)) ### Bug Fixes * **blink:** remove compatibility with 0.7.6 release ([#5212](https://github.com/LazyVim/LazyVim/issues/5212)) ([857f330](https://github.com/LazyVim/LazyVim/commit/857f330c2139c328cfce0251b11713dc179d6a81)) * **codeium:** doesnt automatically load when `vim.g.ai_cmp` is set to false ([#5182](https://github.com/LazyVim/LazyVim/issues/5182)) ([b51279c](https://github.com/LazyVim/LazyVim/commit/b51279c6d727a09cd3d2bf3c9d0cf829810280bb)) * **fzf:** fzf.lua compatible hidden scrollbar ([#5177](https://github.com/LazyVim/LazyVim/issues/5177)) ([3a79273](https://github.com/LazyVim/LazyVim/commit/3a79273f3c3bbd22bcdba795b7b8fe6a949db96e)) * **luasnip:** use blink's luasnip source. Closes [#5211](https://github.com/LazyVim/LazyVim/issues/5211) ([86de9c9](https://github.com/LazyVim/LazyVim/commit/86de9c9e443572b0244ee9bbdcf5f10ecaabaf74)) ### Performance Improvements * **supermaven:** add lazy-loading ([#5183](https://github.com/LazyVim/LazyVim/issues/5183)) ([a3a28bf](https://github.com/LazyVim/LazyVim/commit/a3a28bf8e43f7239316942c2f2bac6e74b28586b)) ### Reverts * fix(fzf): fzf.lua compatible hidden scrollbar ([#5177](https://github.com/LazyVim/LazyVim/issues/5177)) ([c40692c](https://github.com/LazyVim/LazyVim/commit/c40692c1b0a95492eead8cc093972c634d54043b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 26 ++++++++++++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 1a2b85d2..a1d48029 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.5.0" + ".": "14.6.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index f9ffbf67..429db78c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,31 @@ # Changelog +## [14.6.0](https://github.com/LazyVim/LazyVim/compare/v14.5.0...v14.6.0) (2024-12-20) + + +### Features + +* **colorscheme:** add fzf integration to catppuccin ([#5175](https://github.com/LazyVim/LazyVim/issues/5175)) ([751803f](https://github.com/LazyVim/LazyVim/commit/751803f98bf3baaf7db1c1e2ddd28e082396124a)) +* **lualine:** add fzf extensions. ([#5203](https://github.com/LazyVim/LazyVim/issues/5203)) ([7a16a75](https://github.com/LazyVim/LazyVim/commit/7a16a752ba1fa535bb54d6492fb8df6c72ab8ba0)) + + +### Bug Fixes + +* **blink:** remove compatibility with 0.7.6 release ([#5212](https://github.com/LazyVim/LazyVim/issues/5212)) ([857f330](https://github.com/LazyVim/LazyVim/commit/857f330c2139c328cfce0251b11713dc179d6a81)) +* **codeium:** doesnt automatically load when `vim.g.ai_cmp` is set to false ([#5182](https://github.com/LazyVim/LazyVim/issues/5182)) ([b51279c](https://github.com/LazyVim/LazyVim/commit/b51279c6d727a09cd3d2bf3c9d0cf829810280bb)) +* **fzf:** fzf.lua compatible hidden scrollbar ([#5177](https://github.com/LazyVim/LazyVim/issues/5177)) ([3a79273](https://github.com/LazyVim/LazyVim/commit/3a79273f3c3bbd22bcdba795b7b8fe6a949db96e)) +* **luasnip:** use blink's luasnip source. Closes [#5211](https://github.com/LazyVim/LazyVim/issues/5211) ([86de9c9](https://github.com/LazyVim/LazyVim/commit/86de9c9e443572b0244ee9bbdcf5f10ecaabaf74)) + + +### Performance Improvements + +* **supermaven:** add lazy-loading ([#5183](https://github.com/LazyVim/LazyVim/issues/5183)) ([a3a28bf](https://github.com/LazyVim/LazyVim/commit/a3a28bf8e43f7239316942c2f2bac6e74b28586b)) + + +### Reverts + +* fix(fzf): fzf.lua compatible hidden scrollbar ([#5177](https://github.com/LazyVim/LazyVim/issues/5177)) ([c40692c](https://github.com/LazyVim/LazyVim/commit/c40692c1b0a95492eead8cc093972c634d54043b)) + ## [14.5.0](https://github.com/LazyVim/LazyVim/compare/v14.4.0...v14.5.0) (2024-12-17) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 574e56af..606ed797 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.5.0" -- x-release-please-version +M.version = "14.6.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 4e746d0e5625662e1f121b39f63836b653ed728b Mon Sep 17 00:00:00 2001 From: William Heryanto Date: Mon, 6 Jan 2025 11:52:36 +0700 Subject: [PATCH 13/71] fix(nlua): debugger not responding (#5319) ## Description Reference: https://github.com/jbyuki/one-small-step-for-vimkind/issues/45#issuecomment-2125749906 Fix nlua debug adapter not responding, which for some reason because of `fzf-lua`. ## Related Issue(s) ## Screenshots No screenshot instead I'm providing how to reproduce with assumption `dap.nlua` extra is enabled. Steps: 1. Launch the nlua `:lua require'osv'.launch({port=8086})` 2. Attach from any neovim instance to the debugger 1. Run the debugger - Can do `dc`; or - Can do `:lua require'dap'.continue()` 2. Choose `Attach to running Neovim instance (port = 8086)` 3. Prior to this changes, debugger will got timeout like the following ```text Debug adapter didn't respond. Either the adapter is slow (then wait and ignore this) or there is a problem with your adapter or `nlua` configuration. Check the logs for errors (:help dap.set_log_level) ``` ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/fzf.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index c70a6f14..aa26f6e1 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -45,8 +45,9 @@ return { "ibhagwan/fzf-lua", cmd = "FzfLua", opts = function(_, opts) - local config = require("fzf-lua.config") - local actions = require("fzf-lua.actions") + local fzf = require("fzf-lua") + local config = fzf.config + local actions = fzf.actions -- Quickfix config.defaults.keymap.fzf["ctrl-q"] = "select-all+accept" From c8159b6abff959d1b029c87260edc05e8420a213 Mon Sep 17 00:00:00 2001 From: folke Date: Mon, 6 Jan 2025 04:53:25 +0000 Subject: [PATCH 14/71] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index c584bc23..501d0fdc 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 20 +*LazyVim.txt* For Neovim Last change: 2025 January 06 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 05c3447558fa6eef7ae3c0d3e7ed1c281572274d Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Tue, 7 Jan 2025 13:04:17 +0200 Subject: [PATCH 15/71] fix(luasnip): correctly remove duplicate snippets (#5214) ## Description Remove `snippets` from `opts.sources.default` when Luasnip is enabled to not get duplicate snippets. ## Related Issue(s) Fixes #5210 ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/luasnip.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/luasnip.lua b/lua/lazyvim/plugins/extras/coding/luasnip.lua index 352bf659..54339e3e 100644 --- a/lua/lazyvim/plugins/extras/coding/luasnip.lua +++ b/lua/lazyvim/plugins/extras/coding/luasnip.lua @@ -68,7 +68,6 @@ return { "saghen/blink.cmp", optional = true, opts = { - sources = { default = { "luasnip" } }, snippets = { expand = function(snippet) require("luasnip").lsp_expand(snippet) @@ -85,4 +84,16 @@ return { }, }, }, + + -- Luasnip sources for blink + { + "saghen/blink.cmp", + optional = true, + opts = function(_, opts) + table.insert(opts.sources.default, "luasnip") + opts.sources.default = vim.tbl_filter(function(p) + return p ~= "snippets" + end, opts.sources.default) + end, + }, } From c1319cb7acfa4b9fb15121b5f6178eb4fb2db629 Mon Sep 17 00:00:00 2001 From: folke Date: Tue, 7 Jan 2025 11:05:24 +0000 Subject: [PATCH 16/71] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 501d0fdc..87ede8e0 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 06 +*LazyVim.txt* For Neovim Last change: 2025 January 07 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 8d2d9a9bd965aab0a752f24ec327d2f391a8406b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 8 Jan 2025 07:41:44 +0100 Subject: [PATCH 17/71] fix(blink): added new luasnip preset --- lua/lazyvim/plugins/extras/coding/luasnip.lua | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/luasnip.lua b/lua/lazyvim/plugins/extras/coding/luasnip.lua index 54339e3e..8b3daed7 100644 --- a/lua/lazyvim/plugins/extras/coding/luasnip.lua +++ b/lua/lazyvim/plugins/extras/coding/luasnip.lua @@ -69,31 +69,8 @@ return { optional = true, opts = { snippets = { - expand = function(snippet) - require("luasnip").lsp_expand(snippet) - end, - active = function(filter) - if filter and filter.direction then - return require("luasnip").jumpable(filter.direction) - end - return require("luasnip").in_snippet() - end, - jump = function(direction) - require("luasnip").jump(direction) - end, + preset = "luasnip", }, }, }, - - -- Luasnip sources for blink - { - "saghen/blink.cmp", - optional = true, - opts = function(_, opts) - table.insert(opts.sources.default, "luasnip") - opts.sources.default = vim.tbl_filter(function(p) - return p ~= "snippets" - end, opts.sources.default) - end, - }, } From 41f40b73d94f12cd6aa2d87bfee8808e76e80d5d Mon Sep 17 00:00:00 2001 From: folke Date: Wed, 8 Jan 2025 06:42:41 +0000 Subject: [PATCH 18/71] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 87ede8e0..3d00d26d 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 07 +*LazyVim.txt* For Neovim Last change: 2025 January 08 ============================================================================== Table of Contents *LazyVim-table-of-contents* From d1529f650fdd89cb620258bdeca5ed7b558420c7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2025 14:58:56 +0100 Subject: [PATCH 19/71] chore(main): release 14.6.1 (#5320) :robot: I have created a release *beep* *boop* --- ## [14.6.1](https://github.com/LazyVim/LazyVim/compare/v14.6.0...v14.6.1) (2025-01-08) ### Bug Fixes * **blink:** added new luasnip preset ([8d2d9a9](https://github.com/LazyVim/LazyVim/commit/8d2d9a9bd965aab0a752f24ec327d2f391a8406b)) * **luasnip:** correctly remove duplicate snippets ([#5214](https://github.com/LazyVim/LazyVim/issues/5214)) ([05c3447](https://github.com/LazyVim/LazyVim/commit/05c3447558fa6eef7ae3c0d3e7ed1c281572274d)) * **nlua:** debugger not responding ([#5319](https://github.com/LazyVim/LazyVim/issues/5319)) ([4e746d0](https://github.com/LazyVim/LazyVim/commit/4e746d0e5625662e1f121b39f63836b653ed728b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 9 +++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index a1d48029..114400ff 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.6.0" + ".": "14.6.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 429db78c..2ea4a272 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [14.6.1](https://github.com/LazyVim/LazyVim/compare/v14.6.0...v14.6.1) (2025-01-08) + + +### Bug Fixes + +* **blink:** added new luasnip preset ([8d2d9a9](https://github.com/LazyVim/LazyVim/commit/8d2d9a9bd965aab0a752f24ec327d2f391a8406b)) +* **luasnip:** correctly remove duplicate snippets ([#5214](https://github.com/LazyVim/LazyVim/issues/5214)) ([05c3447](https://github.com/LazyVim/LazyVim/commit/05c3447558fa6eef7ae3c0d3e7ed1c281572274d)) +* **nlua:** debugger not responding ([#5319](https://github.com/LazyVim/LazyVim/issues/5319)) ([4e746d0](https://github.com/LazyVim/LazyVim/commit/4e746d0e5625662e1f121b39f63836b653ed728b)) + ## [14.6.0](https://github.com/LazyVim/LazyVim/compare/v14.5.0...v14.6.0) (2024-12-20) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 606ed797..fbe6b74c 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.6.0" -- x-release-please-version +M.version = "14.6.1" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 13044c298ed1837a2d938b64710528d359dc8407 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 14 Jan 2025 22:54:12 +0100 Subject: [PATCH 20/71] feat(extras): added extra for snacks picker (#5368) ## Description See https://github.com/folke/snacks.nvim/pull/445 NOTE: I'm **not** going to replace `fzf-lua` anytime soon. Learned my lessons with that one :) ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/config/keymaps.lua | 8 +- lua/lazyvim/plugins/editor.lua | 6 + lua/lazyvim/plugins/extras/editor/fzf.lua | 3 + .../plugins/extras/editor/snacks_picker.lua | 127 ++++++++++++++++++ lua/lazyvim/plugins/ui.lua | 3 + lua/lazyvim/util/pick.lua | 6 +- 6 files changed, 147 insertions(+), 6 deletions(-) create mode 100644 lua/lazyvim/plugins/extras/editor/snacks_picker.lua diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index c618578b..48726b02 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -150,12 +150,12 @@ end if vim.fn.executable("lazygit") == 1 then map("n", "gg", function() Snacks.lazygit( { cwd = LazyVim.root.git() }) end, { desc = "Lazygit (Root Dir)" }) map("n", "gG", function() Snacks.lazygit() end, { desc = "Lazygit (cwd)" }) - map("n", "gf", function() Snacks.lazygit.log_file() end, { desc = "Lazygit Current File History" }) - map("n", "gl", function() Snacks.lazygit.log({ cwd = LazyVim.root.git() }) end, { desc = "Lazygit Log" }) - map("n", "gL", function() Snacks.lazygit.log() end, { desc = "Lazygit Log (cwd)" }) + map("n", "gf", function() Snacks.picker.git_log_file() end, { desc = "Git Current File History" }) + map("n", "gl", function() Snacks.picker.git_log({ cwd = LazyVim.root.git() }) end, { desc = "Git Log" }) + map("n", "gL", function() Snacks.picker.git_log() end, { desc = "Git Log (cwd)" }) end -map("n", "gb", function() Snacks.git.blame_line() end, { desc = "Git Blame Line" }) +map("n", "gb", function() Snacks.picker.git_log_line() end, { desc = "Git Blame Line" }) map({ "n", "x" }, "gB", function() Snacks.gitbrowse() end, { desc = "Git Browse (open)" }) map({"n", "x" }, "gY", function() Snacks.gitbrowse({ open = function(url) vim.fn.setreg("+", url) end, notify = false }) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index f6a98605..95a1f7b9 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -397,4 +397,10 @@ return { return LazyVim.pick.want() == "telescope" end, }, + { + import = "lazyvim.plugins.extras.editor.snacks_picker", + enabled = function() + return LazyVim.pick.want() == "snacks" + end, + }, } diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index aa26f6e1..d4cd4093 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -286,6 +286,9 @@ return { { "neovim/nvim-lspconfig", opts = function() + if LazyVim.pick.want() ~= "fzf" then + return + end local Keys = require("lazyvim.plugins.lsp.keymaps").get() -- stylua: ignore vim.list_extend(Keys, { diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua new file mode 100644 index 00000000..c64775c2 --- /dev/null +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -0,0 +1,127 @@ +if lazyvim_docs then + -- In case you don't want to use `:LazyExtras`, + -- then you need to set the option below. + vim.g.lazyvim_picker = "snacks" +end + +---@module 'snacks' + +---@type LazyPicker +local picker = { + name = "snacks", + commands = { + files = "files", + live_grep = "grep", + oldfiles = "recent", + }, + + ---@param source string + ---@param opts? snacks.picker.Config + open = function(source, opts) + return Snacks.picker.pick(source, opts) + end, +} +if not LazyVim.pick.register(picker) then + return {} +end + +return { + desc = "Fast and modern file picker", + -- recommended = true, + { + "folke/snacks.nvim", + opts = { + picker = {}, + }, + -- stylua: ignore + keys = { + { ",", function() Snacks.picker.buffers() end, desc = "Buffers" }, + { "/", LazyVim.pick("grep"), desc = "Grep (Root Dir)" }, + { ":", function() Snacks.picker.command_history() end, desc = "Command History" }, + { "", LazyVim.pick("files"), desc = "Find Files (Root Dir)" }, + -- find + { "fb", function() Snacks.picker.buffers() end, desc = "Buffers" }, + { "fc", LazyVim.pick.config_files(), desc = "Find Config File" }, + { "ff", LazyVim.pick("files"), desc = "Find Files (Root Dir)" }, + { "fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" }, + { "fg", function() Snacks.picker.git_files() end, desc = "Find Files (git-files)" }, + { "fr", LazyVim.pick("oldfiles"), desc = "Recent" }, + { "fR", LazyVim.pick("oldfiles", { only_cwd = true }), desc = "Recent (cwd)" }, + -- git + { "gc", function() Snacks.picker.git_log() end, desc = "Git Log" }, + { "gs", function() Snacks.picker.git_status() end, desc = "Git Status" }, + -- Grep + { "sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" }, + { "sB", function() Snacks.picker.grep_buffers() end, desc = "Grep Open Buffers" }, + { "sg", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" }, + { "sG", LazyVim.pick("live_grep", { root = false }), desc = "Grep (cwd)" }, + { "sw", LazyVim.pick("grep_word"), desc = "Visual selection or word (Root Dir)", mode = { "n", "x" } }, + { "sW", LazyVim.pick("grep_word", { root = false }), desc = "Visual selection or word (cwd)", mode = { "n", "x" } }, + -- search + { 's"', function() Snacks.picker.registers() end, desc = "Registers" }, + { "sa", function() Snacks.picker.autocmds() end, desc = "Autocmds" }, + { "sc", function() Snacks.picker.command_history() end, desc = "Command History" }, + { "sC", function() Snacks.picker.commands() end, desc = "Commands" }, + { "sd", function() Snacks.picker.diagnostics() end, desc = "Diagnostics" }, + { "sh", function() Snacks.picker.help() end, desc = "Help Pages" }, + { "sH", function() Snacks.picker.highlights() end, desc = "Highlights" }, + { "sj", function() Snacks.picker.jumps() end, desc = "Jumps" }, + { "sk", function() Snacks.picker.keymaps() end, desc = "Keymaps" }, + { "sl", function() Snacks.picker.loclist() end, desc = "Location List" }, + { "sM", function() Snacks.picker.man() end, desc = "Man Pages" }, + { "sm", function() Snacks.picker.marks() end, desc = "Marks" }, + { "sR", function() Snacks.picker.resume() end, desc = "Resume" }, + { "sq", function() Snacks.picker.qflist() end, desc = "Quickfix List" }, + { "uC", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" }, + { "qp", function() Snacks.picker.projects() end, desc = "Projects" }, + }, + }, + { + "folke/snacks.nvim", + opts = function(_, opts) + if LazyVim.has("trouble.nvim") then + return vim.tbl_deep_extend("force", opts or {}, { + picker = { + actions = require("trouble.sources.snacks").actions, + win = { + input = { + keys = { + [""] = { + "trouble_open", + mode = { "n", "i" }, + }, + }, + }, + }, + }, + }) + end + end, + }, + { + "neovim/nvim-lspconfig", + opts = function() + if LazyVim.pick.want() ~= "snacks" then + return + end + local Keys = require("lazyvim.plugins.lsp.keymaps").get() + -- stylua: ignore + vim.list_extend(Keys, { + { "gd", function() Snacks.picker.lsp_definitions() end, desc = "Goto Definition", has = "definition" }, + { "gr", function() Snacks.picker.lsp_references() end, nowait = true, desc = "References" }, + { "gI", function() Snacks.picker.lsp_implementations() end, desc = "Goto Implementation" }, + { "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" }, + { "ss", function() Snacks.picker.lsp_symbols() end, desc = "LSP Symbols", has = "documentSymbol" }, + }) + end, + }, + { + "folke/todo-comments.nvim", + optional = true, + -- stylua: ignore + keys = { + { "st", function() Snacks.picker.todo_comments() end, desc = "Todo" }, + { "sT", function () Snacks.picker.todo_comments({ keywords = { "TODO", "FIX", "FIXME" } }) end, desc = "Todo/Fix/Fixme" }, + }, + }, +} diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index c4cb2a7b..d556d1f1 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -288,6 +288,9 @@ return { opts = { dashboard = { preset = { + pick = function(cmd, opts) + return LazyVim.pick(cmd, opts)() + end, header = [[ ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z diff --git a/lua/lazyvim/util/pick.lua b/lua/lazyvim/util/pick.lua index 526025a3..2736d7a5 100644 --- a/lua/lazyvim/util/pick.lua +++ b/lua/lazyvim/util/pick.lua @@ -42,11 +42,13 @@ function M.register(picker) return true end ----@return "telescope" | "fzf" +---@return "telescope" | "fzf" | "snacks" function M.want() vim.g.lazyvim_picker = vim.g.lazyvim_picker or "auto" if vim.g.lazyvim_picker == "auto" then - return LazyVim.has_extra("editor.telescope") and "telescope" or "fzf" + return LazyVim.has_extra("editor.snacks_picker") and "snacks" + or LazyVim.has_extra("editor.telescope") and "telescope" + or "fzf" end return vim.g.lazyvim_picker end From 52dae02c436e03de721d73b81b671624f9414b8c Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Tue, 14 Jan 2025 21:55:09 +0000 Subject: [PATCH 21/71] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 3d00d26d..1ec65752 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 08 +*LazyVim.txt* For Neovim Last change: 2025 January 14 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 3660c52017462dfc472ff436261100a98ebea34d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 23:44:06 +0100 Subject: [PATCH 22/71] chore(main): release 14.7.0 (#5398) :robot: I have created a release *beep* *boop* --- ## [14.7.0](https://github.com/LazyVim/LazyVim/compare/v14.6.1...v14.7.0) (2025-01-14) ### Features * **extras:** added extra for snacks picker ([#5368](https://github.com/LazyVim/LazyVim/issues/5368)) ([13044c2](https://github.com/LazyVim/LazyVim/commit/13044c298ed1837a2d938b64710528d359dc8407)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 114400ff..7a337949 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.6.1" + ".": "14.7.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ea4a272..f48b40b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [14.7.0](https://github.com/LazyVim/LazyVim/compare/v14.6.1...v14.7.0) (2025-01-14) + + +### Features + +* **extras:** added extra for snacks picker ([#5368](https://github.com/LazyVim/LazyVim/issues/5368)) ([13044c2](https://github.com/LazyVim/LazyVim/commit/13044c298ed1837a2d938b64710528d359dc8407)) + ## [14.6.1](https://github.com/LazyVim/LazyVim/compare/v14.6.0...v14.6.1) (2025-01-08) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index fbe6b74c..102ace9d 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.6.1" -- x-release-please-version +M.version = "14.7.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 8307b0fe506a38417f3b7835e2c4b43d9a970946 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Wed, 15 Jan 2025 20:53:56 +0200 Subject: [PATCH 23/71] fix(snacks.picker): fix mapping for `Recent (cwd)` (#5407) ## Description The mapping `fR` was showing all recent files instead of the ones in the `cwd` only. ## Related Issue(s) None ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index c64775c2..522c4ce5 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -46,7 +46,7 @@ return { { "fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" }, { "fg", function() Snacks.picker.git_files() end, desc = "Find Files (git-files)" }, { "fr", LazyVim.pick("oldfiles"), desc = "Recent" }, - { "fR", LazyVim.pick("oldfiles", { only_cwd = true }), desc = "Recent (cwd)" }, + { "fR", LazyVim.pick("oldfiles", { filter = { cwd = true }}), desc = "Recent (cwd)" }, -- git { "gc", function() Snacks.picker.git_log() end, desc = "Git Log" }, { "gs", function() Snacks.picker.git_status() end, desc = "Git Status" }, From 6aefa8ec3ea1918957dd7c30de4c8db18a34e0b4 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Wed, 15 Jan 2025 18:54:50 +0000 Subject: [PATCH 24/71] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 1ec65752..c5ca33d7 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 14 +*LazyVim.txt* For Neovim Last change: 2025 January 15 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 62cb4a465c490c7d41f7a3bf52fb0e222f2cf83b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 16 Jan 2025 09:58:28 +0100 Subject: [PATCH 25/71] feat(snacks): added git diff keymap to pick hunks with leader-gd --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 522c4ce5..4036a4f0 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -49,6 +49,7 @@ return { { "fR", LazyVim.pick("oldfiles", { filter = { cwd = true }}), desc = "Recent (cwd)" }, -- git { "gc", function() Snacks.picker.git_log() end, desc = "Git Log" }, + { "gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (hunks)" }, { "gs", function() Snacks.picker.git_status() end, desc = "Git Status" }, -- Grep { "sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" }, From 915aab99ef950ae4a7d8b3f967de3412f366bfd9 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Thu, 16 Jan 2025 08:59:38 +0000 Subject: [PATCH 26/71] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index c5ca33d7..0e78cf3d 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 15 +*LazyVim.txt* For Neovim Last change: 2025 January 16 ============================================================================== Table of Contents *LazyVim-table-of-contents* From b19f2070b847a3067436f4d16a0cc5b84a9f9819 Mon Sep 17 00:00:00 2001 From: Yusuf Aktepe Date: Thu, 16 Jan 2025 12:01:30 +0300 Subject: [PATCH 27/71] feat(dial): add checkbox augend for markdown (#5411) ## Description Added support for markdown checkboxes. ( **[ ]** <-> **[x]** ) ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/dial.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/lazyvim/plugins/extras/editor/dial.lua b/lua/lazyvim/plugins/extras/editor/dial.lua index a9f7bb26..602b747c 100644 --- a/lua/lazyvim/plugins/extras/editor/dial.lua +++ b/lua/lazyvim/plugins/extras/editor/dial.lua @@ -140,6 +140,11 @@ return { }), }, markdown = { + augend.constant.new({ + elements = { "[ ]", "[x]" }, + word = false, + cyclic = true, + }), augend.misc.alias.markdown_header, }, json = { From 4f31bfab86402c819e5ea1e18b3c5d139628c864 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 16 Jan 2025 10:05:30 +0100 Subject: [PATCH 28/71] fix(markdown): disable checkbox rendering since it's annoying to edit --- lua/lazyvim/plugins/extras/lang/markdown.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/markdown.lua b/lua/lazyvim/plugins/extras/lang/markdown.lua index e7977cb5..a73fe114 100644 --- a/lua/lazyvim/plugins/extras/lang/markdown.lua +++ b/lua/lazyvim/plugins/extras/lang/markdown.lua @@ -104,6 +104,9 @@ return { sign = false, icons = {}, }, + checkbox = { + enabled = false, + }, }, ft = { "markdown", "norg", "rmd", "org" }, config = function(_, opts) From df7426eefa79d5dfa2fcbe2f381abfb2cca70bad Mon Sep 17 00:00:00 2001 From: Riri Date: Thu, 16 Jan 2025 18:37:59 +0800 Subject: [PATCH 29/71] fix(snacks.picker): respect lazyvim.config.kind_filter (#5415) ## Description Currently, snacks.picker does not filter symbols based on the kind_filter configured in lazyvim. This PR addresses that issue. ## Screenshots nil ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. Co-authored-by: ding.zhao --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 4036a4f0..601fcf1b 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -112,7 +112,7 @@ return { { "gr", function() Snacks.picker.lsp_references() end, nowait = true, desc = "References" }, { "gI", function() Snacks.picker.lsp_implementations() end, desc = "Goto Implementation" }, { "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" }, - { "ss", function() Snacks.picker.lsp_symbols() end, desc = "LSP Symbols", has = "documentSymbol" }, + { "ss", function() Snacks.picker.lsp_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Symbols", has = "documentSymbol" }, }) end, }, From b729e653182abab3089903baf62a8d5b65bfe36d Mon Sep 17 00:00:00 2001 From: Jorge Villalobos Date: Fri, 17 Jan 2025 04:00:30 -0500 Subject: [PATCH 30/71] refactor(blink): color swatch icon upstreamed (#5141) ## Description I've upstreamed the block char vs. icon replacement for Tailwind colors so we shouldn't need this here anymore. I've replaced it by extending the default blink icons instead, just in case they introduce an icon which isn't yet covered by Lazy's, it would still show up (unlikely, but better, no?). ## Related Issue(s) none ## Screenshots none ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/blink.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 81762b8d..45e393e1 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -158,9 +158,7 @@ return { "saghen/blink.cmp", opts = function(_, opts) opts.appearance = opts.appearance or {} - opts.appearance.kind_icons = vim.tbl_extend("keep", { - Color = "██", -- Use block instead of icon for color items to make swatches more usable - }, LazyVim.config.icons.kinds) + opts.appearance.kind_icons = vim.tbl_extend("force", opts.appearance.kind_icons or {}, LazyVim.config.icons.kinds) end, }, From b574f01af7ab5eaccdef16db60c1fdd94e8ff12d Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Fri, 17 Jan 2025 09:01:25 +0000 Subject: [PATCH 31/71] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 0e78cf3d..e076c4bf 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 16 +*LazyVim.txt* For Neovim Last change: 2025 January 17 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 970d1a05da37554aa17b671c869431a7b387d8be Mon Sep 17 00:00:00 2001 From: Imron Gamidli <36050790+gogamid@users.noreply.github.com> Date: Sat, 18 Jan 2025 14:52:25 +0100 Subject: [PATCH 32/71] feat(chezmoi): add snacks picker integration for chezmoi files (#5429) ## Description We have a new picker Snacks picker, it means telescope and fzf-lua can be uninstalled. But chezmoi files still listed only with telescope and fzf-lua. In this pr we add snacks.picker integration if the user has chosen snacks.picker in the LazyVimExtras. --- lua/lazyvim/plugins/extras/util/chezmoi.lua | 32 +++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/lua/lazyvim/plugins/extras/util/chezmoi.lua b/lua/lazyvim/plugins/extras/util/chezmoi.lua index 633f3008..cffa6749 100644 --- a/lua/lazyvim/plugins/extras/util/chezmoi.lua +++ b/lua/lazyvim/plugins/extras/util/chezmoi.lua @@ -19,6 +19,38 @@ local pick_chezmoi = function() }, } fzf_lua.fzf_exec(results, opts) + elseif LazyVim.pick.picker.name == "snacks" then + local results = require("chezmoi.commands").list({ + args = { + "--path-style", + "absolute", + "--include", + "files", + "--exclude", + "externals", + }, + }) + local items = {} + + for _, czFile in ipairs(results) do + table.insert(items, { + text = czFile, + file = czFile, + }) + end + + ---@type snacks.picker.Config + local opts = { + items = items, + confirm = function(picker, item) + picker:close() + require("chezmoi.commands").edit({ + targets = { item.text }, + args = { "--watch" }, + }) + end, + } + Snacks.picker.pick(opts) end end From 4e8d75144de92e62eb58c87f61938118d3b1e37c Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Sat, 18 Jan 2025 13:53:19 +0000 Subject: [PATCH 33/71] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index e076c4bf..d40afbc0 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 17 +*LazyVim.txt* For Neovim Last change: 2025 January 18 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 8787ec1227e10123ad7291cf916020d9a8626525 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 19 Jan 2025 18:33:47 +0100 Subject: [PATCH 34/71] feat(snacks.picker): added leader-sS to search lsp workspace symbols --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 601fcf1b..bd4d7677 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -113,6 +113,7 @@ return { { "gI", function() Snacks.picker.lsp_implementations() end, desc = "Goto Implementation" }, { "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" }, { "ss", function() Snacks.picker.lsp_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Symbols", has = "documentSymbol" }, + { "sS", function() Snacks.picker.lsp_workspace_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Workspace Symbols", has = "workspace/symbols" }, }) end, }, From 8f58fe0b62ddd3ed23816ca7ae3b6d369a565dc5 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Sun, 19 Jan 2025 17:34:47 +0000 Subject: [PATCH 35/71] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index d40afbc0..bd9b385d 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 18 +*LazyVim.txt* For Neovim Last change: 2025 January 19 ============================================================================== Table of Contents *LazyVim-table-of-contents* From eb7b453b48ab7e3008013e0edf2822f622111e97 Mon Sep 17 00:00:00 2001 From: Daniel Chong Date: Mon, 20 Jan 2025 23:55:51 +1300 Subject: [PATCH 36/71] fix(snacks.picker): fix mapping for Projects for consistency (#5433) ## Description `fp` is the mapping for Telescope and fzf for [Projects](https://www.lazyvim.org/extras/util/project). This PR makes this shortcut consistent for snacks picker. ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index bd4d7677..e286dff3 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -74,7 +74,7 @@ return { { "sR", function() Snacks.picker.resume() end, desc = "Resume" }, { "sq", function() Snacks.picker.qflist() end, desc = "Quickfix List" }, { "uC", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" }, - { "qp", function() Snacks.picker.projects() end, desc = "Projects" }, + { "fp", function() Snacks.picker.projects() end, desc = "Projects" }, }, }, { From 0e5d17537a433b0e8dc6d5e88eb4df4e69dbefc2 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Mon, 20 Jan 2025 10:56:42 +0000 Subject: [PATCH 37/71] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index bd9b385d..23f8a322 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 19 +*LazyVim.txt* For Neovim Last change: 2025 January 20 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 66c3577bc779d31a7c2addd47de7cc6d215795ba Mon Sep 17 00:00:00 2001 From: Junyi Liu Date: Mon, 20 Jan 2025 07:16:14 -0500 Subject: [PATCH 38/71] perf(java): setting opts.dap_main to false to disable main class scan (#5391) ## Description For large Java project, calling `require("jdtls.dap").setup_dap_main_class_configs(opts.dap_main)` has a huge performance impact on the LSP. I tested on a Java project with 3.7K java source files and 12K other files, a simple go_definition can take about 20-30 seconds. This change allow user to set the `opts.dap_main` to false so we can skip the main class scan. By using the `.lazy.lua` project specific setting, we can easily customize this option per project. ## Related Issue(s) #5387 ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/java.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index 520776fe..236c86c9 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -130,6 +130,7 @@ return { -- These depend on nvim-dap, but can additionally be disabled by setting false here. dap = { hotcodereplace = "auto", config_overrides = {} }, + -- Can set this to false to disable main class scan, which is a performance killer for large project dap_main = {}, test = true, settings = { @@ -246,7 +247,9 @@ return { if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then -- custom init for Java debugger require("jdtls").setup_dap(opts.dap) - require("jdtls.dap").setup_dap_main_class_configs(opts.dap_main) + if opts.dap_main then + require("jdtls.dap").setup_dap_main_class_configs(opts.dap_main) + end -- Java Test require Java debugger to work if opts.test and mason_registry.is_installed("java-test") then From 2bea40c447b72e54ffb2d5cddc98d7798990796f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 13:50:28 +0100 Subject: [PATCH 39/71] chore(main): release 14.8.0 (#5409) :robot: I have created a release *beep* *boop* --- ## [14.8.0](https://github.com/LazyVim/LazyVim/compare/v14.7.0...v14.8.0) (2025-01-20) ### Features * **chezmoi:** add snacks picker integration for chezmoi files ([#5429](https://github.com/LazyVim/LazyVim/issues/5429)) ([970d1a0](https://github.com/LazyVim/LazyVim/commit/970d1a05da37554aa17b671c869431a7b387d8be)) * **dial:** add checkbox augend for markdown ([#5411](https://github.com/LazyVim/LazyVim/issues/5411)) ([b19f207](https://github.com/LazyVim/LazyVim/commit/b19f2070b847a3067436f4d16a0cc5b84a9f9819)) * **snacks.picker:** added leader-sS to search lsp workspace symbols ([8787ec1](https://github.com/LazyVim/LazyVim/commit/8787ec1227e10123ad7291cf916020d9a8626525)) * **snacks:** added git diff keymap to pick hunks with leader-gd ([62cb4a4](https://github.com/LazyVim/LazyVim/commit/62cb4a465c490c7d41f7a3bf52fb0e222f2cf83b)) ### Bug Fixes * **markdown:** disable checkbox rendering since it's annoying to edit ([4f31bfa](https://github.com/LazyVim/LazyVim/commit/4f31bfab86402c819e5ea1e18b3c5d139628c864)) * **snacks.picker:** fix mapping for `Recent (cwd)` ([#5407](https://github.com/LazyVim/LazyVim/issues/5407)) ([8307b0f](https://github.com/LazyVim/LazyVim/commit/8307b0fe506a38417f3b7835e2c4b43d9a970946)) * **snacks.picker:** fix mapping for Projects for consistency ([#5433](https://github.com/LazyVim/LazyVim/issues/5433)) ([eb7b453](https://github.com/LazyVim/LazyVim/commit/eb7b453b48ab7e3008013e0edf2822f622111e97)) * **snacks.picker:** respect lazyvim.config.kind_filter ([#5415](https://github.com/LazyVim/LazyVim/issues/5415)) ([df7426e](https://github.com/LazyVim/LazyVim/commit/df7426eefa79d5dfa2fcbe2f381abfb2cca70bad)) ### Performance Improvements * **java:** setting opts.dap_main to false to disable main class scan ([#5391](https://github.com/LazyVim/LazyVim/issues/5391)) ([66c3577](https://github.com/LazyVim/LazyVim/commit/66c3577bc779d31a7c2addd47de7cc6d215795ba)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 23 +++++++++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 7a337949..b3c4f00b 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.7.0" + ".": "14.8.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index f48b40b9..1057fb57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # Changelog +## [14.8.0](https://github.com/LazyVim/LazyVim/compare/v14.7.0...v14.8.0) (2025-01-20) + + +### Features + +* **chezmoi:** add snacks picker integration for chezmoi files ([#5429](https://github.com/LazyVim/LazyVim/issues/5429)) ([970d1a0](https://github.com/LazyVim/LazyVim/commit/970d1a05da37554aa17b671c869431a7b387d8be)) +* **dial:** add checkbox augend for markdown ([#5411](https://github.com/LazyVim/LazyVim/issues/5411)) ([b19f207](https://github.com/LazyVim/LazyVim/commit/b19f2070b847a3067436f4d16a0cc5b84a9f9819)) +* **snacks.picker:** added leader-sS to search lsp workspace symbols ([8787ec1](https://github.com/LazyVim/LazyVim/commit/8787ec1227e10123ad7291cf916020d9a8626525)) +* **snacks:** added git diff keymap to pick hunks with leader-gd ([62cb4a4](https://github.com/LazyVim/LazyVim/commit/62cb4a465c490c7d41f7a3bf52fb0e222f2cf83b)) + + +### Bug Fixes + +* **markdown:** disable checkbox rendering since it's annoying to edit ([4f31bfa](https://github.com/LazyVim/LazyVim/commit/4f31bfab86402c819e5ea1e18b3c5d139628c864)) +* **snacks.picker:** fix mapping for `Recent (cwd)` ([#5407](https://github.com/LazyVim/LazyVim/issues/5407)) ([8307b0f](https://github.com/LazyVim/LazyVim/commit/8307b0fe506a38417f3b7835e2c4b43d9a970946)) +* **snacks.picker:** fix mapping for Projects for consistency ([#5433](https://github.com/LazyVim/LazyVim/issues/5433)) ([eb7b453](https://github.com/LazyVim/LazyVim/commit/eb7b453b48ab7e3008013e0edf2822f622111e97)) +* **snacks.picker:** respect lazyvim.config.kind_filter ([#5415](https://github.com/LazyVim/LazyVim/issues/5415)) ([df7426e](https://github.com/LazyVim/LazyVim/commit/df7426eefa79d5dfa2fcbe2f381abfb2cca70bad)) + + +### Performance Improvements + +* **java:** setting opts.dap_main to false to disable main class scan ([#5391](https://github.com/LazyVim/LazyVim/issues/5391)) ([66c3577](https://github.com/LazyVim/LazyVim/commit/66c3577bc779d31a7c2addd47de7cc6d215795ba)) + ## [14.7.0](https://github.com/LazyVim/LazyVim/compare/v14.6.1...v14.7.0) (2025-01-14) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 102ace9d..8a0b2ced 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.7.0" -- x-release-please-version +M.version = "14.8.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From dc8512fce1ec1cd4b0ca52d1077b2ed3894d51c8 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 20 Jan 2025 20:21:01 +0100 Subject: [PATCH 40/71] fix(root): pass args to root.get --- lua/lazyvim/util/root.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/util/root.lua b/lua/lazyvim/util/root.lua index b723b227..fc6d6d7d 100644 --- a/lua/lazyvim/util/root.lua +++ b/lua/lazyvim/util/root.lua @@ -1,8 +1,8 @@ ---@class lazyvim.util.root ---@overload fun(): string local M = setmetatable({}, { - __call = function(m) - return m.get() + __call = function(m, ...) + return m.get(...) end, }) From 6be7c4fee4fb755ff07f7bcc13eac96e1d8c279a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 20 Jan 2025 20:21:23 +0100 Subject: [PATCH 41/71] feat(snacks.picker): added alt-c to toggle between cwd/root dir --- .../plugins/extras/editor/snacks_picker.lua | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index e286dff3..2b623179 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -27,11 +27,32 @@ end return { desc = "Fast and modern file picker", - -- recommended = true, + recommended = true, { "folke/snacks.nvim", opts = { - picker = {}, + picker = { + win = { + input = { + keys = { + [""] = { + "toggle_cwd", + mode = { "n", "i" }, + }, + }, + }, + }, + actions = { + ---@param p snacks.Picker + toggle_cwd = function(p) + local root = LazyVim.root({ buf = p.input.filter.current_buf, normalize = true }) + local cwd = vim.fs.normalize((vim.uv or vim.loop).cwd() or ".") + local current = p:cwd() + p:set_cwd(current == root and cwd or root) + p:find() + end, + }, + }, }, -- stylua: ignore keys = { From c7a7ab51129692927ae47f4e57ce22d10d48467e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 20 Jan 2025 20:30:39 +0100 Subject: [PATCH 42/71] fix(vscode): diabled some snacks plugins. Fixes #5364 --- lua/lazyvim/plugins/extras/vscode.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/vscode.lua b/lua/lazyvim/plugins/extras/vscode.lua index b9b1e0b1..5115a2b4 100644 --- a/lua/lazyvim/plugins/extras/vscode.lua +++ b/lua/lazyvim/plugins/extras/vscode.lua @@ -57,9 +57,14 @@ return { { "snacks.nvim", opts = { + bigfile = { enabled = false }, + dashboard = { enabled = false }, indent = { enabled = false }, - scroll = { enabled = false }, + input = { enabled = false }, notifier = { enabled = false }, + picker = { enabled = false }, + quickfile = { enabled = false }, + scroll = { enabled = false }, statuscolumn = { enabled = false }, }, }, From 1e83b4f843f88678189df81b1c88a400c53abdbc Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 20 Jan 2025 20:32:17 +0100 Subject: [PATCH 43/71] fix(sql): better nvim-cmp check. Closes #5188 --- lua/lazyvim/plugins/extras/lang/sql.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/sql.lua b/lua/lazyvim/plugins/extras/lang/sql.lua index 075182d6..83de5ee1 100644 --- a/lua/lazyvim/plugins/extras/lang/sql.lua +++ b/lua/lazyvim/plugins/extras/lang/sql.lua @@ -48,7 +48,7 @@ return { vim.api.nvim_create_autocmd("FileType", { pattern = sql_ft, callback = function() - if LazyVim.has("nvim-cmp") then + if LazyVim.cmp_engine() == "nvim-cmp" then local cmp = require("cmp") -- global sources From 8b4e6ff70d682cad3b1f4999623c3f0ac639fa82 Mon Sep 17 00:00:00 2001 From: abeldekat <58370433+abeldekat@users.noreply.github.com> Date: Thu, 23 Jan 2025 11:03:36 +0000 Subject: [PATCH 44/71] feat(snippets): an extra for mini.snippets (#5274) ## Description Mini.snippets, a plugin to manage and expand snippets, is currently in [beta](https://github.com/echasnovski/mini.nvim/issues/1428). I think the plugin is a very interesting alternative to `luasnip`. The following `lazydoc` will be added: ```lua if lazyvim_docs then -- Set to `false` to prevent "non-lsp snippets"" from appearing inside completion windows -- Motivation: Less clutter in completion windows and a more direct usage of snippits vim.g.lazyvim_mini_snippets_in_completion = true -- Using default mini.snippets, completion suggestions might appear directly after inserting a snippet -- This extra prevents that from happening. -- Motivation: A better display of the current snippet. -- Also, those completions do not appear when using luasnip or native snippets -- -- Set to `false` to enable completion suggestions directly after inserting a snippet vim.g.lazyvim_mini_snippets_override_expand_insert = true -- NOTE: Please also read: -- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-snippets.md#expand -- :h MiniSnippets-session -- Example override for your own config: --[[ return { { "echasnovski/mini.snippets", opts = function(_, opts) -- By default, for opts.snippets, the extra for mini.snippets only adds gen_loader.from_lang() -- This provides a sensible quickstart, integrating with friendly-snippets -- and your own language-specific snippets -- -- In order to change opts.snippets, replace the entire table inside your own opts local snippets, config_path = require("mini.snippets"), vim.fn.stdpath("config") opts.snippets = { -- override opts.snippets provided by extra... -- Load custom file with global snippets first (order matters) snippets.gen_loader.from_file(config_path .. "/snippets/global.json"), -- Load snippets based on current language by reading files from -- "snippets/" subdirectories from 'runtimepath' directories. snippets.gen_loader.from_lang(), -- this is the default in the extra... } end, }, } --]] end ``` It's possible to use the code from this PR directly in your own configuration: 1. Copy the code to lua/extras/coding/mini_snippets.lua in your config folder 2. Restart nvim and enable the "user" extra for `mini.snippets` 3. Restart nvim ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --------- Co-authored-by: abeldekat --- .../plugins/extras/coding/mini-snippets.lua | 167 ++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/coding/mini-snippets.lua diff --git a/lua/lazyvim/plugins/extras/coding/mini-snippets.lua b/lua/lazyvim/plugins/extras/coding/mini-snippets.lua new file mode 100644 index 00000000..f68af110 --- /dev/null +++ b/lua/lazyvim/plugins/extras/coding/mini-snippets.lua @@ -0,0 +1,167 @@ +if lazyvim_docs then + -- Set to `false` to prevent "non-lsp snippets"" from appearing inside completion windows + -- Motivation: Less clutter in completion windows and a more direct usage of snippits + vim.g.lazyvim_mini_snippets_in_completion = true + + -- NOTE: Please also read: + -- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-snippets.md#expand + -- :h MiniSnippets-session + + -- Example override for your own config: + --[[ + return { + { + "echasnovski/mini.snippets", + opts = function(_, opts) + -- By default, for opts.snippets, the extra for mini.snippets only adds gen_loader.from_lang() + -- This provides a sensible quickstart, integrating with friendly-snippets + -- and your own language-specific snippets + -- + -- In order to change opts.snippets, replace the entire table inside your own opts + + local snippets, config_path = require("mini.snippets"), vim.fn.stdpath("config") + + opts.snippets = { -- override opts.snippets provided by extra... + -- Load custom file with global snippets first (order matters) + snippets.gen_loader.from_file(config_path .. "/snippets/global.json"), + + -- Load snippets based on current language by reading files from + -- "snippets/" subdirectories from 'runtimepath' directories. + snippets.gen_loader.from_lang(), -- this is the default in the extra... + } + end, + }, + } +--]] +end + +local include_in_completion = vim.g.lazyvim_mini_snippets_in_completion == nil + or vim.g.lazyvim_mini_snippets_in_completion + +local function expand_from_lsp(snippet) + local insert = MiniSnippets.config.expand.insert or MiniSnippets.default_insert + insert({ body = snippet }) +end + +local function jump(direction) + local is_active = MiniSnippets.session.get(false) ~= nil + if is_active then + MiniSnippets.session.jump(direction) + return true + end +end + +---@type fun(snippets, insert) | nil +local expand_select_override = nil + +return { + -- disable builtin snippet support: + { "garymjr/nvim-snippets", optional = true, enabled = false }, + -- disable luasnip: + { "L3MON4D3/LuaSnip", optional = true, enabled = false }, + + -- add mini.snippets + desc = "mini.snippets(beta), a plugin to manage and expand snippets (alternative for luasnip)", + { + "echasnovski/mini.snippets", + event = "InsertEnter", -- don't depend on other plugins to load... + dependencies = "rafamadriz/friendly-snippets", + opts = function() + ---@diagnostic disable-next-line: duplicate-set-field + LazyVim.cmp.actions.snippet_stop = function() end -- by design, should not stop the session! + ---@diagnostic disable-next-line: duplicate-set-field + LazyVim.cmp.actions.snippet_forward = function() + return jump("next") + end + + local mini_snippets = require("mini.snippets") + return { + snippets = { mini_snippets.gen_loader.from_lang() }, + + -- Following the behavior of vim.snippets, + -- the intended usage of is to be able to temporarily exit into normal mode for quick edits. + -- + -- If you'd rather stop the snippet on , activate the line below in your own config: + -- mappings = { stop = "" }, -- by default, see :h MiniSnippets-session + + expand = { + select = function(snippets, insert) + -- Close completion window on snippet select - vim.ui.select + -- Needed to remove virtual text for fzf-lua and telescope, but not for mini.pick... + local select = expand_select_override or MiniSnippets.default_select + select(snippets, insert) + end, + }, + } + end, + }, + + -- nvim-cmp integration + { + "hrsh7th/nvim-cmp", + optional = true, + dependencies = include_in_completion and { "abeldekat/cmp-mini-snippets" } or nil, + opts = function(_, opts) + local cmp = require("cmp") + local cmp_config = require("cmp.config") + + opts.snippet = { + expand = function(args) + expand_from_lsp(args.body) + cmp.resubscribe({ "TextChangedI", "TextChangedP" }) + cmp_config.set_onetime({ sources = {} }) + end, + } + + if include_in_completion then + table.insert(opts.sources, { name = "mini_snippets" }) + else + expand_select_override = function(snippets, insert) + -- stylua: ignore + if cmp.visible() then cmp.close() end + MiniSnippets.default_select(snippets, insert) + end + end + end, + -- stylua: ignore + -- counterpart to defined in cmp.mappings + keys = include_in_completion and { { "", function() jump("prev") end, mode = "i" } } or nil, + }, + + -- blink.cmp integration + { + "saghen/blink.cmp", + optional = true, + opts = function(_, opts) + -- Return early + if include_in_completion then + opts.snippets = { preset = "mini_snippets" } + return + end + + -- Standalone -- + expand_select_override = function(snippets, insert) + -- Schedule, otherwise blink's virtual text is not removed on vim.ui.select + require("blink.cmp").cancel() + vim.schedule(function() + MiniSnippets.default_select(snippets, insert) + end) + end + -- + -- Blink performs a require on blink.cmp.sources.snippets.default + -- By removing the source, the default engine will not be used + opts.sources.default = vim.tbl_filter(function(source) + return source ~= "snippets" + end, opts.sources.default) + opts.snippets = { -- need to repeat blink's preset here + expand = expand_from_lsp, + active = function() + return MiniSnippets.session.get(false) ~= nil + end, + jump = function(direction) + jump(direction == -1 and "prev" or "next") + end, + } + end, + }, +} From 7fb320700ad0162be33ce816f2ba6f9dda41883f Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Thu, 23 Jan 2025 11:04:34 +0000 Subject: [PATCH 45/71] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 23f8a322..285451bb 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 20 +*LazyVim.txt* For Neovim Last change: 2025 January 23 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 332b32080c52727a16db90e06989caa0c378caa1 Mon Sep 17 00:00:00 2001 From: Jorge Villalobos Date: Thu, 23 Jan 2025 10:51:36 -0500 Subject: [PATCH 46/71] feat(snacks.picker): added su to search undotree (#5447) ## Description As it reads on the title ;) ## Related Issue(s) None. ## Screenshots ![Screenshot 2025-01-22 at 14 02 30](https://github.com/user-attachments/assets/f8d2ba88-f279-4715-8120-7610c58bd269) ![Screenshot 2025-01-22 at 14 03 04](https://github.com/user-attachments/assets/08bc1b26-f49c-4f25-ad66-1166a3f72605) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 2b623179..f47a2b29 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -68,6 +68,7 @@ return { { "fg", function() Snacks.picker.git_files() end, desc = "Find Files (git-files)" }, { "fr", LazyVim.pick("oldfiles"), desc = "Recent" }, { "fR", LazyVim.pick("oldfiles", { filter = { cwd = true }}), desc = "Recent (cwd)" }, + { "fp", function() Snacks.picker.projects() end, desc = "Projects" }, -- git { "gc", function() Snacks.picker.git_log() end, desc = "Git Log" }, { "gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (hunks)" }, @@ -94,8 +95,9 @@ return { { "sm", function() Snacks.picker.marks() end, desc = "Marks" }, { "sR", function() Snacks.picker.resume() end, desc = "Resume" }, { "sq", function() Snacks.picker.qflist() end, desc = "Quickfix List" }, + { "su", function() Snacks.picker.undo() end, desc = "Undotree" }, + -- ui { "uC", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" }, - { "fp", function() Snacks.picker.projects() end, desc = "Projects" }, }, }, { From eea52be3447502dde77d9e6fa75fd597a0b5a86a Mon Sep 17 00:00:00 2001 From: Jorge Villalobos Date: Thu, 23 Jan 2025 13:19:48 -0500 Subject: [PATCH 47/71] feat(snacks.picker): added si to search icons (#5460) ## Description As it reads on the tin can. ## Related Issue(s) N/A ## Screenshots ![Screenshot 2025-01-23 at 11 49 49](https://github.com/user-attachments/assets/6c4d0e9a-0a8e-4128-9ef1-b7954ece2bc7) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index f47a2b29..fd08004b 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -88,6 +88,7 @@ return { { "sd", function() Snacks.picker.diagnostics() end, desc = "Diagnostics" }, { "sh", function() Snacks.picker.help() end, desc = "Help Pages" }, { "sH", function() Snacks.picker.highlights() end, desc = "Highlights" }, + { "si", function() Snacks.picker.icons() end, desc = "Icons" }, { "sj", function() Snacks.picker.jumps() end, desc = "Jumps" }, { "sk", function() Snacks.picker.keymaps() end, desc = "Keymaps" }, { "sl", function() Snacks.picker.loclist() end, desc = "Location List" }, From 7cf4185dc4d1fe49ad004d33a6703603fb4500ff Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 23 Jan 2025 19:22:19 +0100 Subject: [PATCH 48/71] feat(snacks.picker): added `leader-sp` to search for plugin spec --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index fd08004b..e7a99239 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -78,6 +78,7 @@ return { { "sB", function() Snacks.picker.grep_buffers() end, desc = "Grep Open Buffers" }, { "sg", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" }, { "sG", LazyVim.pick("live_grep", { root = false }), desc = "Grep (cwd)" }, + { "sp", function() Snacks.picker.lazy() end, desc = "Search for Plugin Spec" }, { "sw", LazyVim.pick("grep_word"), desc = "Visual selection or word (Root Dir)", mode = { "n", "x" } }, { "sW", LazyVim.pick("grep_word", { root = false }), desc = "Visual selection or word (cwd)", mode = { "n", "x" } }, -- search From 83bf6360a1f28a3fc1afe31ae300247fc01c7a90 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 23 Jan 2025 19:22:47 +0100 Subject: [PATCH 49/71] feat(snacks.picker): added `leader-fB` to find any buffer (including hidden & nofile) --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index e7a99239..48bb7861 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -62,6 +62,7 @@ return { { "", LazyVim.pick("files"), desc = "Find Files (Root Dir)" }, -- find { "fb", function() Snacks.picker.buffers() end, desc = "Buffers" }, + { "fB", function() Snacks.picker.buffers({ hidden = true, nofile = true }) end, desc = "Buffers (all)" }, { "fc", LazyVim.pick.config_files(), desc = "Find Config File" }, { "ff", LazyVim.pick("files"), desc = "Find Files (Root Dir)" }, { "fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" }, From 0350934d56579f3e6a9d40fa47313b2970d74772 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Tue, 28 Jan 2025 10:19:01 +0200 Subject: [PATCH 50/71] fix(luasnip): schedule `jump` to be compatible with blink, nvim-cmp still works after change (#5470) ## Description Schedule `jump` in Luasnip `snippet_forward`, so that it doesn't get stuck before the last placeholder. ## Related Issue(s) Fixes #5469 ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/luasnip.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/luasnip.lua b/lua/lazyvim/plugins/extras/coding/luasnip.lua index 8b3daed7..85ed2fd5 100644 --- a/lua/lazyvim/plugins/extras/coding/luasnip.lua +++ b/lua/lazyvim/plugins/extras/coding/luasnip.lua @@ -30,7 +30,9 @@ return { opts = function() LazyVim.cmp.actions.snippet_forward = function() if require("luasnip").jumpable(1) then - require("luasnip").jump(1) + vim.schedule(function() + require("luasnip").jump(1) + end) return true end end From a3b459c1a58f6f8048f5259484e166090542400d Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Tue, 28 Jan 2025 08:20:18 +0000 Subject: [PATCH 51/71] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 285451bb..cc9c3d9d 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 23 +*LazyVim.txt* For Neovim Last change: 2025 January 28 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 132986a624b49bf740161d90ce94f16dd5ea5883 Mon Sep 17 00:00:00 2001 From: iniw Date: Tue, 28 Jan 2025 08:42:48 -0300 Subject: [PATCH 52/71] fix(keymaps): remove unneeded and ambiguous `w` keymap (#5459) ## Description The `w` mapping, described as "Windows", was causing potentially timeout-related bugs with many other mappings that also started with `w`. The problems caused by this are described in detail in issue #5456 and in discussion #4157. @dpetka2001 Suggested removing it as an experiment, which I tried and found to work. ## Checklist - [X] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/config/keymaps.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 48726b02..3e3829d1 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -182,7 +182,6 @@ map("t", "", "close", { desc = "Hide Terminal" }) map("t", "", "close", { desc = "which_key_ignore" }) -- windows -map("n", "w", "", { desc = "Windows", remap = true }) map("n", "-", "s", { desc = "Split Window Below", remap = true }) map("n", "|", "v", { desc = "Split Window Right", remap = true }) map("n", "wd", "c", { desc = "Delete Window", remap = true }) From 01a70cc60ed2760afc819510177fb8d12a371b25 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 28 Jan 2025 17:22:17 +0100 Subject: [PATCH 53/71] feat(snacks.picker): use snacks picker for notifications when enabled --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 1 + lua/lazyvim/plugins/ui.lua | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 48bb7861..e6110175 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -60,6 +60,7 @@ return { { "/", LazyVim.pick("grep"), desc = "Grep (Root Dir)" }, { ":", function() Snacks.picker.command_history() end, desc = "Command History" }, { "", LazyVim.pick("files"), desc = "Find Files (Root Dir)" }, + { "n", function() Snacks.picker.notifications() end, desc = "Notification History" }, -- find { "fb", function() Snacks.picker.buffers() end, desc = "Buffers" }, { "fB", function() Snacks.picker.buffers({ hidden = true, nofile = true }) end, desc = "Buffers (all)" }, diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index d556d1f1..6e03a217 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -278,7 +278,13 @@ return { }, -- stylua: ignore keys = { - { "n", function() Snacks.notifier.show_history() end, desc = "Notification History" }, + { "n", function() + if Snacks.config.picker and Snacks.config.picker.enabled then + Snacks.picker.notifications() + else + Snacks.notifier.show_history() + end + end, desc = "Notification History" }, { "un", function() Snacks.notifier.hide() end, desc = "Dismiss All Notifications" }, }, }, From f0d2629bd859eeac343999b0fe145f9beb227c4a Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Tue, 28 Jan 2025 19:55:02 +0200 Subject: [PATCH 54/71] fix(snacks): use `Snacks.picker` for recent files (#5485) ## Description Use `Snacks.picker` for recent files instead of `LazyVim.pick`, because `root_dir` is being propagated to `opts.cwd` and does not correctly filter out recent files when inside nested directories. ## Related Issue(s) None ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index e6110175..19a8faf3 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -69,7 +69,7 @@ return { { "fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" }, { "fg", function() Snacks.picker.git_files() end, desc = "Find Files (git-files)" }, { "fr", LazyVim.pick("oldfiles"), desc = "Recent" }, - { "fR", LazyVim.pick("oldfiles", { filter = { cwd = true }}), desc = "Recent (cwd)" }, + { "fR", function() Snacks.picker.recent({ filter = { cwd = true }}) end, desc = "Recent (cwd)" }, { "fp", function() Snacks.picker.projects() end, desc = "Projects" }, -- git { "gc", function() Snacks.picker.git_log() end, desc = "Git Log" }, From 5d24aa63111af68fbada8c97fedb75b07b8c3c92 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 29 Jan 2025 20:18:43 +0100 Subject: [PATCH 55/71] feat(snacks.picker): flash.nvim integration --- .../plugins/extras/editor/snacks_picker.lua | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 19a8faf3..85e6fe72 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -153,4 +153,45 @@ return { { "sT", function () Snacks.picker.todo_comments({ keywords = { "TODO", "FIX", "FIXME" } }) end, desc = "Todo/Fix/Fixme" }, }, }, + { + "folke/snacks.nvim", + optional = true, + specs = { + { + "folke/snacks.nvim", + opts = { + picker = { + win = { + input = { + keys = { + [""] = { "flash", mode = { "n", "i" } }, + ["s"] = { "flash" }, + }, + }, + }, + actions = { + flash = function(picker) + require("flash").jump({ + pattern = "^", + label = { after = { 0, 0 } }, + search = { + mode = "search", + exclude = { + function(win) + return vim.bo[vim.api.nvim_win_get_buf(win)].filetype ~= "snacks_picker_list" + end, + }, + }, + action = function(match) + local idx = picker.list:row2idx(match.pos[1]) + picker.list:move(idx, true) + end, + }) + end, + }, + }, + }, + }, + }, + }, } From 63a39ef8cfe9641f1e621473dfc859c8032a4169 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Wed, 29 Jan 2025 19:19:59 +0000 Subject: [PATCH 56/71] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index cc9c3d9d..ea390859 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 28 +*LazyVim.txt* For Neovim Last change: 2025 January 29 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 3de7b24cf6ed844772ea047476a400c56d5f4b42 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 29 Jan 2025 21:06:36 +0100 Subject: [PATCH 57/71] fix(snacks.picker): snacks => flash --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 85e6fe72..f6f16791 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -154,7 +154,7 @@ return { }, }, { - "folke/snacks.nvim", + "folke/flash.nvim", optional = true, specs = { { From b5cd0d0e27081be3ef1905475a0fe541b7661870 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 29 Jan 2025 23:21:59 +0100 Subject: [PATCH 58/71] fix(snacks.picker): flash integration --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index f6f16791..b6b6deee 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -184,7 +184,7 @@ return { }, action = function(match) local idx = picker.list:row2idx(match.pos[1]) - picker.list:move(idx, true) + picker.list:_move(idx, true, true) end, }) end, From e20d9afcbc980510093a3753a3991d8c934cbb75 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 30 Jan 2025 15:21:01 +0100 Subject: [PATCH 59/71] feat(snacks): extra for snacks explorer (replacement for neo-tree) --- .../plugins/extras/editor/snacks_explorer.lua | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/editor/snacks_explorer.lua diff --git a/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua b/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua new file mode 100644 index 00000000..b45342f2 --- /dev/null +++ b/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua @@ -0,0 +1,37 @@ +return { + { "nvim-neo-tree/neo-tree.nvim", enabled = false }, + { + "folke/snacks.nvim", + keys = { + { + "fe", + function() + Snacks.picker.explorer({ cwd = LazyVim.root() }) + end, + desc = "Explorer Snacks (root dir)", + }, + { + "fE", + function() + Snacks.picker.explorer() + end, + desc = "Explorer Snacks (cwd)", + }, + { "e", "fe", desc = "Explorer Snacks (root dir)", remap = true }, + { "E", "fE", desc = "Explorer Snacks (cwd)", remap = true }, + }, + init = function() + vim.api.nvim_create_autocmd("BufEnter", { + group = vim.api.nvim_create_augroup("snacks_explorer_start_directory", { clear = true }), + desc = "Start Snacks Explorer with directory", + once = true, + callback = function() + local dir = vim.fn.argv(0) --[[@as string]] + if dir ~= "" and vim.fn.isdirectory(dir) == 1 then + Snacks.picker.explorer({ cwd = dir }) + end + end, + }) + end, + }, +} From e9db488acaa04f1a9eca6d022e57fed4271b8af8 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 30 Jan 2025 21:38:56 +0100 Subject: [PATCH 60/71] feat(markdown): added markdown support for codecompanion --- lua/lazyvim/plugins/extras/lang/markdown.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/markdown.lua b/lua/lazyvim/plugins/extras/lang/markdown.lua index a73fe114..8b07985b 100644 --- a/lua/lazyvim/plugins/extras/lang/markdown.lua +++ b/lua/lazyvim/plugins/extras/lang/markdown.lua @@ -108,7 +108,7 @@ return { enabled = false, }, }, - ft = { "markdown", "norg", "rmd", "org" }, + ft = { "markdown", "norg", "rmd", "org", "codecompanion" }, config = function(_, opts) require("render-markdown").setup(opts) Snacks.toggle({ From 0dee310e90c5cedcb5b96f41acd8d4d3811d15df Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Thu, 30 Jan 2025 20:40:13 +0000 Subject: [PATCH 61/71] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index ea390859..5c0ff0a2 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 29 +*LazyVim.txt* For Neovim Last change: 2025 January 30 ============================================================================== Table of Contents *LazyVim-table-of-contents* From eb8ddea8c9438c34e71db097eb77a44185dd1093 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 30 Jan 2025 22:07:58 +0100 Subject: [PATCH 62/71] chore(main): release 14.9.0 (#5438) :robot: I have created a release *beep* *boop* --- ## [14.9.0](https://github.com/LazyVim/LazyVim/compare/v14.8.0...v14.9.0) (2025-01-30) ### Features * **markdown:** added markdown support for codecompanion ([e9db488](https://github.com/LazyVim/LazyVim/commit/e9db488acaa04f1a9eca6d022e57fed4271b8af8)) * **snacks.picker:** added <leader>si to search icons ([#5460](https://github.com/LazyVim/LazyVim/issues/5460)) ([eea52be](https://github.com/LazyVim/LazyVim/commit/eea52be3447502dde77d9e6fa75fd597a0b5a86a)) * **snacks.picker:** added <leader>su to search undotree ([#5447](https://github.com/LazyVim/LazyVim/issues/5447)) ([332b320](https://github.com/LazyVim/LazyVim/commit/332b32080c52727a16db90e06989caa0c378caa1)) * **snacks.picker:** added `leader-fB` to find any buffer (including hidden & nofile) ([83bf636](https://github.com/LazyVim/LazyVim/commit/83bf6360a1f28a3fc1afe31ae300247fc01c7a90)) * **snacks.picker:** added `leader-sp` to search for plugin spec ([7cf4185](https://github.com/LazyVim/LazyVim/commit/7cf4185dc4d1fe49ad004d33a6703603fb4500ff)) * **snacks.picker:** added alt-c to toggle between cwd/root dir ([6be7c4f](https://github.com/LazyVim/LazyVim/commit/6be7c4fee4fb755ff07f7bcc13eac96e1d8c279a)) * **snacks.picker:** flash.nvim integration ([5d24aa6](https://github.com/LazyVim/LazyVim/commit/5d24aa63111af68fbada8c97fedb75b07b8c3c92)) * **snacks.picker:** use snacks picker for notifications when enabled ([01a70cc](https://github.com/LazyVim/LazyVim/commit/01a70cc60ed2760afc819510177fb8d12a371b25)) * **snacks:** extra for snacks explorer (replacement for neo-tree) ([e20d9af](https://github.com/LazyVim/LazyVim/commit/e20d9afcbc980510093a3753a3991d8c934cbb75)) * **snippets:** an extra for mini.snippets ([#5274](https://github.com/LazyVim/LazyVim/issues/5274)) ([8b4e6ff](https://github.com/LazyVim/LazyVim/commit/8b4e6ff70d682cad3b1f4999623c3f0ac639fa82)) ### Bug Fixes * **keymaps:** remove unneeded and ambiguous `<leader>w` keymap ([#5459](https://github.com/LazyVim/LazyVim/issues/5459)) ([132986a](https://github.com/LazyVim/LazyVim/commit/132986a624b49bf740161d90ce94f16dd5ea5883)) * **luasnip:** schedule `jump` to be compatible with blink, nvim-cmp still works after change ([#5470](https://github.com/LazyVim/LazyVim/issues/5470)) ([0350934](https://github.com/LazyVim/LazyVim/commit/0350934d56579f3e6a9d40fa47313b2970d74772)) * **root:** pass args to root.get ([dc8512f](https://github.com/LazyVim/LazyVim/commit/dc8512fce1ec1cd4b0ca52d1077b2ed3894d51c8)) * **snacks.picker:** flash integration ([b5cd0d0](https://github.com/LazyVim/LazyVim/commit/b5cd0d0e27081be3ef1905475a0fe541b7661870)) * **snacks.picker:** snacks => flash ([3de7b24](https://github.com/LazyVim/LazyVim/commit/3de7b24cf6ed844772ea047476a400c56d5f4b42)) * **snacks:** use `Snacks.picker` for recent files ([#5485](https://github.com/LazyVim/LazyVim/issues/5485)) ([f0d2629](https://github.com/LazyVim/LazyVim/commit/f0d2629bd859eeac343999b0fe145f9beb227c4a)) * **sql:** better nvim-cmp check. Closes [#5188](https://github.com/LazyVim/LazyVim/issues/5188) ([1e83b4f](https://github.com/LazyVim/LazyVim/commit/1e83b4f843f88678189df81b1c88a400c53abdbc)) * **vscode:** diabled some snacks plugins. Fixes [#5364](https://github.com/LazyVim/LazyVim/issues/5364) ([c7a7ab5](https://github.com/LazyVim/LazyVim/commit/c7a7ab51129692927ae47f4e57ce22d10d48467e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 28 +++++++++++++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index b3c4f00b..d1d210f5 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.8.0" + ".": "14.9.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 1057fb57..7c9c762e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +## [14.9.0](https://github.com/LazyVim/LazyVim/compare/v14.8.0...v14.9.0) (2025-01-30) + + +### Features + +* **markdown:** added markdown support for codecompanion ([e9db488](https://github.com/LazyVim/LazyVim/commit/e9db488acaa04f1a9eca6d022e57fed4271b8af8)) +* **snacks.picker:** added <leader>si to search icons ([#5460](https://github.com/LazyVim/LazyVim/issues/5460)) ([eea52be](https://github.com/LazyVim/LazyVim/commit/eea52be3447502dde77d9e6fa75fd597a0b5a86a)) +* **snacks.picker:** added <leader>su to search undotree ([#5447](https://github.com/LazyVim/LazyVim/issues/5447)) ([332b320](https://github.com/LazyVim/LazyVim/commit/332b32080c52727a16db90e06989caa0c378caa1)) +* **snacks.picker:** added `leader-fB` to find any buffer (including hidden & nofile) ([83bf636](https://github.com/LazyVim/LazyVim/commit/83bf6360a1f28a3fc1afe31ae300247fc01c7a90)) +* **snacks.picker:** added `leader-sp` to search for plugin spec ([7cf4185](https://github.com/LazyVim/LazyVim/commit/7cf4185dc4d1fe49ad004d33a6703603fb4500ff)) +* **snacks.picker:** added alt-c to toggle between cwd/root dir ([6be7c4f](https://github.com/LazyVim/LazyVim/commit/6be7c4fee4fb755ff07f7bcc13eac96e1d8c279a)) +* **snacks.picker:** flash.nvim integration ([5d24aa6](https://github.com/LazyVim/LazyVim/commit/5d24aa63111af68fbada8c97fedb75b07b8c3c92)) +* **snacks.picker:** use snacks picker for notifications when enabled ([01a70cc](https://github.com/LazyVim/LazyVim/commit/01a70cc60ed2760afc819510177fb8d12a371b25)) +* **snacks:** extra for snacks explorer (replacement for neo-tree) ([e20d9af](https://github.com/LazyVim/LazyVim/commit/e20d9afcbc980510093a3753a3991d8c934cbb75)) +* **snippets:** an extra for mini.snippets ([#5274](https://github.com/LazyVim/LazyVim/issues/5274)) ([8b4e6ff](https://github.com/LazyVim/LazyVim/commit/8b4e6ff70d682cad3b1f4999623c3f0ac639fa82)) + + +### Bug Fixes + +* **keymaps:** remove unneeded and ambiguous `<leader>w` keymap ([#5459](https://github.com/LazyVim/LazyVim/issues/5459)) ([132986a](https://github.com/LazyVim/LazyVim/commit/132986a624b49bf740161d90ce94f16dd5ea5883)) +* **luasnip:** schedule `jump` to be compatible with blink, nvim-cmp still works after change ([#5470](https://github.com/LazyVim/LazyVim/issues/5470)) ([0350934](https://github.com/LazyVim/LazyVim/commit/0350934d56579f3e6a9d40fa47313b2970d74772)) +* **root:** pass args to root.get ([dc8512f](https://github.com/LazyVim/LazyVim/commit/dc8512fce1ec1cd4b0ca52d1077b2ed3894d51c8)) +* **snacks.picker:** flash integration ([b5cd0d0](https://github.com/LazyVim/LazyVim/commit/b5cd0d0e27081be3ef1905475a0fe541b7661870)) +* **snacks.picker:** snacks => flash ([3de7b24](https://github.com/LazyVim/LazyVim/commit/3de7b24cf6ed844772ea047476a400c56d5f4b42)) +* **snacks:** use `Snacks.picker` for recent files ([#5485](https://github.com/LazyVim/LazyVim/issues/5485)) ([f0d2629](https://github.com/LazyVim/LazyVim/commit/f0d2629bd859eeac343999b0fe145f9beb227c4a)) +* **sql:** better nvim-cmp check. Closes [#5188](https://github.com/LazyVim/LazyVim/issues/5188) ([1e83b4f](https://github.com/LazyVim/LazyVim/commit/1e83b4f843f88678189df81b1c88a400c53abdbc)) +* **vscode:** diabled some snacks plugins. Fixes [#5364](https://github.com/LazyVim/LazyVim/issues/5364) ([c7a7ab5](https://github.com/LazyVim/LazyVim/commit/c7a7ab51129692927ae47f4e57ce22d10d48467e)) + ## [14.8.0](https://github.com/LazyVim/LazyVim/compare/v14.7.0...v14.8.0) (2025-01-20) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 8a0b2ced..cbe0a571 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.8.0" -- x-release-please-version +M.version = "14.9.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 4f006f1fba5fdaa0150c544ad7966b96ec9cb04a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 31 Jan 2025 08:32:46 +0100 Subject: [PATCH 63/71] feat(snacks.explorer): enabled netrw integration --- .../plugins/extras/editor/snacks_explorer.lua | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua b/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua index b45342f2..27da61f8 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua @@ -2,6 +2,7 @@ return { { "nvim-neo-tree/neo-tree.nvim", enabled = false }, { "folke/snacks.nvim", + opts = { explorer = {} }, keys = { { "fe", @@ -20,18 +21,5 @@ return { { "e", "fe", desc = "Explorer Snacks (root dir)", remap = true }, { "E", "fE", desc = "Explorer Snacks (cwd)", remap = true }, }, - init = function() - vim.api.nvim_create_autocmd("BufEnter", { - group = vim.api.nvim_create_augroup("snacks_explorer_start_directory", { clear = true }), - desc = "Start Snacks Explorer with directory", - once = true, - callback = function() - local dir = vim.fn.argv(0) --[[@as string]] - if dir ~= "" and vim.fn.isdirectory(dir) == 1 then - Snacks.picker.explorer({ cwd = dir }) - end - end, - }) - end, }, } From 0e94534dd93d4cb53006390e8a7548b9d6fa3146 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 31 Jan 2025 08:33:15 +0100 Subject: [PATCH 64/71] style(picker.explorer): use shortcut --- lua/lazyvim/plugins/extras/editor/snacks_explorer.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua b/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua index 27da61f8..aa87e85c 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua @@ -7,14 +7,14 @@ return { { "fe", function() - Snacks.picker.explorer({ cwd = LazyVim.root() }) + Snacks.explorer({ cwd = LazyVim.root() }) end, desc = "Explorer Snacks (root dir)", }, { "fE", function() - Snacks.picker.explorer() + Snacks.explorer() end, desc = "Explorer Snacks (cwd)", }, From 3242ab8cff7d49e429320b9ec43c4be1f6e46dfe Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Fri, 31 Jan 2025 07:34:07 +0000 Subject: [PATCH 65/71] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 5c0ff0a2..fa81c82c 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 30 +*LazyVim.txt* For Neovim Last change: 2025 January 31 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 4a81a370d7868d7db32042f69b0fc5a6218059c5 Mon Sep 17 00:00:00 2001 From: abeldekat <58370433+abeldekat@users.noreply.github.com> Date: Fri, 31 Jan 2025 16:11:26 +0000 Subject: [PATCH 66/71] feat(snippets): mini.snippets is out of beta (#5505) ## Description mini.snippets is out of beta, so I adjusted the description for the extra accordingly ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --------- Co-authored-by: abeldekat --- lua/lazyvim/plugins/extras/coding/mini-snippets.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/mini-snippets.lua b/lua/lazyvim/plugins/extras/coding/mini-snippets.lua index f68af110..5ce82c80 100644 --- a/lua/lazyvim/plugins/extras/coding/mini-snippets.lua +++ b/lua/lazyvim/plugins/extras/coding/mini-snippets.lua @@ -61,7 +61,7 @@ return { { "L3MON4D3/LuaSnip", optional = true, enabled = false }, -- add mini.snippets - desc = "mini.snippets(beta), a plugin to manage and expand snippets (alternative for luasnip)", + desc = "Manage and expand snippets (alternative to Luasnip)", { "echasnovski/mini.snippets", event = "InsertEnter", -- don't depend on other plugins to load... From 8f4e9b8c1e43e354d91529484aedca54f04bdcf6 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 31 Jan 2025 20:10:48 +0100 Subject: [PATCH 67/71] fix(copilot): remove load on BufReadPost instead of InsertEnter --- lua/lazyvim/plugins/extras/ai/copilot.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot.lua b/lua/lazyvim/plugins/extras/ai/copilot.lua index 4651c689..4f1d54f2 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot.lua @@ -5,11 +5,12 @@ return { "zbirenbaum/copilot.lua", cmd = "Copilot", build = ":Copilot auth", - event = "InsertEnter", + event = "BufReadPost", opts = { suggestion = { enabled = not vim.g.ai_cmp, auto_trigger = true, + hide_during_completion = vim.g.ai_cmp, keymap = { accept = false, -- handled by nvim-cmp / blink.cmp next = "", From 3500d6a826a32d06d921f3e22342734c61ef09fe Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 31 Jan 2025 20:33:15 +0100 Subject: [PATCH 68/71] feat(bufferline): support for snacks picker sidebars --- lua/lazyvim/plugins/ui.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 6e03a217..7985825a 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -37,6 +37,9 @@ return { highlight = "Directory", text_align = "left", }, + { + filetype = "snacks_layout_box", + }, }, ---@param opts bufferline.IconFetcherOpts get_element_icon = function(opts) From 1a4d948e0dae360836187be8c86283d7e814b7ef Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 2 Feb 2025 18:03:13 +0100 Subject: [PATCH 69/71] perf(snacks_picker): lazy-load trouble open action --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index b6b6deee..9685c369 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -110,7 +110,11 @@ return { if LazyVim.has("trouble.nvim") then return vim.tbl_deep_extend("force", opts or {}, { picker = { - actions = require("trouble.sources.snacks").actions, + actions = { + trouble_open = function(...) + return require("trouble.sources.snacks").actions.trouble_open.action(...) + end, + }, win = { input = { keys = { From 7f8e797d2b0adf1e17a6278957c68a910b01c846 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Sun, 2 Feb 2025 17:04:34 +0000 Subject: [PATCH 70/71] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index fa81c82c..50d40e8e 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 31 +*LazyVim.txt* For Neovim Last change: 2025 February 02 ============================================================================== Table of Contents *LazyVim-table-of-contents* From fb256f2b688cb7ac9875f704fe6c00f27efc2354 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 2 Feb 2025 23:34:05 +0100 Subject: [PATCH 71/71] feat(snacks.picker): add projects picker to dashboard if snacks picker is enabled --- lua/lazyvim/plugins/ui.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 7985825a..0669054d 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -325,4 +325,18 @@ return { }, }, }, + { + "folke/snacks.nvim", + opts = function(_, opts) + if not opts.picker then + return + end + table.insert(opts.dashboard.preset.keys, 3, { + icon = " ", + key = "p", + desc = "Projects", + action = ":lua Snacks.picker.projects()", + }) + end, + }, }