From 39861698235c03d30096b3fb315ce38eeaef95e2 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 4 Nov 2023 10:14:31 +0100 Subject: [PATCH 01/38] fix(spectre): don't build nvim-spectre --- lua/lazyvim/plugins/editor.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 8c34f357..b5f529e5 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -98,6 +98,7 @@ return { -- search/replace in multiple files { "nvim-pack/nvim-spectre", + build = false, cmd = "Spectre", opts = { open_cmd = "noswapfile vnew" }, -- stylua: ignore From db31b4073bd18d7e2d8e09b2752d51da01fc7722 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 4 Nov 2023 09:15:11 +0000 Subject: [PATCH 02/38] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index bb2c94cd..44ba75b1 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2023 October 28 +*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2023 November 04 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 4312e5e28348560e018da4535de27dfcc675c32b Mon Sep 17 00:00:00 2001 From: Jorge Villalobos Date: Sat, 4 Nov 2023 06:09:01 -0400 Subject: [PATCH 03/38] feat(catppuccin): enable more integrations (#1922) --- lua/lazyvim/plugins/colorscheme.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/colorscheme.lua b/lua/lazyvim/plugins/colorscheme.lua index 8ed12bbd..bb63326e 100644 --- a/lua/lazyvim/plugins/colorscheme.lua +++ b/lua/lazyvim/plugins/colorscheme.lua @@ -14,14 +14,19 @@ return { name = "catppuccin", opts = { integrations = { + aerial = true, alpha = true, cmp = true, + dashboard = true, flash = true, gitsigns = true, + headlines = true, illuminate = true, indent_blankline = { enabled = true }, + leap = true, lsp_trouble = true, mason = true, + markdown = true, mini = true, native_lsp = { enabled = true, @@ -34,12 +39,13 @@ return { }, navic = { enabled = true, custom_bg = "lualine" }, neotest = true, + neotree = true, noice = true, notify = true, - neotree = true, semantic_tokens = true, telescope = true, treesitter = true, + treesitter_context = true, which_key = true, }, }, From 68ff818a5bb7549f90b05e412b76fe448f605ffb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 4 Nov 2023 11:12:37 +0100 Subject: [PATCH 04/38] chore(main): release 10.8.0 (#1874) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 16 ++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6de0da5..ce168232 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## [10.8.0](https://github.com/LazyVim/LazyVim/compare/v10.7.1...v10.8.0) (2023-11-04) + + +### Features + +* **catppuccin:** enable more integrations ([#1922](https://github.com/LazyVim/LazyVim/issues/1922)) ([4312e5e](https://github.com/LazyVim/LazyVim/commit/4312e5e28348560e018da4535de27dfcc675c32b)) + + +### Bug Fixes + +* **extras:** dont show extras that give errors (user's extras). Fixes [#1895](https://github.com/LazyVim/LazyVim/issues/1895) ([b32b4fd](https://github.com/LazyVim/LazyVim/commit/b32b4fd581018cf14bf30ae4cd8d94cd43552813)) +* **mini.indentscope:** remove duplicated filetype ([#1871](https://github.com/LazyVim/LazyVim/issues/1871)) ([09eafc6](https://github.com/LazyVim/LazyVim/commit/09eafc60eff2ba7d7b78c1717d07ce26b762a8a8)) +* **plugin:** LazyFile now properly deals with deleted buffers. Fixes [#1877](https://github.com/LazyVim/LazyVim/issues/1877) ([4558407](https://github.com/LazyVim/LazyVim/commit/4558407574d0cdbe55720ab349df201bd4d5f5de)) +* **sessions:** added folds to sessions ([e01ad51](https://github.com/LazyVim/LazyVim/commit/e01ad513aa4f50bdb385a7454c9e1ec3a0d5dc94)) +* **spectre:** don't build nvim-spectre ([3986169](https://github.com/LazyVim/LazyVim/commit/39861698235c03d30096b3fb315ce38eeaef95e2)) + ## [10.7.1](https://github.com/LazyVim/LazyVim/compare/v10.7.0...v10.7.1) (2023-10-25) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 12d49ed6..d84e26cd 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ local Util = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "10.7.1" -- x-release-please-version +M.version = "10.8.0" -- x-release-please-version ---@class LazyVimOptions local defaults = { From 6853b785d9916be6ffe4965aefd8554ed276f802 Mon Sep 17 00:00:00 2001 From: Gary Murray Date: Thu, 30 Nov 2023 11:53:40 -0700 Subject: [PATCH 05/38] fix(lsp): detect if using nvim-0.10 and use new inlay_hint.enable method (#2007) * Detect if using nvim 0.10 and use new inlay_hint.enable method * Add lsp util for inlay-hints and update keymap * Remove the need to check vim version * Support older nightly builds * Move inlay_hint toggle in Util.toggle --------- Co-authored-by: Gary Murray --- lua/lazyvim/config/keymaps.lua | 4 ++-- lua/lazyvim/plugins/lsp/init.lua | 2 +- lua/lazyvim/util/toggle.lua | 11 +++++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index c5f70016..f7fe57d6 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -119,8 +119,8 @@ map("n", "ul", function() Util.toggle.number() end, { desc = "Toggle Lin map("n", "ud", function() Util.toggle.diagnostics() end, { desc = "Toggle Diagnostics" }) local conceallevel = vim.o.conceallevel > 0 and vim.o.conceallevel or 3 map("n", "uc", function() Util.toggle("conceallevel", false, {0, conceallevel}) end, { desc = "Toggle Conceal" }) -if vim.lsp.inlay_hint then - map("n", "uh", function() vim.lsp.inlay_hint(0, nil) end, { desc = "Toggle Inlay Hints" }) +if vim.lsp.buf.inlay_hint or vim.lsp.inlay_hint then + map( "n", "uh", function() Util.toggle.inlay_hints() end, { desc = "Toggle Inlay Hints" }) end map("n", "uT", function() if vim.b.ts_highlight then vim.treesitter.stop() else vim.treesitter.start() end end, { desc = "Toggle Treesitter Highlight" }) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index f0823e46..f454ac1c 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -115,7 +115,7 @@ return { vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" }) end - local inlay_hint = vim.lsp.buf.inlay_hint or vim.lsp.inlay_hint + local inlay_hint = vim.lsp.buf.inlay_hint or vim.lsp.inlay_hint.enable if opts.inlay_hints.enabled and inlay_hint then Util.lsp.on_attach(function(client, buffer) diff --git a/lua/lazyvim/util/toggle.lua b/lua/lazyvim/util/toggle.lua index b520070b..51e81744 100644 --- a/lua/lazyvim/util/toggle.lua +++ b/lua/lazyvim/util/toggle.lua @@ -53,6 +53,17 @@ function M.diagnostics() end end +---@param bufnr? number +function M.inlay_hints(bufnr) + bufnr = bufnr or 0 + local inlay_hint = vim.lsp.buf.inlay_hint or vim.lsp.inlay_hint + if inlay_hint.enable then + vim.lsp.inlay_hint.enable(bufnr, not inlay_hint.is_enabled()) + else + vim.lsp.inlay_hint(bufnr, nil) + end +end + setmetatable(M, { __call = function(m, ...) return m.option(...) From 4ebda08d49edc2ce0f6a4841356fe6ed89427cc2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 30 Nov 2023 18:54:19 +0000 Subject: [PATCH 06/38] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 44ba75b1..2d805f3b 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2023 November 04 +*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2023 November 30 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 11a8a6bea7a26ca5257fa4cbef90e0abdb22c349 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 30 Nov 2023 20:10:41 +0100 Subject: [PATCH 07/38] fix(ui): signcolumn signs on nightly. Fixes #2039 --- lua/lazyvim/util/ui.lua | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/lua/lazyvim/util/ui.lua b/lua/lazyvim/util/ui.lua index 68999eda..ce8b4780 100644 --- a/lua/lazyvim/util/ui.lua +++ b/lua/lazyvim/util/ui.lua @@ -10,12 +10,19 @@ local M = {} function M.get_signs(buf, lnum) -- Get regular signs ---@type Sign[] - local signs = vim.tbl_map(function(sign) - ---@type Sign - local ret = vim.fn.sign_getdefined(sign.name)[1] - ret.priority = sign.priority - return ret - end, vim.fn.sign_getplaced(buf, { group = "*", lnum = lnum })[1].signs) + local signs = {} + + if vim.fn.has("nvim-0.10") == 0 then + -- Only needed for Neovim <0.10 + -- Newer versions include legacy signs in nvim_buf_get_extmarks + for _, sign in ipairs(vim.fn.sign_getplaced(buf, { group = "*", lnum = lnum })[1].signs) do + local ret = vim.fn.sign_getdefined(sign.name)[1] --[[@as Sign]] + if ret then + ret.priority = sign.priority + signs[#signs + 1] = ret + end + end + end -- Get extmark signs local extmarks = vim.api.nvim_buf_get_extmarks( From e229988a98a81b000fda3aadbb4fc404aeaa599e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 30 Nov 2023 20:16:33 +0100 Subject: [PATCH 08/38] fix(lsp): inlay hints on stable. See #2007 --- lua/lazyvim/plugins/lsp/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index f454ac1c..048de5b8 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -115,7 +115,7 @@ return { vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" }) end - local inlay_hint = vim.lsp.buf.inlay_hint or vim.lsp.inlay_hint.enable + local inlay_hint = vim.lsp.buf.inlay_hint or (vim.lsp.inlay_hint and vim.lsp.inlay_hint.enable) if opts.inlay_hints.enabled and inlay_hint then Util.lsp.on_attach(function(client, buffer) From 6ac331b588ab62f39c40a18c359d60e4dfba47ac Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 30 Nov 2023 20:20:39 +0100 Subject: [PATCH 09/38] chore(main): release 10.8.1 (#2095) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 9 +++++++++ lua/lazyvim/config/init.lua | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce168232..a3c33fe0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [10.8.1](https://github.com/LazyVim/LazyVim/compare/v10.8.0...v10.8.1) (2023-11-30) + + +### Bug Fixes + +* **lsp:** detect if using nvim-0.10 and use new inlay_hint.enable method ([#2007](https://github.com/LazyVim/LazyVim/issues/2007)) ([6853b78](https://github.com/LazyVim/LazyVim/commit/6853b785d9916be6ffe4965aefd8554ed276f802)) +* **lsp:** inlay hints on stable. See [#2007](https://github.com/LazyVim/LazyVim/issues/2007) ([e229988](https://github.com/LazyVim/LazyVim/commit/e229988a98a81b000fda3aadbb4fc404aeaa599e)) +* **ui:** signcolumn signs on nightly. Fixes [#2039](https://github.com/LazyVim/LazyVim/issues/2039) ([11a8a6b](https://github.com/LazyVim/LazyVim/commit/11a8a6bea7a26ca5257fa4cbef90e0abdb22c349)) + ## [10.8.0](https://github.com/LazyVim/LazyVim/compare/v10.7.1...v10.8.0) (2023-11-04) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index d84e26cd..09b80d86 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ local Util = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "10.8.0" -- x-release-please-version +M.version = "10.8.1" -- x-release-please-version ---@class LazyVimOptions local defaults = { From 8baf9b5459a903c783a1d34ad438e64036a8e15e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 30 Nov 2023 21:24:03 +0100 Subject: [PATCH 10/38] fix(lsp): fix inlay hints for older nightlies. See #2007 --- lua/lazyvim/plugins/lsp/init.lua | 6 ++---- lua/lazyvim/util/toggle.lua | 19 +++++++++++-------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 048de5b8..3b60d14b 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -115,12 +115,10 @@ return { vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" }) end - local inlay_hint = vim.lsp.buf.inlay_hint or (vim.lsp.inlay_hint and vim.lsp.inlay_hint.enable) - - if opts.inlay_hints.enabled and inlay_hint then + if opts.inlay_hints.enabled then Util.lsp.on_attach(function(client, buffer) if client.supports_method("textDocument/inlayHint") then - inlay_hint(buffer, true) + Util.toggle.inlay_hints(buffer, true) end end) end diff --git a/lua/lazyvim/util/toggle.lua b/lua/lazyvim/util/toggle.lua index 51e81744..db41c825 100644 --- a/lua/lazyvim/util/toggle.lua +++ b/lua/lazyvim/util/toggle.lua @@ -53,14 +53,17 @@ function M.diagnostics() end end ----@param bufnr? number -function M.inlay_hints(bufnr) - bufnr = bufnr or 0 - local inlay_hint = vim.lsp.buf.inlay_hint or vim.lsp.inlay_hint - if inlay_hint.enable then - vim.lsp.inlay_hint.enable(bufnr, not inlay_hint.is_enabled()) - else - vim.lsp.inlay_hint(bufnr, nil) +---@param buf? number +---@param value? boolean +function M.inlay_hints(buf, value) + local ih = vim.lsp.buf.inlay_hint or vim.lsp.inlay_hint + if type(ih) == "function" then + ih(buf, value) + elseif type(ih) == "table" and ih.enable then + if value == nil then + value = not ih.is_enabled(buf) + end + ih.enable(buf, value) end end From 879e29504d43e9f178d967ecc34d482f902e5a91 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 30 Nov 2023 21:27:02 +0100 Subject: [PATCH 11/38] chore(main): release 10.8.2 (#2097) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ lua/lazyvim/config/init.lua | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3c33fe0..318c543d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [10.8.2](https://github.com/LazyVim/LazyVim/compare/v10.8.1...v10.8.2) (2023-11-30) + + +### Bug Fixes + +* **lsp:** fix inlay hints for older nightlies. See [#2007](https://github.com/LazyVim/LazyVim/issues/2007) ([8baf9b5](https://github.com/LazyVim/LazyVim/commit/8baf9b5459a903c783a1d34ad438e64036a8e15e)) + ## [10.8.1](https://github.com/LazyVim/LazyVim/compare/v10.8.0...v10.8.1) (2023-11-30) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 09b80d86..a296ef56 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ local Util = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "10.8.1" -- x-release-please-version +M.version = "10.8.2" -- x-release-please-version ---@class LazyVimOptions local defaults = { From 979bb952a69d7dafac125da69cb27b70d5403f52 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 20 Jan 2024 12:50:34 +0100 Subject: [PATCH 12/38] fix(dot): treesitter for hypr was renamed to hyprlang --- lua/lazyvim/plugins/extras/util/dot.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/lazyvim/plugins/extras/util/dot.lua b/lua/lazyvim/plugins/extras/util/dot.lua index c25e0f6c..6fa4f2d6 100644 --- a/lua/lazyvim/plugins/extras/util/dot.lua +++ b/lua/lazyvim/plugins/extras/util/dot.lua @@ -10,7 +10,7 @@ return { -- Add Hyprland Parser { - "luckasRanarison/tree-sitter-hypr", + "luckasRanarison/tree-sitter-hyprlang", enabled = function() return have("hypr") end, @@ -19,11 +19,11 @@ return { config = function() -- Fix ft detection for hyprland vim.filetype.add({ - pattern = { [".*/hypr/.*%.conf"] = "hypr" }, + pattern = { [".*/hypr/.*%.conf"] = "hyprlang" }, }) - require("nvim-treesitter.parsers").get_parser_configs().hypr = { + require("nvim-treesitter.parsers").get_parser_configs().hyprlang = { install_info = { - url = "https://github.com/luckasRanarison/tree-sitter-hypr", + url = "https://github.com/luckasRanarison/tree-sitter-hyprlang", files = { "src/parser.c" }, branch = "master", }, From 23fe52acd78c8e8f7c35c3ce4c1bae830adfa357 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 21 Jan 2024 11:24:59 +0100 Subject: [PATCH 13/38] feat(autocmds): dont use conceal for json files --- lua/lazyvim/config/autocmds.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lua/lazyvim/config/autocmds.lua b/lua/lazyvim/config/autocmds.lua index 4cc6f1ec..bedea2e7 100644 --- a/lua/lazyvim/config/autocmds.lua +++ b/lua/lazyvim/config/autocmds.lua @@ -81,6 +81,15 @@ vim.api.nvim_create_autocmd("FileType", { end, }) +-- Fix conceallevel for json files +vim.api.nvim_create_autocmd({ "FileType" }, { + group = augroup("json_conceal"), + pattern = { "json", "jsonc", "json5" }, + callback = function() + vim.wo.conceallevel = 0 + end, +}) + -- Auto create dir when saving a file, in case some intermediate directory does not exist vim.api.nvim_create_autocmd({ "BufWritePre" }, { group = augroup("auto_create_dir"), From d0120ccdd11af8c421e23655c487c3cd68dc0199 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 21 Jan 2024 10:25:29 +0000 Subject: [PATCH 14/38] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 2d805f3b..35bc1618 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2023 November 30 +*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 January 21 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 33830f1e7d2e5a54fec676ce6e43a4a61882aaa9 Mon Sep 17 00:00:00 2001 From: Gary Murray Date: Sun, 21 Jan 2024 11:35:24 -0700 Subject: [PATCH 15/38] feat(lsp): add diagnostic signs to lsp options (#2192) Co-authored-by: Gary Murray --- lua/lazyvim/plugins/lsp/init.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 3b60d14b..8e39a055 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -26,6 +26,14 @@ return { -- prefix = "icons", }, severity_sort = true, + signs = { + text = { + [vim.diagnostic.severity.ERROR] = require("lazyvim.config").icons.diagnostics.Error, + [vim.diagnostic.severity.WARN] = require("lazyvim.config").icons.diagnostics.Warn, + [vim.diagnostic.severity.HINT] = require("lazyvim.config").icons.diagnostics.Hint, + [vim.diagnostic.severity.INFO] = require("lazyvim.config").icons.diagnostics.Info, + }, + }, }, -- Enable this to enable the builtin LSP inlay hints on Neovim >= 0.10.0 -- Be aware that you also will need to properly configure your LSP server to From b71feb7e45420a6e6dcac2f4491b73b70c32e5c7 Mon Sep 17 00:00:00 2001 From: Samuel Abreu Date: Sun, 21 Jan 2024 15:37:38 -0300 Subject: [PATCH 16/38] feat(test): Add tl to neotest.run_last() (#1968) --- lua/lazyvim/plugins/extras/test/core.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/test/core.lua b/lua/lazyvim/plugins/extras/test/core.lua index 321955ab..12ce90ba 100644 --- a/lua/lazyvim/plugins/extras/test/core.lua +++ b/lua/lazyvim/plugins/extras/test/core.lua @@ -110,6 +110,7 @@ return { { "tt", function() require("neotest").run.run(vim.fn.expand("%")) end, desc = "Run File" }, { "tT", function() require("neotest").run.run(vim.loop.cwd()) end, desc = "Run All Test Files" }, { "tr", function() require("neotest").run.run() end, desc = "Run Nearest" }, + { "tl", function() require("neotest").run.run_last() end, desc = "Run Last" }, { "ts", function() require("neotest").summary.toggle() end, desc = "Toggle Summary" }, { "to", function() require("neotest").output.open({ enter = true, auto_close = true }) end, desc = "Show Output" }, { "tO", function() require("neotest").output_panel.toggle() end, desc = "Toggle Output Panel" }, From f4ddb16b262e5ba14b417dc53bfd09d5b21f8a73 Mon Sep 17 00:00:00 2001 From: Sergey Kochetkov Date: Sun, 21 Jan 2024 19:49:41 +0100 Subject: [PATCH 17/38] feat(gitsigns): update gitsigns.nvim preview command (#2178) * chores(format.lua): Fix typo * Change gitsigns.nvim hunk preview shortcut Change `preview_hunk` to recently added `preview_hunk_inline` command --- lua/lazyvim/plugins/editor.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index b5f529e5..f23d4544 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -358,7 +358,7 @@ return { map("n", "ghS", gs.stage_buffer, "Stage Buffer") map("n", "ghu", gs.undo_stage_hunk, "Undo Stage Hunk") map("n", "ghR", gs.reset_buffer, "Reset Buffer") - map("n", "ghp", gs.preview_hunk, "Preview Hunk") + map("n", "ghp", gs.preview_hunk_inline, "Preview Hunk Inline") map("n", "ghb", function() gs.blame_line({ full = true }) end, "Blame Line") map("n", "ghd", gs.diffthis, "Diff This") map("n", "ghD", function() gs.diffthis("~") end, "Diff This ~") From fa6158a59500c816b652e0fcb4c343270be54b6c Mon Sep 17 00:00:00 2001 From: NickSager <121263610+NickSager@users.noreply.github.com> Date: Sun, 21 Jan 2024 12:52:36 -0600 Subject: [PATCH 18/38] feat(keymaps): add function to toggle between light/dark backgrounds (#2088) --- lua/lazyvim/config/keymaps.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index f7fe57d6..1e7cc1a2 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -123,6 +123,7 @@ if vim.lsp.buf.inlay_hint or vim.lsp.inlay_hint then map( "n", "uh", function() Util.toggle.inlay_hints() end, { desc = "Toggle Inlay Hints" }) end map("n", "uT", function() if vim.b.ts_highlight then vim.treesitter.stop() else vim.treesitter.start() end end, { desc = "Toggle Treesitter Highlight" }) +map("n", "ub", function() Util.toggle("background", false, {"light", "dark"}) end, { desc = "Toggle Background" }) -- lazygit map("n", "gg", function() Util.terminal({ "lazygit" }, { cwd = Util.root(), esc_esc = false, ctrl_hjkl = false }) end, { desc = "Lazygit (root dir)" }) From 71a73e8334a3692c549a09169e0f7a33923520f1 Mon Sep 17 00:00:00 2001 From: Nick Hester Date: Sun, 21 Jan 2024 10:53:09 -0800 Subject: [PATCH 19/38] fix(eslint): correct working directories name (#2071) --- lua/lazyvim/plugins/extras/linting/eslint.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/linting/eslint.lua b/lua/lazyvim/plugins/extras/linting/eslint.lua index 9537303d..a92a2191 100644 --- a/lua/lazyvim/plugins/extras/linting/eslint.lua +++ b/lua/lazyvim/plugins/extras/linting/eslint.lua @@ -8,7 +8,7 @@ return { eslint = { settings = { -- helps eslint find the eslintrc when it's placed in a subfolder instead of the cwd root - workingDirectory = { mode = "auto" }, + workingDirectories = { mode = "auto" }, }, }, }, From 5296d42e6ab4f6df80e801542382a3d774298364 Mon Sep 17 00:00:00 2001 From: pr3c0g Date: Sun, 21 Jan 2024 18:53:57 +0000 Subject: [PATCH 20/38] feat(neo-tree): Adds copy file name command to Neo-Tree with 'Y' binding (#2137) Co-authored-by: Ricardo Rebelo --- lua/lazyvim/plugins/editor.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index f23d4544..153cb786 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -57,10 +57,16 @@ return { bind_to_cwd = false, follow_current_file = { enabled = true }, use_libuv_file_watcher = true, + commands = { + copy_file_name = function(state) + local node = state.tree:get_node() + vim.fn.setreg("*", node.name, "c") + end, }, window = { mappings = { [""] = "none", + ["Y"] = "copy_file_name", }, }, default_component_configs = { From adc0b36069c5be150af8d992a59d00d849e3dedb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 21 Jan 2024 20:00:03 +0100 Subject: [PATCH 21/38] chore(main): release 10.9.0 (#2391) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 18 ++++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 318c543d..53044510 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## [10.9.0](https://github.com/LazyVim/LazyVim/compare/v10.8.2...v10.9.0) (2024-01-21) + + +### Features + +* **autocmds:** dont use conceal for json files ([23fe52a](https://github.com/LazyVim/LazyVim/commit/23fe52acd78c8e8f7c35c3ce4c1bae830adfa357)) +* **gitsigns:** update gitsigns.nvim preview command ([#2178](https://github.com/LazyVim/LazyVim/issues/2178)) ([f4ddb16](https://github.com/LazyVim/LazyVim/commit/f4ddb16b262e5ba14b417dc53bfd09d5b21f8a73)) +* **keymaps:** add function to toggle between light/dark backgrounds ([#2088](https://github.com/LazyVim/LazyVim/issues/2088)) ([fa6158a](https://github.com/LazyVim/LazyVim/commit/fa6158a59500c816b652e0fcb4c343270be54b6c)) +* **lsp:** add diagnostic signs to lsp options ([#2192](https://github.com/LazyVim/LazyVim/issues/2192)) ([33830f1](https://github.com/LazyVim/LazyVim/commit/33830f1e7d2e5a54fec676ce6e43a4a61882aaa9)) +* **neo-tree:** Adds copy file name command to Neo-Tree with 'Y' binding ([#2137](https://github.com/LazyVim/LazyVim/issues/2137)) ([5296d42](https://github.com/LazyVim/LazyVim/commit/5296d42e6ab4f6df80e801542382a3d774298364)) +* **test:** Add <leader>tl to neotest.run_last() ([#1968](https://github.com/LazyVim/LazyVim/issues/1968)) ([b71feb7](https://github.com/LazyVim/LazyVim/commit/b71feb7e45420a6e6dcac2f4491b73b70c32e5c7)) + + +### Bug Fixes + +* **dot:** treesitter for hypr was renamed to hyprlang ([979bb95](https://github.com/LazyVim/LazyVim/commit/979bb952a69d7dafac125da69cb27b70d5403f52)) +* **eslint:** correct working directories name ([#2071](https://github.com/LazyVim/LazyVim/issues/2071)) ([71a73e8](https://github.com/LazyVim/LazyVim/commit/71a73e8334a3692c549a09169e0f7a33923520f1)) + ## [10.8.2](https://github.com/LazyVim/LazyVim/compare/v10.8.1...v10.8.2) (2023-11-30) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index a296ef56..508bfbf2 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ local Util = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "10.8.2" -- x-release-please-version +M.version = "10.9.0" -- x-release-please-version ---@class LazyVimOptions local defaults = { From fbe478ae3f84ff842d18ff880af5842a50ee8e50 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 21 Jan 2024 20:02:11 +0100 Subject: [PATCH 22/38] fix: fixup for #2137 --- lua/lazyvim/plugins/editor.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 153cb786..f96fff9a 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -62,6 +62,7 @@ return { local node = state.tree:get_node() vim.fn.setreg("*", node.name, "c") end, + }, }, window = { mappings = { From c433ea7aa842c446edc2b1570998bf5440c68188 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 21 Jan 2024 20:03:51 +0100 Subject: [PATCH 23/38] chore(main): release 10.9.1 (#2399) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ lua/lazyvim/config/init.lua | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53044510..7bee06d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [10.9.1](https://github.com/LazyVim/LazyVim/compare/v10.9.0...v10.9.1) (2024-01-21) + + +### Bug Fixes + +* fixup for [#2137](https://github.com/LazyVim/LazyVim/issues/2137) ([fbe478a](https://github.com/LazyVim/LazyVim/commit/fbe478ae3f84ff842d18ff880af5842a50ee8e50)) + ## [10.9.0](https://github.com/LazyVim/LazyVim/compare/v10.8.2...v10.9.0) (2024-01-21) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 508bfbf2..e259928a 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ local Util = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "10.9.0" -- x-release-please-version +M.version = "10.9.1" -- x-release-please-version ---@class LazyVimOptions local defaults = { From 37107cf2fcd534916482b82de7ad7d689c6505b0 Mon Sep 17 00:00:00 2001 From: Pablo <52180403+pablos123@users.noreply.github.com> Date: Sun, 21 Jan 2024 16:10:18 -0300 Subject: [PATCH 24/38] docs: typo in init.lua (#2365) --- lua/lazyvim/plugins/lsp/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 8e39a055..fbb4aeac 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -94,7 +94,7 @@ return { -- setup autoformat Util.format.register(Util.lsp.formatter()) - -- deprectaed options + -- deprecated options if opts.autoformat ~= nil then vim.g.autoformat = opts.autoformat Util.deprecate("nvim-lspconfig.opts.autoformat", "vim.g.autoformat") From c72db4938c693d51ff8079b451c84cc57e8dd8b3 Mon Sep 17 00:00:00 2001 From: tippfehlr Date: Sun, 21 Jan 2024 20:18:03 +0100 Subject: [PATCH 25/38] docs(README-DE): remove .txt extension (#2321) Probably some windows editor that added this automatically + known extensions hidden. --- README-DE.md.txt => README-DE.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README-DE.md.txt => README-DE.md (100%) diff --git a/README-DE.md.txt b/README-DE.md similarity index 100% rename from README-DE.md.txt rename to README-DE.md From 8e2046f3d02a80558802b6cbcd4c8f7d44f7b6b4 Mon Sep 17 00:00:00 2001 From: Frederick Zhang Date: Mon, 22 Jan 2024 06:20:54 +1100 Subject: [PATCH 26/38] fix(autocmds): avoid checktime when buftype=nofile (#2270) It triggered an 'E11: Invalid in command-line window; executes, CTRL-C quits' error when Neovim was in Command Line window and FocusGained. --- lua/lazyvim/config/autocmds.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/config/autocmds.lua b/lua/lazyvim/config/autocmds.lua index bedea2e7..e3fb1fda 100644 --- a/lua/lazyvim/config/autocmds.lua +++ b/lua/lazyvim/config/autocmds.lua @@ -7,7 +7,11 @@ end -- Check if we need to reload the file when it changed vim.api.nvim_create_autocmd({ "FocusGained", "TermClose", "TermLeave" }, { group = augroup("checktime"), - command = "checktime", + callback = function() + if vim.o.buftype ~= 'nofile' then + vim.cmd('checktime') + end + end }) -- Highlight on yank From cbd9d700dc964cf8c90759f8482911d03c72edc4 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis Date: Sun, 21 Jan 2024 21:28:16 +0200 Subject: [PATCH 27/38] fix(typescript): don't hardcode values in lua table (#2254) * fix(typescript): don't hardcode values in lua table When a user changes `vim.opt.shiftwidth` with some auto-command, it's not taken into account. Make `opts` a function, so that values get evaluated when `lspconfig` loads instead. * fix(typescript): remove format settings entirely * fix(typescript): add back comment and Lua annotations * fix(typescript): bring back function call completion snippets --- lua/lazyvim/plugins/extras/lang/typescript.lua | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/typescript.lua b/lua/lazyvim/plugins/extras/lang/typescript.lua index 4f53ae8c..4bb280d6 100644 --- a/lua/lazyvim/plugins/extras/lang/typescript.lua +++ b/lua/lazyvim/plugins/extras/lang/typescript.lua @@ -46,21 +46,8 @@ return { desc = "Remove Unused Imports", }, }, + ---@diagnostic disable-next-line: missing-fields settings = { - typescript = { - format = { - indentSize = vim.o.shiftwidth, - convertTabsToSpaces = vim.o.expandtab, - tabSize = vim.o.tabstop, - }, - }, - javascript = { - format = { - indentSize = vim.o.shiftwidth, - convertTabsToSpaces = vim.o.expandtab, - tabSize = vim.o.tabstop, - }, - }, completions = { completeFunctionCalls = true, }, @@ -69,6 +56,7 @@ return { }, }, }, + { "mfussenegger/nvim-dap", optional = true, From a43d8cf35857fae4aaf1ebbd3c280cdf5b5f9d10 Mon Sep 17 00:00:00 2001 From: Adrian Wilkins Date: Sun, 21 Jan 2024 19:34:07 +0000 Subject: [PATCH 28/38] fix(options): change default conceal level to 2 (#2053) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 3 hides all concealed text, even if there are replacement chars defined e.g. : for Markdown, 3 hides list item markers, dots for asterisk lists and em-dashes for dash lists If replacements are defined as defaults in a plugin, the "Laziestâ„¢" config would seem to be displaying them. Level 1 only seems useful when alignment really matters. --- lua/lazyvim/config/options.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index 3c9686b1..6d9f006b 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -17,7 +17,7 @@ local opt = vim.opt opt.autowrite = true -- Enable auto write opt.clipboard = "unnamedplus" -- Sync with system clipboard opt.completeopt = "menu,menuone,noselect" -opt.conceallevel = 3 -- Hide * markup for bold and italic +opt.conceallevel = 2 -- Hide * markup for bold and italic, but not markers with substitutions opt.confirm = true -- Confirm to save changes before exiting modified buffer opt.cursorline = true -- Enable highlighting of the current line opt.expandtab = true -- Use spaces instead of tabs From 93342f15badc6e7a3c213e27979b2ff31e0b393e Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis Date: Sun, 21 Jan 2024 21:41:11 +0200 Subject: [PATCH 29/38] feat(toggle): use `vim.diagnostic.is_disabled` when available (#2217) * feat(toggle-diagnostics): change logic based on `vim.diagnostic.is_disabled` After discussion in #2215, I thought maybe it would be beneficial if we could change the logic of the `toggle-diagnostics` function based on if the user has disabled diagnostics in his own configuration. * feat(toggle-diagnostics): revert to `enable` instead of `status` * fix(toggle): use vim.diagnostics enabled state when possible --------- Co-authored-by: Folke Lemaitre --- lua/lazyvim/util/toggle.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/lazyvim/util/toggle.lua b/lua/lazyvim/util/toggle.lua index db41c825..409556d1 100644 --- a/lua/lazyvim/util/toggle.lua +++ b/lua/lazyvim/util/toggle.lua @@ -43,7 +43,13 @@ end local enabled = true function M.diagnostics() + -- if this Neovim version supports checking if diagnostics are enabled + -- then use that for the current state + if vim.diagnostic.is_disabled then + enabled = not vim.diagnostic.is_disabled() + end enabled = not enabled + if enabled then vim.diagnostic.enable() Util.info("Enabled diagnostics", { title = "Diagnostics" }) From eccf3b5e68035516c879b3e2b4d6bf8512c87976 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 21 Jan 2024 21:32:09 +0100 Subject: [PATCH 30/38] fix(neo-tree): better copy file name with `Y` --- lua/lazyvim/plugins/editor.lua | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index f96fff9a..f9f162ad 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -57,17 +57,15 @@ return { bind_to_cwd = false, follow_current_file = { enabled = true }, use_libuv_file_watcher = true, - commands = { - copy_file_name = function(state) - local node = state.tree:get_node() - vim.fn.setreg("*", node.name, "c") - end, - }, }, window = { mappings = { [""] = "none", - ["Y"] = "copy_file_name", + ["Y"] = function(state) + local node = state.tree:get_node() + local path = node:get_id() + vim.fn.setreg("+", path, "c") + end, }, }, default_component_configs = { From 1dffb1d853df39e2232fd39d3cf47ba3da2e8b6c Mon Sep 17 00:00:00 2001 From: Binh Duc Tran Date: Mon, 22 Jan 2024 13:49:45 +0700 Subject: [PATCH 31/38] fix(hyprlang): use lazyvim way to install (#2404) --- lua/lazyvim/plugins/extras/util/dot.lua | 31 +++++++++++++------------ 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/lua/lazyvim/plugins/extras/util/dot.lua b/lua/lazyvim/plugins/extras/util/dot.lua index 6fa4f2d6..a37670ea 100644 --- a/lua/lazyvim/plugins/extras/util/dot.lua +++ b/lua/lazyvim/plugins/extras/util/dot.lua @@ -11,25 +11,26 @@ return { -- Add Hyprland Parser { "luckasRanarison/tree-sitter-hyprlang", + dependencies = { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + require("nvim-treesitter.parsers").get_parser_configs().hyprlang = { + install_info = { + url = "https://github.com/luckasRanarison/tree-sitter-hyprlang", + files = { "src/parser.c" }, + branch = "master", + }, + filetype = "hyprlang", + } + + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "hyprlang" }) + end, + }, enabled = function() return have("hypr") end, event = "BufRead */hypr/*.conf", - build = ":TSUpdate hypr", - config = function() - -- Fix ft detection for hyprland - vim.filetype.add({ - pattern = { [".*/hypr/.*%.conf"] = "hyprlang" }, - }) - require("nvim-treesitter.parsers").get_parser_configs().hyprlang = { - install_info = { - url = "https://github.com/luckasRanarison/tree-sitter-hyprlang", - files = { "src/parser.c" }, - branch = "master", - }, - filetype = "hypr", - } - end, }, -- add some stuff to treesitter From eb2674ce37d3ed7d4738f008f83269fd1af98111 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 22 Jan 2024 06:50:15 +0000 Subject: [PATCH 32/38] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 35bc1618..000a427e 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 January 21 +*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 January 22 ============================================================================== Table of Contents *LazyVim-table-of-contents* From f799b39eafedf58cdd7b123870a2c87d96eddb68 Mon Sep 17 00:00:00 2001 From: Frederick Zhang Date: Mon, 22 Jan 2024 17:51:19 +1100 Subject: [PATCH 33/38] fix(rust): avoid resetting cmp group_index to 1 (#2332) For example, 'buffer' source by default has group_index = 2 [1], however if we take all the sources plus crates and run them through cmp.config.sources() again, since it's a one-dimensional list, all group_indexes will be reset to 1. [1] https://github.com/LazyVim/LazyVim/blob/879e29504d43e9f178d967ecc34d482f902e5a91/lua/lazyvim/plugins/coding.lua#L74-L80 --- lua/lazyvim/plugins/extras/lang/rust.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/rust.lua b/lua/lazyvim/plugins/extras/lang/rust.lua index 1e6e0594..bd8f7821 100644 --- a/lua/lazyvim/plugins/extras/lang/rust.lua +++ b/lua/lazyvim/plugins/extras/lang/rust.lua @@ -16,10 +16,8 @@ return { }, ---@param opts cmp.ConfigSchema opts = function(_, opts) - local cmp = require("cmp") - opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { - { name = "crates" }, - })) + opts.sources = opts.sources or {} + table.insert(opts.sources, { name = "crates" }) end, }, From d9287391b7ca7153320d4654e148c33463eba3a6 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 22 Jan 2024 08:03:13 +0100 Subject: [PATCH 34/38] feat: added `LazyHealth` that loads all plugins and runs `:checkhealth` --- lua/lazyvim/config/init.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index e259928a..20aba534 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -185,6 +185,11 @@ function M.setup(opts) vim.api.nvim_create_user_command("LazyExtras", function() Util.extras.show() end, { desc = "Manage LazyVim extras" }) + + vim.api.nvim_create_user_command("LazyHealth", function() + vim.cmd([[Lazy! load all]]) + vim.cmd([[checkhealth]]) + end, { desc = "Load all plugins and run :checkhealth" }) end, }) From 7f9219162b54a717b7da5cb543ab1e778c9a124b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 22 Jan 2024 08:39:07 +0100 Subject: [PATCH 35/38] feat(snippets): added extra to use native snippets instead of LuaSnip. --- lua/lazyvim/plugins/coding.lua | 83 ++++++++++--------- .../plugins/extras/coding/native_snippets.lua | 59 +++++++++++++ 2 files changed, 105 insertions(+), 37 deletions(-) create mode 100644 lua/lazyvim/plugins/extras/coding/native_snippets.lua diff --git a/lua/lazyvim/plugins/coding.lua b/lua/lazyvim/plugins/coding.lua index c6571433..662977f0 100644 --- a/lua/lazyvim/plugins/coding.lua +++ b/lua/lazyvim/plugins/coding.lua @@ -1,35 +1,5 @@ return { - -- snippets - { - "L3MON4D3/LuaSnip", - build = (not jit.os:find("Windows")) - and "echo 'NOTE: jsregexp is optional, so not a big deal if it fails to build'; make install_jsregexp" - or nil, - dependencies = { - "rafamadriz/friendly-snippets", - config = function() - require("luasnip.loaders.from_vscode").lazy_load() - end, - }, - opts = { - history = true, - delete_check_events = "TextChanged", - }, - -- stylua: ignore - keys = { - { - "", - function() - return require("luasnip").jumpable(1) and "luasnip-jump-next" or "" - end, - expr = true, silent = true, mode = "i", - }, - { "", function() require("luasnip").jump(1) end, mode = "s" }, - { "", function() require("luasnip").jump(-1) end, mode = { "i", "s" } }, - }, - }, - -- auto completion { "hrsh7th/nvim-cmp", @@ -39,7 +9,6 @@ return { "hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-buffer", "hrsh7th/cmp-path", - "saadparwaiz1/cmp_luasnip", }, opts = function() vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true }) @@ -49,11 +18,6 @@ return { completion = { completeopt = "menu,menuone,noinsert", }, - snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - }, mapping = cmp.mapping.preset.insert({ [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), @@ -73,7 +37,6 @@ return { }), sources = cmp.config.sources({ { name = "nvim_lsp" }, - { name = "luasnip" }, { name = "path" }, }, { { name = "buffer" }, @@ -104,6 +67,52 @@ return { end, }, + -- snippets + { + "L3MON4D3/LuaSnip", + build = (not jit.os:find("Windows")) + and "echo 'NOTE: jsregexp is optional, so not a big deal if it fails to build'; make install_jsregexp" + or nil, + dependencies = { + { + "rafamadriz/friendly-snippets", + config = function() + require("luasnip.loaders.from_vscode").lazy_load() + end, + }, + { + "nvim-cmp", + dependencies = { + "saadparwaiz1/cmp_luasnip", + }, + opts = function(_, opts) + opts.snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + } + table.insert(opts.sources, { name = "luasnip" }) + end, + }, + }, + opts = { + history = true, + delete_check_events = "TextChanged", + }, + -- stylua: ignore + keys = { + { + "", + function() + return require("luasnip").jumpable(1) and "luasnip-jump-next" or "" + end, + expr = true, silent = true, mode = "i", + }, + { "", function() require("luasnip").jump(1) end, mode = "s" }, + { "", function() require("luasnip").jump(-1) end, mode = { "i", "s" } }, + }, + }, + -- auto pairs { "echasnovski/mini.pairs", diff --git a/lua/lazyvim/plugins/extras/coding/native_snippets.lua b/lua/lazyvim/plugins/extras/coding/native_snippets.lua new file mode 100644 index 00000000..72080c92 --- /dev/null +++ b/lua/lazyvim/plugins/extras/coding/native_snippets.lua @@ -0,0 +1,59 @@ +return { + desc = "Use native snippets instead of LuaSnip. Only works on Neovim >= 0.10!", + { + "L3MON4D3/LuaSnip", + enabled = false, + }, + { + "nvim-cmp", + opts = { + snippet = { + expand = function(args) + vim.snippet.expand(args.body) + end, + }, + }, + keys = { + { + "", + function() + if vim.snippet.jumpable(1) then + vim.schedule(function() + vim.snippet.jump(1) + end) + return + end + return "" + end, + expr = true, + silent = true, + mode = "i", + }, + { + "", + function() + vim.schedule(function() + vim.snippet.jump(1) + end) + end, + silent = true, + mode = "s", + }, + { + "", + function() + if vim.snippet.jumpable(-1) then + vim.schedule(function() + vim.snippet.jump(-1) + end) + return + end + return "" + end, + expr = true, + silent = true, + mode = { "i", "s" }, + }, + }, + }, +} From 54ae77e164e62ae9f45e864dfd727bfe1809a419 Mon Sep 17 00:00:00 2001 From: Yi Date: Mon, 22 Jan 2024 02:58:51 -0800 Subject: [PATCH 36/38] feat(telescope): add fg for finding files using git-files (#2353) I found this to be more useful than the current ff and fF --- lua/lazyvim/plugins/editor.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index f9f162ad..46860e7b 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -146,6 +146,7 @@ return { { "fc", Util.telescope.config_files(), desc = "Find Config File" }, { "ff", Util.telescope("files"), desc = "Find Files (root dir)" }, { "fF", Util.telescope("files", { cwd = false }), desc = "Find Files (cwd)" }, + { "fg", "Telescope git_files", desc = "Find Files (git-files)" }, { "fr", "Telescope oldfiles", desc = "Recent" }, { "fR", Util.telescope("oldfiles", { cwd = vim.loop.cwd() }), desc = "Recent (cwd)" }, -- git From 591f850f8a30a08066022392fe3b23eb217dbb81 Mon Sep 17 00:00:00 2001 From: Michael Olson <48652773+m0lson84@users.noreply.github.com> Date: Tue, 23 Jan 2024 01:51:34 -0500 Subject: [PATCH 37/38] fix(autocmds): apply conceal level change to local buffer options (#2409) --- lua/lazyvim/config/autocmds.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/config/autocmds.lua b/lua/lazyvim/config/autocmds.lua index e3fb1fda..8e09ac0e 100644 --- a/lua/lazyvim/config/autocmds.lua +++ b/lua/lazyvim/config/autocmds.lua @@ -90,7 +90,7 @@ vim.api.nvim_create_autocmd({ "FileType" }, { group = augroup("json_conceal"), pattern = { "json", "jsonc", "json5" }, callback = function() - vim.wo.conceallevel = 0 + vim.opt_local.conceallevel = 0 end, }) From a50f92f7550fb6e9f21c0852e6cb190e6fcd50f5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 23 Jan 2024 06:52:05 +0000 Subject: [PATCH 38/38] chore(build): auto-generate vimdoc --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 000a427e..2fa95fdf 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 January 22 +*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 January 23 ============================================================================== Table of Contents *LazyVim-table-of-contents*