diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index b9d0dcaf..06b9e409 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "12.38.2" + ".": "12.39.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c626d98..22c46d22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## [12.39.0](https://github.com/LazyVim/LazyVim/compare/v12.38.2...v12.39.0) (2024-09-18) + + +### Features + +* **cmp:** better c-n and c-p mapping fallback. Fixes [#4414](https://github.com/LazyVim/LazyVim/issues/4414) ([86d4f14](https://github.com/LazyVim/LazyVim/commit/86d4f14bc89b2174cadde93a4f49fc83a01df642)) +* **lazygit:** allow user to override LazyVim config with custom file ([#4367](https://github.com/LazyVim/LazyVim/issues/4367)) ([41a8f3a](https://github.com/LazyVim/LazyVim/commit/41a8f3a5fb2bb84036f33764d77049cafb0adedf)) +* **persistence:** added leader-qS to select a session ([5a0122b](https://github.com/LazyVim/LazyVim/commit/5a0122b61977b5b2c392b64eb615025f49f2aef7)) +* **vscode:** make use of vscode builtin terminal ([#4392](https://github.com/LazyVim/LazyVim/issues/4392)) ([ead5955](https://github.com/LazyVim/LazyVim/commit/ead5955befe8d6e1e06877ea923c78375dcfad1e)) + + +### Bug Fixes + +* **extra:** make copilot-chat.lua fallback to the latest model ([#4411](https://github.com/LazyVim/LazyVim/issues/4411)) ([ae17b32](https://github.com/LazyVim/LazyVim/commit/ae17b321c7fc95e8c678865368ebfcac7c2e7483)) +* **grug:** grug_far -> grug.open ([#4404](https://github.com/LazyVim/LazyVim/issues/4404)) ([746ea8f](https://github.com/LazyVim/LazyVim/commit/746ea8f1e6afdad89d0fab4ad04f370cf3998f67)) +* **markdown-preview:** unknown function `mkdp#util#install` ([#4196](https://github.com/LazyVim/LazyVim/issues/4196)) ([b892861](https://github.com/LazyVim/LazyVim/commit/b892861bdee888f83401e745bda1798dc01e2c54)) +* **ocaml:** get_language_id ([#4327](https://github.com/LazyVim/LazyVim/issues/4327)) ([6dcd979](https://github.com/LazyVim/LazyVim/commit/6dcd9794b1819965eb4f3dca70a1eb3c463de3cf)) +* **omnisharp:** use Go To Definition with fzf.lua ([#4260](https://github.com/LazyVim/LazyVim/issues/4260)) ([39ca76c](https://github.com/LazyVim/LazyVim/commit/39ca76c9607a7d92aff5b97c50b7ccbf1b2d46b6)) +* **toggle:** diagnostics enable/disable. See [#4205](https://github.com/LazyVim/LazyVim/issues/4205) ([3dbace9](https://github.com/LazyVim/LazyVim/commit/3dbace941ee935c89c73fd774267043d12f57fe2)) +* **toggle:** make `diagnostics` compatible with nvim-0.9.5 ([#4205](https://github.com/LazyVim/LazyVim/issues/4205)) ([c012f85](https://github.com/LazyVim/LazyVim/commit/c012f859597c4ba3e54dd26372351098a25379cd)) +* **vue:** ensure css treesitter installed ([#4308](https://github.com/LazyVim/LazyVim/issues/4308)) ([627215a](https://github.com/LazyVim/LazyVim/commit/627215a72b7744973a778722724d07eccefa0c79)) + ## [12.38.2](https://github.com/LazyVim/LazyVim/compare/v12.38.1...v12.38.2) (2024-07-25) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 70d3657a..f7962147 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 September 18 ============================================================================== Table of Contents *LazyVim-table-of-contents* diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index f6978842..b15f7bec 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "12.38.2" -- x-release-please-version +M.version = "12.39.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions 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/plugins/coding.lua b/lua/lazyvim/plugins/coding.lua index 8b982033..8529ab20 100644 --- a/lua/lazyvim/plugins/coding.lua +++ b/lua/lazyvim/plugins/coding.lua @@ -33,6 +33,8 @@ return { mapping = cmp.mapping.preset.insert({ [""] = cmp.mapping.scroll_docs(-4), [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), + [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), [""] = cmp.mapping.complete(), [""] = LazyVim.cmp.confirm({ select = auto_select }), [""] = LazyVim.cmp.confirm({ select = true }), 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, 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 .. " ", diff --git a/lua/lazyvim/plugins/extras/lang/astro.lua b/lua/lazyvim/plugins/extras/lang/astro.lua index 1364902b..e9ff57be 100644 --- a/lua/lazyvim/plugins/extras/lang/astro.lua +++ b/lua/lazyvim/plugins/extras/lang/astro.lua @@ -17,7 +17,7 @@ return { { "nvim-treesitter/nvim-treesitter", - opts = { ensure_installed = { "astro" } }, + opts = { ensure_installed = { "astro", "css" } }, }, -- LSP Servers diff --git a/lua/lazyvim/plugins/extras/lang/markdown.lua b/lua/lazyvim/plugins/extras/lang/markdown.lua index 0934f10a..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 = { @@ -92,7 +93,7 @@ return { }, { - "MeanderingProgrammer/markdown.nvim", + "MeanderingProgrammer/render-markdown.nvim", opts = { file_types = { "markdown", "norg", "rmd", "org" }, code = { diff --git a/lua/lazyvim/plugins/extras/lang/ocaml.lua b/lua/lazyvim/plugins/extras/lang/ocaml.lua index d4485856..83f72a72 100644 --- a/lua/lazyvim/plugins/extras/lang/ocaml.lua +++ b/lua/lazyvim/plugins/extras/lang/ocaml.lua @@ -18,9 +18,14 @@ return { opts = { servers = { ocamllsp = { - get_language_id = function(_, ftype) - return language_id_of[ftype] - end, + filetypes = { + "ocaml", + "ocaml.menhir", + "ocaml.interface", + "ocaml.ocamllex", + "reason", + "dune", + }, root_dir = function(fname) return require("lspconfig.util").root_pattern( "*.opam", diff --git a/lua/lazyvim/plugins/extras/lang/omnisharp.lua b/lua/lazyvim/plugins/extras/lang/omnisharp.lua index cac9cf5b..3881e6a4 100644 --- a/lua/lazyvim/plugins/extras/lang/omnisharp.lua +++ b/lua/lazyvim/plugins/extras/lang/omnisharp.lua @@ -52,8 +52,10 @@ return { keys = { { "gd", - function() + LazyVim.has("telescope.nvim") and function() require("omnisharp_extended").telescope_lsp_definitions() + end or function() + require("omnisharp_extended").lsp_definitions() end, desc = "Goto Definition", }, diff --git a/lua/lazyvim/plugins/extras/lang/vue.lua b/lua/lazyvim/plugins/extras/lang/vue.lua index 088ce6a9..85f47772 100644 --- a/lua/lazyvim/plugins/extras/lang/vue.lua +++ b/lua/lazyvim/plugins/extras/lang/vue.lua @@ -11,7 +11,7 @@ return { { "nvim-treesitter/nvim-treesitter", - opts = { ensure_installed = { "vue" } }, + opts = { ensure_installed = { "vue", "css" } }, }, -- Add LSP servers diff --git a/lua/lazyvim/plugins/extras/vscode.lua b/lua/lazyvim/plugins/extras/vscode.lua index 98a22205..a272d2ce 100644 --- a/lua/lazyvim/plugins/extras/vscode.lua +++ b/lua/lazyvim/plugins/extras/vscode.lua @@ -33,11 +33,15 @@ vim.api.nvim_create_autocmd("User", { pattern = "LazyVimKeymapsDefaults", callback = function() vim.keymap.set("n", "", "Find") - vim.keymap.set("n", "/", [[call VSCodeNotify('workbench.action.findInFiles')]]) - vim.keymap.set("n", "ss", [[call VSCodeNotify('workbench.action.gotoSymbol')]]) + vim.keymap.set("n", "/", [[lua require('vscode').action('workbench.action.findInFiles')]]) + vim.keymap.set("n", "ss", [[lua require('vscode').action('workbench.action.gotoSymbol')]]) end, }) +function LazyVim.terminal() + require("vscode").action("workbench.action.terminal.toggleTerminal") +end + return { { "LazyVim/LazyVim", 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" }, }, 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") 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() diff --git a/lua/lazyvim/util/toggle.lua b/lua/lazyvim/util/toggle.lua index 4e0ba494..46e92c78 100644 --- a/lua/lazyvim/util/toggle.lua +++ b/lua/lazyvim/util/toggle.lua @@ -127,9 +127,25 @@ M.number = M.wrap({ M.diagnostics = M.wrap({ name = "Diagnostics", get = function() - return vim.diagnostic.is_enabled and vim.diagnostic.is_enabled() + local enabled = false + if vim.diagnostic.is_enabled then + enabled = vim.diagnostic.is_enabled() + elseif vim.diagnostic.is_disabled then + enabled = not vim.diagnostic.is_disabled() + end + return enabled + end, + set = function(state) + if vim.fn.has("nvim-0.10") == 0 then + if state then + pcall(vim.diagnostic.enable) + else + pcall(vim.diagnostic.disable) + end + else + vim.diagnostic.enable(state) + end end, - set = vim.diagnostic.enable, }) M.inlay_hints = M.wrap({