From 5fb4cf0d365b65cb9b7afa8be047973b5fc1747a Mon Sep 17 00:00:00 2001 From: HyBer <59885141+BBboy01@users.noreply.github.com> Date: Tue, 23 Apr 2024 14:54:32 +0800 Subject: [PATCH 01/16] fix(dot): can't match kitty conf file (#3042) --- lua/lazyvim/plugins/extras/util/dot.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/util/dot.lua b/lua/lazyvim/plugins/extras/util/dot.lua index 26af6a9b..abbeaed9 100644 --- a/lua/lazyvim/plugins/extras/util/dot.lua +++ b/lua/lazyvim/plugins/extras/util/dot.lua @@ -43,8 +43,8 @@ return { pattern = { [".*/waybar/config"] = "jsonc", [".*/mako/config"] = "dosini", - [".*/kitty/*.conf"] = "bash", - [".*/hypr/.*%.conf"] = "hyprlang", + [".*/kitty/.+%.conf"] = "bash", + [".*/hypr/.+%.conf"] = "hyprlang", ["%.env%.[%w_.-]+"] = "dotenv", }, }) From f086bcde253c29be9a2b9c90b413a516f5d5a3b2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 23 Apr 2024 06:55:09 +0000 Subject: [PATCH 02/16] 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 38e7d18d..dac065ba 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 April 22 +*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 April 23 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 3086bf03e96bfc0048e5b27f8d65a9170bca3f67 Mon Sep 17 00:00:00 2001 From: Daniel Mata <100956688+matadaniel@users.noreply.github.com> Date: Fri, 3 May 2024 02:06:33 -0500 Subject: [PATCH 03/16] fix(dot): install when list is empty (#3052) --- lua/lazyvim/plugins/extras/util/dot.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lua/lazyvim/plugins/extras/util/dot.lua b/lua/lazyvim/plugins/extras/util/dot.lua index abbeaed9..ffc46551 100644 --- a/lua/lazyvim/plugins/extras/util/dot.lua +++ b/lua/lazyvim/plugins/extras/util/dot.lua @@ -18,10 +18,8 @@ return { { "williamboman/mason.nvim", opts = function(_, opts) - vim.list_extend(opts.ensure_installed or {}, { - "shfmt", - "shellcheck", - }) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "shellcheck" }) end, }, -- add some stuff to treesitter From 9d734c5ae232bd8dd46855b0582bbd0e3d13f6bb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 3 May 2024 07:07:12 +0000 Subject: [PATCH 04/16] 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 dac065ba..602c7dd7 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 April 23 +*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 May 03 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 095bc13188cefb11dba2adc312cf0dc8cfce0b1f Mon Sep 17 00:00:00 2001 From: Michael Butler <158096643+michaelbutleridt@users.noreply.github.com> Date: Fri, 3 May 2024 03:10:36 -0400 Subject: [PATCH 05/16] style(keymaps): clarify no to use `LazyVim.safe_keymap_set` #3085 * Update keymaps.lua add more explanation about what to use * Update keymaps.lua * fix typo YOU => YOUR --- 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 38c0ae4e..79ae665d 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -1,6 +1,6 @@ -- This file is automatically loaded by lazyvim.config.init --- DO NOT USE THIS IN YOU OWN CONFIG!! +-- DO NOT USE `LazyVim.safe_keymap_set` IN YOUR OWN CONFIG!! -- use `vim.keymap.set` instead local map = LazyVim.safe_keymap_set From 6004e8d4f60549bd2c5d6f3187a28d72b21e3261 Mon Sep 17 00:00:00 2001 From: Shixin Chai <1667482085@qq.com> Date: Fri, 3 May 2024 15:11:25 +0800 Subject: [PATCH 06/16] fix(native_snippets): Fix native_snippets for `vim.snippet api` changes (#3083) --- lua/lazyvim/plugins/extras/coding/native_snippets.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/native_snippets.lua b/lua/lazyvim/plugins/extras/coding/native_snippets.lua index 74b70784..cc501ff7 100644 --- a/lua/lazyvim/plugins/extras/coding/native_snippets.lua +++ b/lua/lazyvim/plugins/extras/coding/native_snippets.lua @@ -22,7 +22,7 @@ return { { "", function() - if vim.snippet.jumpable(1) then + if vim.snippet.active({ direction = 1 }) then vim.schedule(function() vim.snippet.jump(1) end) @@ -47,7 +47,7 @@ return { { "", function() - if vim.snippet.jumpable(-1) then + if vim.snippet.active({ direction = -1 }) then vim.schedule(function() vim.snippet.jump(-1) end) From b8475f51949acf195729a1c4d057a06208a9add9 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Fri, 3 May 2024 10:16:50 +0300 Subject: [PATCH 07/16] feat(lualine): make path trimming configurable by user (#3062) * feat(lualine): make path trimming configurable by user * fix: always split both forward/backward slashes --------- Co-authored-by: Folke Lemaitre --- lua/lazyvim/util/lualine.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/util/lualine.lua b/lua/lazyvim/util/lualine.lua index db4600f4..757ddb01 100644 --- a/lua/lazyvim/util/lualine.lua +++ b/lua/lazyvim/util/lualine.lua @@ -79,6 +79,7 @@ function M.pretty_path(opts) directory_hl = "", filename_hl = "Bold", modified_sign = "", + length = 3, }, opts or {}) return function(self) @@ -100,8 +101,10 @@ function M.pretty_path(opts) local sep = package.config:sub(1, 1) local parts = vim.split(path, "[\\/]") - if #parts > 3 then - parts = { parts[1], "…", parts[#parts - 1], parts[#parts] } + if opts.length == 0 then + parts = parts + elseif #parts > opts.length then + parts = { parts[1], "…", table.concat({ unpack(parts, #parts - opts.length + 2, #parts) }, sep) } end if opts.modified_hl and vim.bo.modified then From a96348d7b076819f7580ea0c0ce467630bfc7cc5 Mon Sep 17 00:00:00 2001 From: Skywalker <51255100+imzhongqi@users.noreply.github.com> Date: Fri, 3 May 2024 15:17:55 +0800 Subject: [PATCH 08/16] fix(extras): Rust-Analyzer cargo option (#3061) * fix(extras): Rust-Analyzer cargo option * fix(extras): Rust-Analyzer cargo option --- lua/lazyvim/plugins/extras/lang/rust.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/rust.lua b/lua/lazyvim/plugins/extras/lang/rust.lua index 613bc0f7..8a665c6c 100644 --- a/lua/lazyvim/plugins/extras/lang/rust.lua +++ b/lua/lazyvim/plugins/extras/lang/rust.lua @@ -60,7 +60,9 @@ return { cargo = { allFeatures = true, loadOutDirsFromCheck = true, - runBuildScripts = true, + buildScripts = { + enable = true, + }, }, -- Add clippy lints for Rust. checkOnSave = { From 34183a2759828001b08679659f7d5170d7ec367e Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Fri, 3 May 2024 10:23:31 +0300 Subject: [PATCH 09/16] fix(python): make both `ruff` and `ruff_lsp` available to user (#3060) * fix(python): make both `ruff` and `ruff_lsp` available to user Provide global variable to choose between `ruff` and `ruff_lsp` in accordance to `pyright`/`basedpyright` * refactor(python): ruff stuff --------- Co-authored-by: Folke Lemaitre --- lua/lazyvim/plugins/extras/lang/python.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/python.lua b/lua/lazyvim/plugins/extras/lang/python.lua index b36fd80c..3e7f5d59 100644 --- a/lua/lazyvim/plugins/extras/lang/python.lua +++ b/lua/lazyvim/plugins/extras/lang/python.lua @@ -2,9 +2,11 @@ if lazyvim_docs then -- LSP Server to use for Python. -- Set to "basedpyright" to use basedpyright instead of pyright. vim.g.lazyvim_python_lsp = "pyright" + vim.g.lazyvim_python_ruff = "ruff_lsp" end local lsp = vim.g.lazyvim_python_lsp or "pyright" +local ruff = vim.g.lazyvim_python_ruff or "ruff_lsp" return { { @@ -28,7 +30,13 @@ return { [lsp] = { enabled = true, }, + ruff_lsp = { + enabled = ruff == "ruff_lsp", + }, ruff = { + enabled = ruff == "ruff", + }, + [ruff] = { keys = { { "co", @@ -47,9 +55,9 @@ return { }, }, setup = { - ruff = function() + [ruff] = function() LazyVim.lsp.on_attach(function(client, _) - if client.name == "ruff" then + if client.name == ruff then -- Disable hover in favor of Pyright client.server_capabilities.hoverProvider = false end From 530e94a9fa19577401e968a9673282c3d79f01e3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 3 May 2024 16:21:45 +0200 Subject: [PATCH 10/16] chore(main): release 10.23.0 (#3043) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85059243..541f2250 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## [10.23.0](https://github.com/LazyVim/LazyVim/compare/v10.22.0...v10.23.0) (2024-05-03) + + +### Features + +* **lualine:** make path trimming configurable by user ([#3062](https://github.com/LazyVim/LazyVim/issues/3062)) ([b8475f5](https://github.com/LazyVim/LazyVim/commit/b8475f51949acf195729a1c4d057a06208a9add9)) + + +### Bug Fixes + +* **dot:** can't match kitty conf file ([#3042](https://github.com/LazyVim/LazyVim/issues/3042)) ([5fb4cf0](https://github.com/LazyVim/LazyVim/commit/5fb4cf0d365b65cb9b7afa8be047973b5fc1747a)) +* **dot:** install when list is empty ([#3052](https://github.com/LazyVim/LazyVim/issues/3052)) ([3086bf0](https://github.com/LazyVim/LazyVim/commit/3086bf03e96bfc0048e5b27f8d65a9170bca3f67)) +* **extras:** Rust-Analyzer cargo option ([#3061](https://github.com/LazyVim/LazyVim/issues/3061)) ([a96348d](https://github.com/LazyVim/LazyVim/commit/a96348d7b076819f7580ea0c0ce467630bfc7cc5)) +* **native_snippets:** Fix native_snippets for `vim.snippet api` changes ([#3083](https://github.com/LazyVim/LazyVim/issues/3083)) ([6004e8d](https://github.com/LazyVim/LazyVim/commit/6004e8d4f60549bd2c5d6f3187a28d72b21e3261)) +* **python:** make both `ruff` and `ruff_lsp` available to user ([#3060](https://github.com/LazyVim/LazyVim/issues/3060)) ([34183a2](https://github.com/LazyVim/LazyVim/commit/34183a2759828001b08679659f7d5170d7ec367e)) + ## [10.22.0](https://github.com/LazyVim/LazyVim/compare/v10.21.1...v10.22.0) (2024-04-22) From 30c9e4718a127f7d5a32f11c4d8dbba6b01f9858 Mon Sep 17 00:00:00 2001 From: Afiq Nazrie Date: Sun, 12 May 2024 14:57:29 +0700 Subject: [PATCH 11/16] fix(ui): don't lazy-load dashboard-nvim (#3107) As https://github.com/nvimdev/dashboard-nvim/pull/450, dashboard-nvim shouldn't be lazy-loaded to properly handle stdin --- lua/lazyvim/plugins/ui.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 47fb4280..2cd9496c 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -346,9 +346,10 @@ return { return false end, }, + { "nvimdev/dashboard-nvim", - event = "VimEnter", + lazy = false, -- As https://github.com/nvimdev/dashboard-nvim/pull/450, dashboard-nvim shouldn't be lazy-loaded to properly handle stdin. opts = function() local logo = [[ ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z From f7450a523622152635e950716565e8d5c27b840d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 12 May 2024 07:58:05 +0000 Subject: [PATCH 12/16] 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 602c7dd7..6460b1fa 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 May 03 +*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 May 12 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 30ce84f7a7fb4e88b47ddf2f569b2ea9b7d56717 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Sun, 12 May 2024 11:08:55 +0300 Subject: [PATCH 13/16] fix(neo-tree): correctly set up `cwd` (#3097) * fix(neo-tree): correctly set up `cwd` * refactor: cleanup --------- Co-authored-by: Folke Lemaitre --- lua/lazyvim/plugins/editor.lua | 23 +++++++++++++++++------ lua/lazyvim/util/root.lua | 5 ++++- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 37bcc9cb..c25537f4 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -41,12 +41,23 @@ return { vim.cmd([[Neotree close]]) end, init = function() - if vim.fn.argc(-1) == 1 then - local stat = vim.uv.fs_stat(vim.fn.argv(0)) - if stat and stat.type == "directory" then - require("neo-tree") - end - end + -- FIX: use `autocmd` for lazy-loading neo-tree instead of directly requiring it, + -- because `cwd` is not set up properly. + vim.api.nvim_create_autocmd("BufEnter", { + group = vim.api.nvim_create_augroup("Neotree_start_directory", { clear = true }), + desc = "Start Neo-tree with directory", + once = true, + callback = function() + if package.loaded["neo-tree"] then + return + else + local stats = vim.uv.fs_stat(vim.fn.argv(0)) + if stats and stats.type == "directory" then + require("neo-tree") + end + end + end, + }) end, opts = { sources = { "filesystem", "buffers", "git_status", "document_symbols" }, diff --git a/lua/lazyvim/util/root.lua b/lua/lazyvim/util/root.lua index 4143206c..c8de430d 100644 --- a/lua/lazyvim/util/root.lua +++ b/lua/lazyvim/util/root.lua @@ -142,7 +142,10 @@ function M.setup() LazyVim.root.info() end, { desc = "LazyVim roots for the current buffer" }) - vim.api.nvim_create_autocmd({ "LspAttach", "BufWritePost", "DirChanged" }, { + -- FIX: doesn't properly clear cache in neo-tree `set_root` (which should happen presumably on `DirChanged`), + -- probably because the event is triggered in the neo-tree buffer, therefore add `BufEnter` + -- Maybe this is too frequent on `BufEnter` and something else should be done instead?? + vim.api.nvim_create_autocmd({ "LspAttach", "BufWritePost", "DirChanged", "BufEnter" }, { group = vim.api.nvim_create_augroup("lazyvim_root_cache", { clear = true }), callback = function(event) M.cache[event.buf] = nil From 8968c9e9ea76f3a7616d9e249a3c9307a75fffad Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Sun, 12 May 2024 11:09:54 +0300 Subject: [PATCH 14/16] feat(mason-lspconfig): allow `opts.ensure_installed` to be taken into account (#3134) --- lua/lazyvim/plugins/lsp/init.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index c2a74ef5..30ef5115 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -212,7 +212,14 @@ return { end if have_mason then - mlsp.setup({ ensure_installed = ensure_installed, handlers = { setup } }) + mlsp.setup({ + ensure_installed = vim.tbl_deep_extend( + "force", + ensure_installed, + LazyVim.opts("mason-lspconfig.nvim").ensure_installed or {} + ), + handlers = { setup }, + }) end if LazyVim.lsp.get_config("denols") and LazyVim.lsp.get_config("tsserver") then From cfe87ba894b6c2c961827de45c55b57b1183865c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 12 May 2024 10:15:27 +0200 Subject: [PATCH 15/16] chore(main): release 10.24.0 (#3143) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 541f2250..ba1a334d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [10.24.0](https://github.com/LazyVim/LazyVim/compare/v10.23.0...v10.24.0) (2024-05-12) + + +### Features + +* **mason-lspconfig:** allow `opts.ensure_installed` to be taken into account ([#3134](https://github.com/LazyVim/LazyVim/issues/3134)) ([8968c9e](https://github.com/LazyVim/LazyVim/commit/8968c9e9ea76f3a7616d9e249a3c9307a75fffad)) + + +### Bug Fixes + +* **neo-tree:** correctly set up `cwd` ([#3097](https://github.com/LazyVim/LazyVim/issues/3097)) ([30ce84f](https://github.com/LazyVim/LazyVim/commit/30ce84f7a7fb4e88b47ddf2f569b2ea9b7d56717)) +* **ui:** don't lazy-load dashboard-nvim ([#3107](https://github.com/LazyVim/LazyVim/issues/3107)) ([30c9e47](https://github.com/LazyVim/LazyVim/commit/30c9e4718a127f7d5a32f11c4d8dbba6b01f9858)) + ## [10.23.0](https://github.com/LazyVim/LazyVim/compare/v10.22.0...v10.23.0) (2024-05-03) From 42010d1dfbb0ba9c74c1ec0c93c5c9db21ebee47 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 12 May 2024 16:39:00 +0200 Subject: [PATCH 16/16] fix(dot): use syntax `sh` for dotenv files. Closes #3145 --- lua/lazyvim/plugins/extras/util/dot.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/util/dot.lua b/lua/lazyvim/plugins/extras/util/dot.lua index ffc46551..d12171f5 100644 --- a/lua/lazyvim/plugins/extras/util/dot.lua +++ b/lua/lazyvim/plugins/extras/util/dot.lua @@ -35,7 +35,7 @@ return { vim.filetype.add({ extension = { rasi = "rasi", rofi = "rasi", wofi = "rasi" }, filename = { - [".env"] = "dotenv", + [".env"] = "sh", ["vifmrc"] = "vim", }, pattern = { @@ -43,7 +43,7 @@ return { [".*/mako/config"] = "dosini", [".*/kitty/.+%.conf"] = "bash", [".*/hypr/.+%.conf"] = "hyprlang", - ["%.env%.[%w_.-]+"] = "dotenv", + ["%.env%.[%w_.-]+"] = "sh", }, })