diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 425d0100..27277755 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "15.12.0" + ".": "15.13.0" } diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml new file mode 100644 index 00000000..fc2ac02c --- /dev/null +++ b/.markdownlint-cli2.yaml @@ -0,0 +1,3 @@ +config: + MD013: false + MD033: false diff --git a/CHANGELOG.md b/CHANGELOG.md index ba1f2867..24045345 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,32 @@ # Changelog +## [15.13.0](https://github.com/LazyVim/LazyVim/compare/v15.12.2...v15.13.0) (2025-11-01) + + +### Features + +* **snacks:** `snacks.gh` integration. Enabled by default, unless the `util.octo` extra is enabled. ([5e981f9](https://github.com/LazyVim/LazyVim/commit/5e981f9a8cd75eb6f49756e188411037b82b8045)) + + +### Bug Fixes + +* **treesitter:** remove node requirement ([6b52a30](https://github.com/LazyVim/LazyVim/commit/6b52a3059e52eed062b6ff3f56e70cffcbf879fe)) + +## [15.12.2](https://github.com/LazyVim/LazyVim/compare/v15.12.1...v15.12.2) (2025-10-26) + + +### Bug Fixes + +* **lsp.keymaps:** make cond -> enabled work again. Closes [#6697](https://github.com/LazyVim/LazyVim/issues/6697) ([1a40162](https://github.com/LazyVim/LazyVim/commit/1a401627146c66beaeb213f66dd02662f1006e82)) + +## [15.12.1](https://github.com/LazyVim/LazyVim/compare/v15.12.0...v15.12.1) (2025-10-26) + + +### Bug Fixes + +* **fzf-lua:** LSP keymaps. Closes [#6698](https://github.com/LazyVim/LazyVim/issues/6698) ([b5ea1e9](https://github.com/LazyVim/LazyVim/commit/b5ea1e9d25202e38a47f0b03ac35cc587c80e6d7)) +* **navic:** navic attach. Closes [#6702](https://github.com/LazyVim/LazyVim/issues/6702) ([d2d0c64](https://github.com/LazyVim/LazyVim/commit/d2d0c641ed443f8d2ea9e131ec90df59ea149d0a)) + ## [15.12.0](https://github.com/LazyVim/LazyVim/compare/v15.11.0...v15.12.0) (2025-10-25) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index aaffe254..1288f75d 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 October 25 +*LazyVim.txt* LazyVim docs ============================================================================== Table of Contents *LazyVim-table-of-contents* diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index d30ea584..562a0687 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 = "15.12.0" -- x-release-please-version +M.version = "15.13.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions @@ -34,7 +34,9 @@ local defaults = { dots = "󰇘", }, ft = { - octo = "", + octo = " ", + gh = " ", + ["markdown.gh"] = " ", }, dap = { Stopped = { "󰁕 ", "DiagnosticWarn", "DapStoppedLine" }, diff --git a/lua/lazyvim/plugins/extras/ai/copilot-native.lua b/lua/lazyvim/plugins/extras/ai/copilot-native.lua index a93e077a..3c1d0230 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot-native.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot-native.lua @@ -5,7 +5,7 @@ if lazyvim_docs then end if LazyVim.has_extra("ai.copilot-native") then - if not vim.lsp.inline_completion then + if vim.fn.has("nvim-0.12") == 0 then LazyVim.error("You need Neovim >= 0.12 to use the `ai.copilot-native` extra.") return {} end diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index 8e17c671..f63716c5 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -293,10 +293,12 @@ return { servers = { -- stylua: ignore ["*"] = { - { "gd", "FzfLua lsp_definitions jump1=true ignore_current_line=true", desc = "Goto Definition", has = "definition" }, - { "gr", "FzfLua lsp_references jump1=true ignore_current_line=true", desc = "References", nowait = true }, - { "gI", "FzfLua lsp_implementations jump1=true ignore_current_line=true", desc = "Goto Implementation" }, - { "gy", "FzfLua lsp_typedefs jump1=true ignore_current_line=true", desc = "Goto T[y]pe Definition" }, + keys = { + { "gd", "FzfLua lsp_definitions jump1=true ignore_current_line=true", desc = "Goto Definition", has = "definition" }, + { "gr", "FzfLua lsp_references jump1=true ignore_current_line=true", desc = "References", nowait = true }, + { "gI", "FzfLua lsp_implementations jump1=true ignore_current_line=true", desc = "Goto Implementation" }, + { "gy", "FzfLua lsp_typedefs jump1=true ignore_current_line=true", desc = "Goto T[y]pe Definition" }, + } }, }, }, diff --git a/lua/lazyvim/plugins/extras/editor/navic.lua b/lua/lazyvim/plugins/extras/editor/navic.lua index eeac37a7..806a7bfe 100644 --- a/lua/lazyvim/plugins/extras/editor/navic.lua +++ b/lua/lazyvim/plugins/extras/editor/navic.lua @@ -7,11 +7,11 @@ return { lazy = true, init = function() vim.g.navic_silence = true + end, + opts = function() Snacks.util.lsp.on({ method = "textDocument/documentSymbol" }, function(buffer, client) require("nvim-navic").attach(client, buffer) end) - end, - opts = function() return { separator = " ", highlight = true, diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 48eea01a..6220bfdf 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -73,9 +73,13 @@ return { { "fp", function() Snacks.picker.projects() end, desc = "Projects" }, -- git { "gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (hunks)" }, - { "gD", function() Snacks.picker.git_diff({ base = "origin" }) end, desc = "Git Diff (origin)" }, + { "gD", function() Snacks.picker.git_diff({ base = "origin", group = true }) end, desc = "Git Diff (origin)" }, { "gs", function() Snacks.picker.git_status() end, desc = "Git Status" }, { "gS", function() Snacks.picker.git_stash() end, desc = "Git Stash" }, + { "gi", function() Snacks.picker.gh_issue() end, desc = "GitHub Issues (open)" }, + { "gI", function() Snacks.picker.gh_issue({ state = "all" }) end, desc = "GitHub Issues (all)" }, + { "gp", function() Snacks.picker.gh_pr() end, desc = "GitHub Pull Requests (open)" }, + { "gP", function() Snacks.picker.gh_pr({ state = "all" }) end, desc = "GitHub Pull Requests (all)" }, -- Grep { "sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" }, { "sB", function() Snacks.picker.grep_buffers() end, desc = "Grep Open Buffers" }, diff --git a/lua/lazyvim/plugins/extras/util/octo.lua b/lua/lazyvim/plugins/extras/util/octo.lua index d3316f5e..5637b8fd 100644 --- a/lua/lazyvim/plugins/extras/util/octo.lua +++ b/lua/lazyvim/plugins/extras/util/octo.lua @@ -3,6 +3,16 @@ return { -- depends on the git extra for highlighting and auto-completion of github issues/prs { import = "lazyvim.plugins.extras.lang.git" }, + { + "folke/snacks.nvim", + keys = { -- disable conflicting keymaps + { "gi", false }, + { "gI", false }, + { "gp", false }, + { "gP", false }, + }, + }, + -- Octo { "pwntester/octo.nvim", diff --git a/lua/lazyvim/plugins/init.lua b/lua/lazyvim/plugins/init.lua index 80394371..7797b047 100644 --- a/lua/lazyvim/plugins/init.lua +++ b/lua/lazyvim/plugins/init.lua @@ -7,14 +7,6 @@ if vim.fn.has("nvim-0.11.2") == 0 then vim.fn.getchar() vim.cmd([[quit]]) return {} -elseif not vim.lsp.is_enabled then - vim.schedule(function() - LazyVim.warn({ - "You're using an **old** `nightly` version of **Neovim**", - "Please update to a recent `nightly`,", - "or a stable version (`>= 0.11.2`).", - }) - end) end require("lazyvim.config").init() diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index eb882c5c..540b6c5c 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -92,13 +92,13 @@ return { { "cr", vim.lsp.buf.rename, desc = "Rename", has = "rename" }, { "cA", LazyVim.lsp.action.source, desc = "Source Action", has = "codeAction" }, { "]]", function() Snacks.words.jump(vim.v.count1) end, has = "documentHighlight", - desc = "Next Reference", cond = function() return Snacks.words.is_enabled() end }, + desc = "Next Reference", enabled = function() return Snacks.words.is_enabled() end }, { "[[", function() Snacks.words.jump(-vim.v.count1) end, has = "documentHighlight", - desc = "Prev Reference", cond = function() return Snacks.words.is_enabled() end }, + desc = "Prev Reference", enabled = function() return Snacks.words.is_enabled() end }, { "", function() Snacks.words.jump(vim.v.count1, true) end, has = "documentHighlight", - desc = "Next Reference", cond = function() return Snacks.words.is_enabled() end }, + desc = "Next Reference", enabled = function() return Snacks.words.is_enabled() end }, { "", function() Snacks.words.jump(-vim.v.count1, true) end, has = "documentHighlight", - desc = "Prev Reference", cond = function() return Snacks.words.is_enabled() end }, + desc = "Prev Reference", enabled = function() return Snacks.words.is_enabled() end }, }, }, stylua = { enabled = false }, diff --git a/lua/lazyvim/plugins/lsp/keymaps.lua b/lua/lazyvim/plugins/lsp/keymaps.lua index 8fe36647..57280055 100644 --- a/lua/lazyvim/plugins/lsp/keymaps.lua +++ b/lua/lazyvim/plugins/lsp/keymaps.lua @@ -3,8 +3,8 @@ local M = {} ---@type LazyKeysLspSpec[]|nil M._keys = {} ----@alias LazyKeysLspSpec LazyKeysSpec|{has?:string|string[], cond?:fun():boolean} ----@alias LazyKeysLsp LazyKeys|{has?:string|string[], cond?:fun():boolean} +---@alias LazyKeysLspSpec LazyKeysSpec|{has?:string|string[], enabled?:fun():boolean} +---@alias LazyKeysLsp LazyKeys|{has?:string|string[], enabled?:fun():boolean} ---@deprecated ---@return LazyKeysLspSpec[] @@ -43,24 +43,23 @@ function M.set(filter, spec) local Keys = require("lazy.core.handler.keys") for _, keys in pairs(Keys.resolve(spec)) do ---@cast keys LazyKeysLsp - if keys.cond == nil or keys.cond() then - local filters = {} ---@type vim.lsp.get_clients.Filter[] - if keys.has then - local methods = type(keys.has) == "string" and { keys.has } or keys.has --[[@as string[] ]] - for _, method in ipairs(methods) do - method = method:find("/") and method or ("textDocument/" .. method) - filters[#filters + 1] = vim.tbl_extend("force", vim.deepcopy(filter), { method = method }) - end - else - filters[#filters + 1] = filter + local filters = {} ---@type vim.lsp.get_clients.Filter[] + if keys.has then + local methods = type(keys.has) == "string" and { keys.has } or keys.has --[[@as string[] ]] + for _, method in ipairs(methods) do + method = method:find("/") and method or ("textDocument/" .. method) + filters[#filters + 1] = vim.tbl_extend("force", vim.deepcopy(filter), { method = method }) end + else + filters[#filters + 1] = filter + end - for _, f in ipairs(filters) do - local opts = Keys.opts(keys) - ---@cast opts snacks.keymap.set.Opts - opts.lsp = f - Snacks.keymap.set(keys.mode or "n", keys.lhs, keys.rhs, opts) - end + for _, f in ipairs(filters) do + local opts = Keys.opts(keys) + ---@cast opts snacks.keymap.set.Opts + opts.lsp = f + opts.enabled = keys.enabled + Snacks.keymap.set(keys.mode or "n", keys.lhs, keys.rhs, opts) end end end diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 7fee6c38..4497ff1c 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -171,8 +171,14 @@ return { for method, keymaps in pairs(moves) do for key, query in pairs(keymaps) do - local desc = query:gsub("@", ""):gsub("%..*", "") - desc = desc:sub(1, 1):upper() .. desc:sub(2) + local queries = type(query) == "table" and query or { query } + local parts = {} + for _, q in ipairs(queries) do + local part = q:gsub("@", ""):gsub("%..*", "") + part = part:sub(1, 1):upper() .. part:sub(2) + table.insert(parts, part) + end + local desc = table.concat(parts, " or ") desc = (key:sub(1, 1) == "[" and "Prev " or "Next ") .. desc desc = desc .. (key:sub(2, 2) == key:sub(2, 2):upper() and " End" or " Start") if not (vim.wo.diff and key:find("[cC]")) then diff --git a/lua/lazyvim/plugins/util.lua b/lua/lazyvim/plugins/util.lua index 0357c3fb..8d8aa220 100644 --- a/lua/lazyvim/plugins/util.lua +++ b/lua/lazyvim/plugins/util.lua @@ -23,8 +23,6 @@ return { nav_j = { "", term_nav("j"), desc = "Go to Lower Window", expr = true, mode = "t" }, nav_k = { "", term_nav("k"), desc = "Go to Upper Window", expr = true, mode = "t" }, nav_l = { "", term_nav("l"), desc = "Go to Right Window", expr = true, mode = "t" }, - hide_slash = { "", "hide", desc = "Hide Terminal", mode = { "t", "n" } }, - hide_underscore = { "", "hide", desc = "which_key_ignore", mode = { "t", "n" } }, }, }, }, diff --git a/lua/lazyvim/util/terminal.lua b/lua/lazyvim/util/terminal.lua index 0e1af758..4270d9c0 100644 --- a/lua/lazyvim/util/terminal.lua +++ b/lua/lazyvim/util/terminal.lua @@ -18,7 +18,7 @@ function M.setup(shell) -- Setting shell command flags vim.o.shellcmdflag = - "-NoLogo -NonInteractive -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues['Out-File:Encoding']='utf8';$PSStyle.OutputRendering='plaintext';Remove-Alias -Force -ErrorAction SilentlyContinue tee;" + "-NoProfile -NoLogo -NonInteractive -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues['Out-File:Encoding']='utf8';$PSStyle.OutputRendering='plaintext';Remove-Alias -Force -ErrorAction SilentlyContinue tee;" -- Setting shell redirection vim.o.shellredir = '2>&1 | %%{ "$_" } | Out-File %s; exit $LastExitCode' diff --git a/lua/lazyvim/util/treesitter.lua b/lua/lazyvim/util/treesitter.lua index e8688a6f..c21908c6 100644 --- a/lua/lazyvim/util/treesitter.lua +++ b/lua/lazyvim/util/treesitter.lua @@ -80,7 +80,6 @@ function M.check() ["C compiler"] = have_cc, tar = have("tar"), curl = have("curl"), - node = have("node"), } local ok = true for _, v in pairs(ret) do