From d7ca822d41bc65e31dc1019a64d5d3518c8e2470 Mon Sep 17 00:00:00 2001 From: Javier Tia Date: Wed, 26 Jul 2023 13:43:49 -0600 Subject: [PATCH 01/14] fix(yaml): yaml: Fix TypeError undefined length (#1229) In YAML files LSP completion is not happening because yaml-language-server is failing with error: TypeError: Cannot read properties of undefined (reading 'length') from out/server/src/languageserver/handlers/settingsHandlers.js:78:51, which it's expecting to have yaml.schemaStore.url.length and it's doesn't exist. Signed-off-by: Javier Tia --- lua/lazyvim/plugins/extras/lang/yaml.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/yaml.lua b/lua/lazyvim/plugins/extras/lang/yaml.lua index b097cdf6..52034664 100644 --- a/lua/lazyvim/plugins/extras/lang/yaml.lua +++ b/lua/lazyvim/plugins/extras/lang/yaml.lua @@ -38,6 +38,8 @@ return { -- Must disable built-in schemaStore support to use -- schemas from SchemaStore.nvim plugin enable = false, + -- Avoid TypeError: Cannot read properties of undefined (reading 'length') + url = "", }, }, }, From 549baee2242f3ce9fd7bb27dd331430a82326705 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 26 Jul 2023 19:44:27 +0000 Subject: [PATCH 02/14] 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 cf27f96c..caf034f7 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 July 25 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 July 26 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 9264c54ae96d1d56f029ad9b561326c7b991c53b Mon Sep 17 00:00:00 2001 From: Luco Bellic Date: Wed, 26 Jul 2023 21:44:47 +0200 Subject: [PATCH 03/14] feat(clangd): remove CMakelists root_dir search (#1230) Provide better handling of root_dir search for C++ project using CMakelists.txt per folder --- lua/lazyvim/plugins/extras/lang/clangd.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/clangd.lua b/lua/lazyvim/plugins/extras/lang/clangd.lua index d9ce751c..50cf8f43 100644 --- a/lua/lazyvim/plugins/extras/lang/clangd.lua +++ b/lua/lazyvim/plugins/extras/lang/clangd.lua @@ -56,7 +56,6 @@ return { root_dir = function(fname) return require("lspconfig.util").root_pattern( "Makefile", - "CMakeLists.txt", "configure.ac", "configure.in", "config.h.in", From a62a5942deb281b9edce3673e656854805297199 Mon Sep 17 00:00:00 2001 From: Jonas Holst Damtoft Date: Sun, 30 Jul 2023 11:09:44 +0200 Subject: [PATCH 04/14] fix(yaml): yaml validate and enable line folding (#1251) * fix(yaml): enable validate see https://github.com/redhat-developer/yaml-language-server#language-server-settings * feat(yaml): support line folding --- lua/lazyvim/plugins/extras/lang/yaml.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/yaml.lua b/lua/lazyvim/plugins/extras/lang/yaml.lua index 52034664..ca808bbf 100644 --- a/lua/lazyvim/plugins/extras/lang/yaml.lua +++ b/lua/lazyvim/plugins/extras/lang/yaml.lua @@ -21,6 +21,15 @@ return { -- make sure mason installs the server servers = { yamlls = { + -- Have to add this for yamlls to understand that we support line folding + capabilities = { + textDocument = { + foldingRange = { + dynamicRegistration = false, + lineFoldingOnly = true, + }, + }, + }, -- lazy-load schemastore when needed on_new_config = function(new_config) new_config.settings.yaml.schemas = new_config.settings.yaml.schemas or {} @@ -33,7 +42,7 @@ return { format = { enable = true, }, - validate = { enable = true }, + validate = true, schemaStore = { -- Must disable built-in schemaStore support to use -- schemas from SchemaStore.nvim plugin From c1fc996ccd51a343f2bb18cc2578343503e7da93 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 30 Jul 2023 09:10:24 +0000 Subject: [PATCH 05/14] 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 caf034f7..3d0069db 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 July 26 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 July 30 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 566049aa4a26a86219dd1ad1624f9a1bf18831b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=B5=20Quang=20Chi=E1=BA=BFn?= <87252943+yeuxacucodon@users.noreply.github.com> Date: Sun, 30 Jul 2023 16:10:45 +0700 Subject: [PATCH 06/14] feat(treesitter): add jsdoc to ensure_installed (#1252) better highlighting for jsdoc comment --- lua/lazyvim/plugins/treesitter.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index d2f5b775..b84d01a7 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -34,6 +34,7 @@ return { "c", "html", "javascript", + "jsdoc", "json", "lua", "luadoc", From 73dc5a503f1f42fc12869688df1359ffd80da5d1 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Tue, 29 Aug 2023 11:57:09 -0400 Subject: [PATCH 07/14] fix(clangd): update setup from upstream changes (#1308) --- lua/lazyvim/plugins/extras/lang/clangd.lua | 44 +++++++++++----------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/clangd.lua b/lua/lazyvim/plugins/extras/lang/clangd.lua index 50cf8f43..08017700 100644 --- a/lua/lazyvim/plugins/extras/lang/clangd.lua +++ b/lua/lazyvim/plugins/extras/lang/clangd.lua @@ -15,29 +15,27 @@ return { lazy = true, config = function() end, opts = { - extensions = { - inlay_hints = { - inline = false, + inlay_hints = { + inline = false, + }, + ast = { + --These require codicons (https://github.com/microsoft/vscode-codicons) + role_icons = { + type = "", + declaration = "", + expression = "", + specifier = "", + statement = "", + ["template argument"] = "", }, - ast = { - --These require codicons (https://github.com/microsoft/vscode-codicons) - role_icons = { - type = "", - declaration = "", - expression = "", - specifier = "", - statement = "", - ["template argument"] = "", - }, - kind_icons = { - Compound = "", - Recovery = "", - TranslationUnit = "", - PackExpansion = "", - TemplateTypeParm = "", - TemplateTemplateParm = "", - TemplateParamObject = "", - }, + kind_icons = { + Compound = "", + Recovery = "", + TranslationUnit = "", + PackExpansion = "", + TemplateTypeParm = "", + TemplateTemplateParm = "", + TemplateParamObject = "", }, }, }, @@ -89,7 +87,7 @@ return { clangd = function(_, opts) local clangd_ext_opts = require("lazyvim.util").opts("clangd_extensions.nvim") require("clangd_extensions").setup(vim.tbl_deep_extend("force", clangd_ext_opts or {}, { server = opts })) - return true + return false end, }, }, From 971ed5c148d050ec6f0a7c11df4c83c402af9766 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 29 Aug 2023 15:57:49 +0000 Subject: [PATCH 08/14] 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 3d0069db..19ea6b25 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 July 30 +*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 August 29 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 377c0e397c3585cf7bae6afb8bd279a47954be0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owicz?= Date: Tue, 29 Aug 2023 17:58:42 +0200 Subject: [PATCH 09/14] feat(python): add more venv names (#1381) --- lua/lazyvim/plugins/extras/lang/python.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/python.lua b/lua/lazyvim/plugins/extras/lang/python.lua index 746435cc..9c71521d 100644 --- a/lua/lazyvim/plugins/extras/lang/python.lua +++ b/lua/lazyvim/plugins/extras/lang/python.lua @@ -61,7 +61,14 @@ return { { "linux-cultist/venv-selector.nvim", cmd = "VenvSelect", - opts = {}, + opts = { + name = { + "venv", + ".venv", + "env", + ".env", + }, + }, keys = { { "cv", ":VenvSelect", desc = "Select VirtualEnv" } }, }, } From 451bde5b41ec410afbb2b5e75e339a3fc44c5587 Mon Sep 17 00:00:00 2001 From: Xie Zejian Date: Tue, 29 Aug 2023 23:59:18 +0800 Subject: [PATCH 10/14] fix(python): disable ruff hover correctly (#1365) * fix: disable ruff hover correctly * better fix --- lua/lazyvim/plugins/extras/lang/python.lua | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/python.lua b/lua/lazyvim/plugins/extras/lang/python.lua index 9c71521d..e64decd1 100644 --- a/lua/lazyvim/plugins/extras/lang/python.lua +++ b/lua/lazyvim/plugins/extras/lang/python.lua @@ -14,16 +14,16 @@ return { pyright = {}, ruff_lsp = {}, }, - }, - setup = { - ruff_lsp = function() - require("lazyvim.util").on_attach(function(client, _) - if client.name == "ruff_lsp" then - -- Disable hover in favor of Pyright - client.server_capabilities.hoverProvider = false - end - end) - end, + setup = { + ruff_lsp = function() + require("lazyvim.util").on_attach(function(client, _) + if client.name == "ruff_lsp" then + -- Disable hover in favor of Pyright + client.server_capabilities.hoverProvider = false + end + end) + end, + }, }, }, { From 23e2b073e6fa75dacaa58dc1fe63392af7f54598 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 29 Aug 2023 18:00:54 +0200 Subject: [PATCH 11/14] fix(keymaps): remove gw keymap --- lua/lazyvim/config/keymaps.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index c86e6944..84427e16 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -66,8 +66,6 @@ map( { desc = "Redraw / clear hlsearch / diff update" } ) -map({ "n", "x" }, "gw", "*N", { desc = "Search word under cursor" }) - -- https://github.com/mhinz/vim-galore#saner-behavior-of-n-and-n map("n", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" }) map("x", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" }) From 64c5848fe8e6d6fcf233286b0d077a4d120c4d59 Mon Sep 17 00:00:00 2001 From: Zhizhen He Date: Wed, 30 Aug 2023 00:02:45 +0800 Subject: [PATCH 12/14] style: fix comment typo (#1336) --- 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 9c542b35..8c5dc71a 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -170,7 +170,7 @@ return { require("lspconfig")[server].setup(server_opts) end - -- get all the servers that are available thourgh mason-lspconfig + -- get all the servers that are available through mason-lspconfig local have_mason, mlsp = pcall(require, "mason-lspconfig") local all_mslp_servers = {} if have_mason then From ec0ddd481c785833c5caac9c9d22889b9e963883 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis Date: Tue, 29 Aug 2023 19:07:56 +0300 Subject: [PATCH 13/14] fix(keymaps): change `v` mode to `x` mode for `save file` (#1262) While trying to disable `` entirely by `vim.keymap.del({ "i", "v","n", "s" }, "")` in my own `keymaps.lua`, I got an error on reopening Neovim `No such mapping`. After tinkering around a bit, I changed `v` to `x`, since `v` incorporates both `x` and `s` and the error stopped occuring. --- lua/lazyvim/config/keymaps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 84427e16..54107199 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -80,7 +80,7 @@ map("i", ".", ".u") map("i", ";", ";u") -- save file -map({ "i", "v", "n", "s" }, "", "w", { desc = "Save file" }) +map({ "i", "x", "n", "s" }, "", "w", { desc = "Save file" }) --keywordprg map("n", "K", "norm! K", { desc = "Keywordprg" }) From f9dadc11b39fb0b027473caaab2200b35c9f0c8b Mon Sep 17 00:00:00 2001 From: Callum Howard Date: Wed, 30 Aug 2023 02:13:32 +1000 Subject: [PATCH 14/14] fix(autocmds): restore tabpage on resize (#1260) --- lua/lazyvim/config/autocmds.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/lazyvim/config/autocmds.lua b/lua/lazyvim/config/autocmds.lua index ec1b98df..c8a513f5 100644 --- a/lua/lazyvim/config/autocmds.lua +++ b/lua/lazyvim/config/autocmds.lua @@ -22,7 +22,9 @@ vim.api.nvim_create_autocmd("TextYankPost", { vim.api.nvim_create_autocmd({ "VimResized" }, { group = augroup("resize_splits"), callback = function() + local current_tab = vim.fn.tabpagenr() vim.cmd("tabdo wincmd =") + vim.cmd("tabnext " .. current_tab) end, })