From 1d2c0a5cf4eb00542deb7f770e0b9816e28a7746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=20Guimar=C3=A3es?= Date: Sat, 31 Aug 2024 03:16:45 -0400 Subject: [PATCH 01/10] chore(markdown): markdown.nvim was renamed to render-markdown.nvim (#4259) As described in https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/aeb5cec617c3bd5738ab82ba2c3f9ccdc27656c2 --- lua/lazyvim/plugins/extras/lang/markdown.lua | 2 +- lua/lazyvim/util/plugin.lua | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/markdown.lua b/lua/lazyvim/plugins/extras/lang/markdown.lua index 0934f10a..05bbe661 100644 --- a/lua/lazyvim/plugins/extras/lang/markdown.lua +++ b/lua/lazyvim/plugins/extras/lang/markdown.lua @@ -92,7 +92,7 @@ return { }, { - "MeanderingProgrammer/markdown.nvim", + "MeanderingProgrammer/render-markdown.nvim", opts = { file_types = { "markdown", "norg", "rmd", "org" }, code = { diff --git a/lua/lazyvim/util/plugin.lua b/lua/lazyvim/util/plugin.lua index 1520bdce..92c75540 100644 --- a/lua/lazyvim/util/plugin.lua +++ b/lua/lazyvim/util/plugin.lua @@ -33,6 +33,7 @@ M.renames = { ["null-ls.nvim"] = "none-ls.nvim", ["romgrk/nvim-treesitter-context"] = "nvim-treesitter/nvim-treesitter-context", ["glepnir/dashboard-nvim"] = "nvimdev/dashboard-nvim", + ["markdown.nvim"] = "render-markdown.nvim", } function M.save_core() From 393b7e4f4615d4a34db213d3aa4ad3803f6df9c3 Mon Sep 17 00:00:00 2001 From: folke Date: Sat, 31 Aug 2024 07:17:40 +0000 Subject: [PATCH 02/10] 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 70d3657a..902f7a94 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 July 25 +*LazyVim.txt* For Neovim Last change: 2024 August 31 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 41a8f3a5fb2bb84036f33764d77049cafb0adedf Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Sat, 31 Aug 2024 10:18:20 +0300 Subject: [PATCH 03/10] feat(lazygit): allow user to override LazyVim config with custom file (#4367) ## Description This takes into consideration an additional file, if it exists, to extend `LG_CONFIG_FILE` environment variable, so that users can overwrite easier default LazyVim options set for lazygit in `lazygit-theme.yml`. It's not desirable to directly change `lazygit-theme.yml` as the values are hardcoded and regenerated upon colorscheme change. ## Related Issue(s) Fixes #4364. Ideally, the problem about `nvim-remote` on Windows should be fixed on lazygit's side, so this is just kind of a hotfix in the meantime. Feel free to disregard this if not desirable. ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/config/options.lua | 5 ++++- lua/lazyvim/util/lazygit.lua | 8 ++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index a8d512fc..81b5f081 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -20,9 +20,12 @@ vim.g.root_spec = { "lsp", { ".git", "lua" }, "cwd" } -- LazyVim automatically configures lazygit: -- * theme, based on the active colorscheme. --- * editorPreset to nvim-remote +-- * editPreset to nvim-remote -- * enables nerd font icons -- Set to false to disable. +-- Set the options you want to override in `~/.config/lazygit/custom.yml` +-- WARN: on Windows you might want to set `editPreset: "nvim"` due to +-- this issue https://github.com/jesseduffield/lazygit/issues/3467 vim.g.lazygit_config = true -- Options for the LazyVim statuscolumn diff --git a/lua/lazyvim/util/lazygit.lua b/lua/lazyvim/util/lazygit.lua index 2532ad08..ff96c85c 100644 --- a/lua/lazyvim/util/lazygit.lua +++ b/lua/lazyvim/util/lazygit.lua @@ -70,6 +70,10 @@ function M.open(opts) if ok then M.config_dir = lines[1] vim.env.LG_CONFIG_FILE = LazyVim.norm(M.config_dir .. "/config.yml" .. "," .. M.theme_path) + local custom_config = LazyVim.norm(M.config_dir .. "/custom.yml") + if vim.uv.fs_stat(custom_config) and vim.uv.fs_stat(custom_config).type == "file" then + vim.env.LG_CONFIG_FILE = vim.env.LG_CONFIG_FILE .. "," .. custom_config + end else ---@diagnostic disable-next-line: cast-type-mismatch ---@cast lines string @@ -130,9 +134,9 @@ gui: ---@type string[] local lines = {} for k, v in pairs(theme) do - lines[#lines + 1] = (" %s:"):format(k) + lines[#lines + 1] = (" %s:"):format(k) for _, c in ipairs(v) do - lines[#lines + 1] = (" - %q"):format(c) + lines[#lines + 1] = (" - %q"):format(c) end end config = config .. table.concat(lines, "\n") From 5a0122b61977b5b2c392b64eb615025f49f2aef7 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 31 Aug 2024 09:27:14 +0200 Subject: [PATCH 04/10] feat(persistence): added leader-qS to select a session --- lua/lazyvim/plugins/util.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/util.lua b/lua/lazyvim/plugins/util.lua index 16706c51..22a3e734 100644 --- a/lua/lazyvim/plugins/util.lua +++ b/lua/lazyvim/plugins/util.lua @@ -10,6 +10,7 @@ return { -- stylua: ignore keys = { { "qs", function() require("persistence").load() end, desc = "Restore Session" }, + { "qS", function() require("persistence").select() end,desc = "Select Session" }, { "ql", function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" }, { "qd", function() require("persistence").stop() end, desc = "Don't Save Current Session" }, }, From b892861bdee888f83401e745bda1798dc01e2c54 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Sat, 31 Aug 2024 10:43:48 +0300 Subject: [PATCH 05/10] fix(markdown-preview): unknown function `mkdp#util#install` (#4196) ## Description This fixes the problem when checking for updates and trying to build and the user encounters the error `unknown function mkdp#util#install`. As per https://github.com/iamcco/markdown-preview.nvim/pull/691 ## Related Issue(s) No, rather a discussion #4194 ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/markdown.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/lang/markdown.lua b/lua/lazyvim/plugins/extras/lang/markdown.lua index 05bbe661..7ecf01e8 100644 --- a/lua/lazyvim/plugins/extras/lang/markdown.lua +++ b/lua/lazyvim/plugins/extras/lang/markdown.lua @@ -76,6 +76,7 @@ return { "iamcco/markdown-preview.nvim", cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, build = function() + require("lazy").load({ plugins = { "markdown-preview.nvim" } }) vim.fn["mkdp#util#install"]() end, keys = { From c012f859597c4ba3e54dd26372351098a25379cd Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Sat, 31 Aug 2024 10:44:52 +0300 Subject: [PATCH 06/10] fix(toggle): make `diagnostics` compatible with nvim-0.9.5 (#4205) ## Description This makes `toggle.diagnostics` compatible with Neovim 0.9.5 (though not sure about the metatable callables, since `set` there accepts a boolean from `get` state). Please make whatever changes you deem necessary or disregard as a whole for a better approach I haven't been able to think of. ## Related Issue(s) Fixes #4203 ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/util/toggle.lua | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/util/toggle.lua b/lua/lazyvim/util/toggle.lua index 4e0ba494..2bf13934 100644 --- a/lua/lazyvim/util/toggle.lua +++ b/lua/lazyvim/util/toggle.lua @@ -127,9 +127,32 @@ M.number = M.wrap({ M.diagnostics = M.wrap({ name = "Diagnostics", get = function() - return vim.diagnostic.is_enabled and vim.diagnostic.is_enabled() + local enabled + if vim.diagnostic.is_enabled then + enabled = vim.diagnostic.is_enabled() + else + enabled = not vim.diagnostic.is_disabled() + end + return enabled + end, + set = function() + local enabled + if vim.diagnostic.is_enabled then + enabled = vim.diagnostic.is_enabled() + else + enabled = not vim.diagnostic.is_disabled() + end + enabled = not enabled + if vim.fn.has("nvim-0.10") == 0 then + if enabled then + pcall(vim.diagnostic.enable) + else + vim.diagnostic.disable() + end + else + vim.diagnostic.enable(enabled) + end end, - set = vim.diagnostic.enable, }) M.inlay_hints = M.wrap({ From 3dbace941ee935c89c73fd774267043d12f57fe2 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 31 Aug 2024 12:34:45 +0200 Subject: [PATCH 07/10] fix(toggle): diagnostics enable/disable. See #4205 --- lua/lazyvim/util/toggle.lua | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/lua/lazyvim/util/toggle.lua b/lua/lazyvim/util/toggle.lua index 2bf13934..46e92c78 100644 --- a/lua/lazyvim/util/toggle.lua +++ b/lua/lazyvim/util/toggle.lua @@ -127,30 +127,23 @@ M.number = M.wrap({ M.diagnostics = M.wrap({ name = "Diagnostics", get = function() - local enabled + local enabled = false if vim.diagnostic.is_enabled then enabled = vim.diagnostic.is_enabled() - else + elseif vim.diagnostic.is_disabled then enabled = not vim.diagnostic.is_disabled() end return enabled end, - set = function() - local enabled - if vim.diagnostic.is_enabled then - enabled = vim.diagnostic.is_enabled() - else - enabled = not vim.diagnostic.is_disabled() - end - enabled = not enabled + set = function(state) if vim.fn.has("nvim-0.10") == 0 then - if enabled then + if state then pcall(vim.diagnostic.enable) else - vim.diagnostic.disable() + pcall(vim.diagnostic.disable) end else - vim.diagnostic.enable(enabled) + vim.diagnostic.enable(state) end end, }) From ae17b321c7fc95e8c678865368ebfcac7c2e7483 Mon Sep 17 00:00:00 2001 From: Giovanny Gongora Date: Mon, 16 Sep 2024 08:46:52 +0200 Subject: [PATCH 08/10] fix(extra): make copilot-chat.lua fallback to the latest model (#4411) ## Description CopilotChat upgraded to gpt-4o early in August https://github.com/CopilotC-Nvim/CopilotChat.nvim/commit/2c4d2954f9b56945dc8d053903b16759d08f9f37 but the LazyVim plugin is still running with opts of gpt-4. I thought about changing model to the latest here, but I feel this means more maintainability for an option which generally is expected to point to the latest model, and the upstream opts of CopilotChat seem to keep up with that already. ## 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/copilot-chat.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/copilot-chat.lua b/lua/lazyvim/plugins/extras/coding/copilot-chat.lua index 7eb2d666..fd58b857 100644 --- a/lua/lazyvim/plugins/extras/coding/copilot-chat.lua +++ b/lua/lazyvim/plugins/extras/coding/copilot-chat.lua @@ -23,7 +23,6 @@ return { local user = vim.env.USER or "User" user = user:sub(1, 1):upper() .. user:sub(2) return { - model = "gpt-4", auto_insert_mode = true, show_help = true, question_header = " " .. user .. " ", From 746ea8f1e6afdad89d0fab4ad04f370cf3998f67 Mon Sep 17 00:00:00 2001 From: Benjamin Memisevic <132348240+MemiMem@users.noreply.github.com> Date: Mon, 16 Sep 2024 08:47:31 +0200 Subject: [PATCH 09/10] fix(grug): grug_far -> grug.open (#4404) ## Description Just a very simple fix to use the updated method in grug to set the options for the dependency. Just ran across the issue debuging search and replace on my setup (was not the issue). This is not breaking. ## Related Issue(s) N/A ## Screenshots N/A ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- 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 18ded3ae..a57d9aeb 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -137,7 +137,7 @@ return { function() local grug = require("grug-far") local ext = vim.bo.buftype == "" and vim.fn.expand("%:e") - grug.grug_far({ + grug.open({ transient = true, prefills = { filesFilter = ext and ext ~= "" and "*." .. ext or nil, From 4cb12312cfa39b38760aab6c060eefca651ab83f Mon Sep 17 00:00:00 2001 From: folke Date: Mon, 16 Sep 2024 06:47:53 +0000 Subject: [PATCH 10/10] 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 902f7a94..5c658123 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 August 31 +*LazyVim.txt* For Neovim Last change: 2024 September 16 ============================================================================== Table of Contents *LazyVim-table-of-contents*