mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-24 05:21:07 +00:00
Merge branch 'LazyVim:main' into main
This commit is contained in:
commit
04b97e72e7
29 changed files with 270 additions and 212 deletions
2
.github/.release-please-manifest.json
vendored
2
.github/.release-please-manifest.json
vendored
|
|
@ -1,3 +1,3 @@
|
||||||
{
|
{
|
||||||
".": "15.13.0"
|
".": "15.14.0"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
26
CHANGELOG.md
26
CHANGELOG.md
|
|
@ -1,5 +1,31 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [15.14.0](https://github.com/LazyVim/LazyVim/compare/v15.13.0...v15.14.0) (2026-03-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **bufferline:** add <leader>bj keymap for BufferLinePick ([#6968](https://github.com/LazyVim/LazyVim/issues/6968)) ([a50072f](https://github.com/LazyVim/LazyVim/commit/a50072fa16cfc1f00b1ae282150bc667f1d1e096))
|
||||||
|
* **dap:** close dap-float window with `q`. ([#6884](https://github.com/LazyVim/LazyVim/issues/6884)) ([87c0027](https://github.com/LazyVim/LazyVim/commit/87c002789220d922bb94637c690b444bd1ba5611))
|
||||||
|
* **treesitter:** support query table in treesitter-textobjects mappings ([#6736](https://github.com/LazyVim/LazyVim/issues/6736)) ([42c9f71](https://github.com/LazyVim/LazyVim/commit/42c9f7152b9bd1a4f739b115390370c208dc2a55))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **editor.overseer:** migrate to v2 ([#6907](https://github.com/LazyVim/LazyVim/issues/6907)) ([27824d7](https://github.com/LazyVim/LazyVim/commit/27824d79a952c54cd9d93c85a699543e4a031dd4))
|
||||||
|
* **fzf:** correct git_diff description from 'hunks' to 'files' ([#6983](https://github.com/LazyVim/LazyVim/issues/6983)) ([e77d4ab](https://github.com/LazyVim/LazyVim/commit/e77d4ab0d6574efb7142ec40f4f5dcff750a3ee9))
|
||||||
|
* **lang.clang:** fix `clangd_extensions.nvim` ([#6804](https://github.com/LazyVim/LazyVim/issues/6804)) ([730b691](https://github.com/LazyVim/LazyVim/commit/730b69114d56834f4499fd3e5aecf18920234c39))
|
||||||
|
* **leap:** update urls to new leap.nvim repo. Fixes [#6958](https://github.com/LazyVim/LazyVim/issues/6958) ([244af66](https://github.com/LazyVim/LazyVim/commit/244af66f8b4e376d60c6604f9b3fd758165f5799))
|
||||||
|
* **news:** resolve news.txt from $VIMRUNTIME first ([60fea62](https://github.com/LazyVim/LazyVim/commit/60fea6236e342e1f4aa34d078461746d5f587c74)), closes [#7019](https://github.com/LazyVim/LazyVim/issues/7019)
|
||||||
|
* **python:** set venv-selector.nvim override_notify = false ([#6936](https://github.com/LazyVim/LazyVim/issues/6936)) ([b2917bd](https://github.com/LazyVim/LazyVim/commit/b2917bd3bfe61c40e686f5a2c20f540430945b73))
|
||||||
|
* **terminal:** add -NoProfile to powershell shellcmdflag ([#6757](https://github.com/LazyVim/LazyVim/issues/6757)) ([a507822](https://github.com/LazyVim/LazyVim/commit/a507822c0f67df661d1411f9274a65ca9cc832f5))
|
||||||
|
* **terminal:** partially revert previous mappings ([#6770](https://github.com/LazyVim/LazyVim/issues/6770)) ([c64a617](https://github.com/LazyVim/LazyVim/commit/c64a61734fc9d45470a72603395c02137802bc6f))
|
||||||
|
* **treesitter:** fix `]c` textobject mappings when in diff mode ([#6911](https://github.com/LazyVim/LazyVim/issues/6911)) ([16713e6](https://github.com/LazyVim/LazyVim/commit/16713e6e1200eb90ad4b4a394bb7254fb5612484))
|
||||||
|
* **treesitter:** remove deleted jsonc parser ([#6848](https://github.com/LazyVim/LazyVim/issues/6848)) ([92607e7](https://github.com/LazyVim/LazyVim/commit/92607e79e09a2761d930877a09edc00438b97fc3))
|
||||||
|
* **util.lsp:** `LazyVim.lsp.execute` only request single client ([#6904](https://github.com/LazyVim/LazyVim/issues/6904)) ([a4e19e9](https://github.com/LazyVim/LazyVim/commit/a4e19e9c9c939c1a3fc2f30ffefe37311d3ecadf))
|
||||||
|
* **util.lsp:** pass `formatters_by_ft` to `opts` ([#6894](https://github.com/LazyVim/LazyVim/issues/6894)) ([03f1293](https://github.com/LazyVim/LazyVim/commit/03f1293e33541073288f23abdaf581a8e0dec4c4))
|
||||||
|
* **vtsls:** remove redundant deno logic, upstreamed in `nvim-lspconfig` ([#7011](https://github.com/LazyVim/LazyVim/issues/7011)) ([8652c95](https://github.com/LazyVim/LazyVim/commit/8652c9570377678a78ecb19dbd33695e0e4ec4fc))
|
||||||
|
|
||||||
## [15.13.0](https://github.com/LazyVim/LazyVim/compare/v15.12.2...v15.13.0) (2025-11-01)
|
## [15.13.0](https://github.com/LazyVim/LazyVim/compare/v15.12.2...v15.13.0) (2025-11-01)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = {
|
pattern = {
|
||||||
"PlenaryTestPopup",
|
"PlenaryTestPopup",
|
||||||
"checkhealth",
|
"checkhealth",
|
||||||
|
"dap-float",
|
||||||
"dbout",
|
"dbout",
|
||||||
"gitsigns-blame",
|
"gitsigns-blame",
|
||||||
"grug-far",
|
"grug-far",
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util")
|
||||||
---@class LazyVimConfig: LazyVimOptions
|
---@class LazyVimConfig: LazyVimOptions
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.version = "15.13.0" -- x-release-please-version
|
M.version = "15.14.0" -- x-release-please-version
|
||||||
LazyVim.config = M
|
LazyVim.config = M
|
||||||
|
|
||||||
---@class LazyVimOptions
|
---@class LazyVimOptions
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,7 @@ return {
|
||||||
{ path = "LazyVim", words = { "LazyVim" } },
|
{ path = "LazyVim", words = { "LazyVim" } },
|
||||||
{ path = "snacks.nvim", words = { "Snacks" } },
|
{ path = "snacks.nvim", words = { "Snacks" } },
|
||||||
{ path = "lazy.nvim", words = { "LazyVim" } },
|
{ path = "lazy.nvim", words = { "LazyVim" } },
|
||||||
|
{ path = "nvim-lspconfig", words = { "lspconfig.settings" } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -70,60 +70,58 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
vim.g.ai_cmp
|
vim.g.ai_cmp and {
|
||||||
and {
|
-- copilot cmp source
|
||||||
-- copilot cmp source
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
optional = true,
|
||||||
|
dependencies = { -- this will only be evaluated if nvim-cmp is enabled
|
||||||
{
|
{
|
||||||
"hrsh7th/nvim-cmp",
|
"zbirenbaum/copilot-cmp",
|
||||||
optional = true,
|
opts = {},
|
||||||
dependencies = { -- this will only be evaluated if nvim-cmp is enabled
|
config = function(_, opts)
|
||||||
|
local copilot_cmp = require("copilot_cmp")
|
||||||
|
copilot_cmp.setup(opts)
|
||||||
|
-- attach cmp source whenever copilot attaches
|
||||||
|
-- fixes lazy-loading issues with the copilot cmp source
|
||||||
|
Snacks.util.lsp.on({ name = "copilot" }, function()
|
||||||
|
copilot_cmp._on_insert_enter({})
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
specs = {
|
||||||
{
|
{
|
||||||
"zbirenbaum/copilot-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
opts = {},
|
optional = true,
|
||||||
config = function(_, opts)
|
---@param opts cmp.ConfigSchema
|
||||||
local copilot_cmp = require("copilot_cmp")
|
opts = function(_, opts)
|
||||||
copilot_cmp.setup(opts)
|
table.insert(opts.sources, 1, {
|
||||||
-- attach cmp source whenever copilot attaches
|
|
||||||
-- fixes lazy-loading issues with the copilot cmp source
|
|
||||||
Snacks.util.lsp.on({ name = "copilot" }, function()
|
|
||||||
copilot_cmp._on_insert_enter({})
|
|
||||||
end)
|
|
||||||
end,
|
|
||||||
specs = {
|
|
||||||
{
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
optional = true,
|
|
||||||
---@param opts cmp.ConfigSchema
|
|
||||||
opts = function(_, opts)
|
|
||||||
table.insert(opts.sources, 1, {
|
|
||||||
name = "copilot",
|
|
||||||
group_index = 1,
|
|
||||||
priority = 100,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"saghen/blink.cmp",
|
|
||||||
optional = true,
|
|
||||||
dependencies = { "fang2hou/blink-copilot" },
|
|
||||||
opts = {
|
|
||||||
sources = {
|
|
||||||
default = { "copilot" },
|
|
||||||
providers = {
|
|
||||||
copilot = {
|
|
||||||
name = "copilot",
|
name = "copilot",
|
||||||
module = "blink-copilot",
|
group_index = 1,
|
||||||
score_offset = 100,
|
priority = 100,
|
||||||
async = true,
|
})
|
||||||
},
|
end,
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
or nil,
|
},
|
||||||
|
{
|
||||||
|
"saghen/blink.cmp",
|
||||||
|
optional = true,
|
||||||
|
dependencies = { "fang2hou/blink-copilot" },
|
||||||
|
opts = {
|
||||||
|
sources = {
|
||||||
|
default = { "copilot" },
|
||||||
|
providers = {
|
||||||
|
copilot = {
|
||||||
|
name = "copilot",
|
||||||
|
module = "blink-copilot",
|
||||||
|
score_offset = 100,
|
||||||
|
async = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
} or nil,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,8 +82,8 @@ return {
|
||||||
{ "<leader>a", "", desc = "+ai", mode = { "n", "v" } },
|
{ "<leader>a", "", desc = "+ai", mode = { "n", "v" } },
|
||||||
{
|
{
|
||||||
"<c-.>",
|
"<c-.>",
|
||||||
function() require("sidekick.cli").toggle() end,
|
function() require("sidekick.cli").focus() end,
|
||||||
desc = "Sidekick Toggle",
|
desc = "Sidekick Focus",
|
||||||
mode = { "n", "t", "i", "x" },
|
mode = { "n", "t", "i", "x" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -53,20 +53,6 @@ return {
|
||||||
cyclic = true,
|
cyclic = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
local weekdays = augend.constant.new({
|
|
||||||
elements = {
|
|
||||||
"Monday",
|
|
||||||
"Tuesday",
|
|
||||||
"Wednesday",
|
|
||||||
"Thursday",
|
|
||||||
"Friday",
|
|
||||||
"Saturday",
|
|
||||||
"Sunday",
|
|
||||||
},
|
|
||||||
word = true,
|
|
||||||
cyclic = true,
|
|
||||||
})
|
|
||||||
|
|
||||||
local months = augend.constant.new({
|
local months = augend.constant.new({
|
||||||
elements = {
|
elements = {
|
||||||
"January",
|
"January",
|
||||||
|
|
@ -86,15 +72,6 @@ return {
|
||||||
cyclic = true,
|
cyclic = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
local capitalized_boolean = augend.constant.new({
|
|
||||||
elements = {
|
|
||||||
"True",
|
|
||||||
"False",
|
|
||||||
},
|
|
||||||
word = true,
|
|
||||||
cyclic = true,
|
|
||||||
})
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
dials_by_ft = {
|
dials_by_ft = {
|
||||||
css = "css",
|
css = "css",
|
||||||
|
|
@ -116,11 +93,12 @@ return {
|
||||||
augend.integer.alias.decimal_int, -- nonnegative and negative decimal number
|
augend.integer.alias.decimal_int, -- nonnegative and negative decimal number
|
||||||
augend.integer.alias.hex, -- nonnegative hex number (0x01, 0x1a1f, etc.)
|
augend.integer.alias.hex, -- nonnegative hex number (0x01, 0x1a1f, etc.)
|
||||||
augend.date.alias["%Y/%m/%d"], -- date (2022/02/19, etc.)
|
augend.date.alias["%Y/%m/%d"], -- date (2022/02/19, etc.)
|
||||||
|
augend.constant.alias.en_weekday, -- Mon, Tue, ..., Sat, Sun
|
||||||
|
augend.constant.alias.en_weekday_full, -- Monday, Tuesday, ..., Saturday, Sunday
|
||||||
ordinal_numbers,
|
ordinal_numbers,
|
||||||
weekdays,
|
|
||||||
months,
|
months,
|
||||||
capitalized_boolean,
|
|
||||||
augend.constant.alias.bool, -- boolean value (true <-> false)
|
augend.constant.alias.bool, -- boolean value (true <-> false)
|
||||||
|
augend.constant.alias.Bool, -- boolean value (True <-> False)
|
||||||
logical_alias,
|
logical_alias,
|
||||||
},
|
},
|
||||||
vue = {
|
vue = {
|
||||||
|
|
|
||||||
|
|
@ -227,7 +227,7 @@ return {
|
||||||
{ "<leader>fR", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" },
|
{ "<leader>fR", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" },
|
||||||
-- git
|
-- git
|
||||||
{ "<leader>gc", "<cmd>FzfLua git_commits<CR>", desc = "Commits" },
|
{ "<leader>gc", "<cmd>FzfLua git_commits<CR>", desc = "Commits" },
|
||||||
{ "<leader>gd", "<cmd>FzfLua git_diff<cr>", desc = "Git Diff (hunks)" },
|
{ "<leader>gd", "<cmd>FzfLua git_diff<cr>", desc = "Git Diff (files)" },
|
||||||
{ "<leader>gl", "<cmd>FzfLua git_commits<CR>", desc = "Commits" },
|
{ "<leader>gl", "<cmd>FzfLua git_commits<CR>", desc = "Commits" },
|
||||||
{ "<leader>gs", "<cmd>FzfLua git_status<CR>", desc = "Status" },
|
{ "<leader>gs", "<cmd>FzfLua git_status<CR>", desc = "Status" },
|
||||||
{ "<leader>gS", "<cmd>FzfLua git_stash<cr>", desc = "Git Stash" },
|
{ "<leader>gS", "<cmd>FzfLua git_stash<cr>", desc = "Git Stash" },
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ return {
|
||||||
|
|
||||||
-- easily jump to any location and enhanced f/t motions for Leap
|
-- easily jump to any location and enhanced f/t motions for Leap
|
||||||
{
|
{
|
||||||
"ggandor/flit.nvim",
|
url = "https://codeberg.org/andyg/leap.nvim.git",
|
||||||
enabled = true,
|
enabled = true,
|
||||||
keys = function()
|
keys = function()
|
||||||
---@type LazyKeysSpec[]
|
---@type LazyKeysSpec[]
|
||||||
|
|
@ -17,7 +17,7 @@ return {
|
||||||
opts = { labeled_modes = "nx" },
|
opts = { labeled_modes = "nx" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ggandor/leap.nvim",
|
url = "https://codeberg.org/andyg/leap.nvim.git",
|
||||||
enabled = true,
|
enabled = true,
|
||||||
keys = {
|
keys = {
|
||||||
{ "s", mode = { "n", "x", "o" }, desc = "Leap Forward to" },
|
{ "s", mode = { "n", "x", "o" }, desc = "Leap Forward to" },
|
||||||
|
|
|
||||||
|
|
@ -8,29 +8,20 @@ return {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"stevearc/overseer.nvim",
|
"stevearc/overseer.nvim",
|
||||||
|
lazy = false, -- plugin is self-lazy-loading
|
||||||
cmd = {
|
cmd = {
|
||||||
"OverseerOpen",
|
"OverseerOpen",
|
||||||
"OverseerClose",
|
"OverseerClose",
|
||||||
"OverseerToggle",
|
"OverseerToggle",
|
||||||
"OverseerSaveBundle",
|
|
||||||
"OverseerLoadBundle",
|
|
||||||
"OverseerDeleteBundle",
|
|
||||||
"OverseerRunCmd",
|
|
||||||
"OverseerRun",
|
"OverseerRun",
|
||||||
"OverseerInfo",
|
|
||||||
"OverseerBuild",
|
|
||||||
"OverseerQuickAction",
|
|
||||||
"OverseerTaskAction",
|
"OverseerTaskAction",
|
||||||
"OverseerClearCache",
|
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
dap = false,
|
dap = false,
|
||||||
task_list = {
|
task_list = {
|
||||||
bindings = {
|
keymaps = {
|
||||||
["<C-h>"] = false,
|
|
||||||
["<C-j>"] = false,
|
["<C-j>"] = false,
|
||||||
["<C-k>"] = false,
|
["<C-k>"] = false,
|
||||||
["<C-l>"] = false,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
form = {
|
form = {
|
||||||
|
|
@ -38,11 +29,6 @@ return {
|
||||||
winblend = 0,
|
winblend = 0,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
confirm = {
|
|
||||||
win_opts = {
|
|
||||||
winblend = 0,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
task_win = {
|
task_win = {
|
||||||
win_opts = {
|
win_opts = {
|
||||||
winblend = 0,
|
winblend = 0,
|
||||||
|
|
@ -51,13 +37,9 @@ return {
|
||||||
},
|
},
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>ow", "<cmd>OverseerToggle<cr>", desc = "Task list" },
|
{ "<leader>ow", "<cmd>OverseerToggle!<cr>", desc = "Task list" },
|
||||||
{ "<leader>oo", "<cmd>OverseerRun<cr>", desc = "Run task" },
|
{ "<leader>oo", "<cmd>OverseerRun<cr>", desc = "Run task" },
|
||||||
{ "<leader>oq", "<cmd>OverseerQuickAction<cr>", desc = "Action recent task" },
|
{ "<leader>ot", "<cmd>OverseerTaskAction<cr>", desc = "Task action" },
|
||||||
{ "<leader>oi", "<cmd>OverseerInfo<cr>", desc = "Overseer Info" },
|
|
||||||
{ "<leader>ob", "<cmd>OverseerBuild<cr>", desc = "Task builder" },
|
|
||||||
{ "<leader>ot", "<cmd>OverseerTaskAction<cr>", desc = "Task action" },
|
|
||||||
{ "<leader>oc", "<cmd>OverseerClearCache<cr>", desc = "Clear cache" },
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,7 @@ return {
|
||||||
|
|
||||||
{
|
{
|
||||||
"p00f/clangd_extensions.nvim",
|
"p00f/clangd_extensions.nvim",
|
||||||
lazy = true,
|
ft = { "c", "cpp", "objc", "objcpp" },
|
||||||
config = function() end,
|
|
||||||
opts = {
|
opts = {
|
||||||
inlay_hints = {
|
inlay_hints = {
|
||||||
inline = false,
|
inline = false,
|
||||||
|
|
@ -94,13 +93,6 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
setup = {
|
|
||||||
clangd = function(_, opts)
|
|
||||||
local clangd_ext_opts = LazyVim.opts("clangd_extensions.nvim")
|
|
||||||
require("clangd_extensions").setup(vim.tbl_deep_extend("force", clangd_ext_opts or {}, { server = opts }))
|
|
||||||
return false
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@ return {
|
||||||
function()
|
function()
|
||||||
local params = vim.lsp.util.make_position_params()
|
local params = vim.lsp.util.make_position_params()
|
||||||
LazyVim.lsp.execute({
|
LazyVim.lsp.execute({
|
||||||
|
title = "toPipe",
|
||||||
|
filter = "elixirls",
|
||||||
command = "manipulatePipes:serverid",
|
command = "manipulatePipes:serverid",
|
||||||
arguments = { "toPipe", params.textDocument.uri, params.position.line, params.position.character },
|
arguments = { "toPipe", params.textDocument.uri, params.position.line, params.position.character },
|
||||||
})
|
})
|
||||||
|
|
@ -27,6 +29,8 @@ return {
|
||||||
function()
|
function()
|
||||||
local params = vim.lsp.util.make_position_params()
|
local params = vim.lsp.util.make_position_params()
|
||||||
LazyVim.lsp.execute({
|
LazyVim.lsp.execute({
|
||||||
|
title = "fromPipe",
|
||||||
|
filter = "elixirls",
|
||||||
command = "manipulatePipes:serverid",
|
command = "manipulatePipes:serverid",
|
||||||
arguments = { "fromPipe", params.textDocument.uri, params.position.line, params.position.character },
|
arguments = { "fromPipe", params.textDocument.uri, params.position.line, params.position.character },
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -38,23 +38,8 @@ return {
|
||||||
logLevel = "error",
|
logLevel = "error",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>co",
|
|
||||||
LazyVim.lsp.action["source.organizeImports"],
|
|
||||||
desc = "Organize Imports",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
ruff_lsp = {
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>co",
|
|
||||||
LazyVim.lsp.action["source.organizeImports"],
|
|
||||||
desc = "Organize Imports",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
ruff_lsp = {},
|
||||||
},
|
},
|
||||||
setup = {
|
setup = {
|
||||||
[ruff] = function()
|
[ruff] = function()
|
||||||
|
|
@ -114,6 +99,7 @@ return {
|
||||||
opts = {
|
opts = {
|
||||||
options = {
|
options = {
|
||||||
notify_user_on_venv_activation = true,
|
notify_user_on_venv_activation = true,
|
||||||
|
override_notify = false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- Call config for Python files and load the cached venv automatically
|
-- Call config for Python files and load the cached venv automatically
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ return {
|
||||||
recommended = function()
|
recommended = function()
|
||||||
return LazyVim.extras.wants({
|
return LazyVim.extras.wants({
|
||||||
ft = "r",
|
ft = "r",
|
||||||
root = { "*.R", "*.Rmd", "*qmd" },
|
root = { "*.R", "*.Rmd", "*.qmd" },
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -23,15 +23,7 @@ return {
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
opts = {
|
opts = {
|
||||||
servers = {
|
servers = {
|
||||||
svelte = {
|
svelte = {},
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>co",
|
|
||||||
LazyVim.lsp.action["source.organizeImports"],
|
|
||||||
desc = "Organize Imports",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
---@module "conform"
|
||||||
|
|
||||||
---@diagnostic disable: inject-field
|
---@diagnostic disable: inject-field
|
||||||
if lazyvim_docs then
|
if lazyvim_docs then
|
||||||
-- Enable this option to avoid conflicts with Prettier.
|
-- Enable this option to avoid conflicts with Prettier.
|
||||||
|
|
@ -8,6 +10,7 @@ end
|
||||||
local supported = {
|
local supported = {
|
||||||
"astro",
|
"astro",
|
||||||
"css",
|
"css",
|
||||||
|
"scss",
|
||||||
"graphql",
|
"graphql",
|
||||||
-- "html",
|
-- "html",
|
||||||
"javascript",
|
"javascript",
|
||||||
|
|
@ -23,24 +26,35 @@ local supported = {
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
recommended = function()
|
||||||
|
return LazyVim.extras.wants({
|
||||||
|
root = { "biome.json", "biome.jsonc" },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
|
||||||
{
|
{
|
||||||
"mason-org/mason.nvim",
|
"neovim/nvim-lspconfig",
|
||||||
opts = { ensure_installed = { "biome" } },
|
opts = {
|
||||||
|
servers = {
|
||||||
|
---@type lspconfig.settings.biome
|
||||||
|
biome = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"stevearc/conform.nvim",
|
"stevearc/conform.nvim",
|
||||||
optional = true,
|
optional = true,
|
||||||
---@param opts ConformOpts
|
---@param opts conform.setupOpts
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
opts.formatters_by_ft = opts.formatters_by_ft or {}
|
opts.formatters_by_ft = opts.formatters_by_ft or {}
|
||||||
for _, ft in ipairs(supported) do
|
for _, ft in ipairs(supported) do
|
||||||
opts.formatters_by_ft[ft] = opts.formatters_by_ft[ft] or {}
|
opts.formatters_by_ft[ft] = opts.formatters_by_ft[ft] or {}
|
||||||
table.insert(opts.formatters_by_ft[ft], "biome")
|
table.insert(opts.formatters_by_ft[ft], "biome-check")
|
||||||
end
|
end
|
||||||
|
|
||||||
opts.formatters = opts.formatters or {}
|
opts.formatters = opts.formatters or {}
|
||||||
opts.formatters.biome = {
|
opts.formatters["biome-check"] = {
|
||||||
require_cwd = true,
|
require_cwd = true,
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
|
|
@ -1,3 +1,12 @@
|
||||||
|
if lazyvim_docs then
|
||||||
|
-- LSP Server to use for TypeScript.
|
||||||
|
vim.g.lazyvim_ts_lsp = "vtsls" -- currently the default
|
||||||
|
-- Set to "tsgo" to use the new typescript-language-server implementation instead of tsserver.
|
||||||
|
vim.g.lazyvim_ts_lsp = "tsgo"
|
||||||
|
end
|
||||||
|
|
||||||
|
local lsp = vim.g.lazyvim_ts_lsp or "vtsls"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
recommended = function()
|
recommended = function()
|
||||||
return LazyVim.extras.wants({
|
return LazyVim.extras.wants({
|
||||||
|
|
@ -19,13 +28,45 @@ return {
|
||||||
opts = {
|
opts = {
|
||||||
-- make sure mason installs the server
|
-- make sure mason installs the server
|
||||||
servers = {
|
servers = {
|
||||||
--- @deprecated -- tsserver renamed to ts_ls but not yet released, so keep this for now
|
---@type lspconfig.settings.tsgo
|
||||||
--- the proper approach is to check the nvim-lspconfig release version when it's released to determine the server name dynamically
|
tsgo = {
|
||||||
tsserver = {
|
-- explicitly add default filetypes, so that we can extend
|
||||||
enabled = false,
|
-- them in related extras
|
||||||
},
|
filetypes = {
|
||||||
ts_ls = {
|
"javascript",
|
||||||
enabled = false,
|
"javascriptreact",
|
||||||
|
"javascript.jsx",
|
||||||
|
"typescript",
|
||||||
|
"typescriptreact",
|
||||||
|
"typescript.tsx",
|
||||||
|
},
|
||||||
|
settings = {
|
||||||
|
typescript = {
|
||||||
|
inlayHints = {
|
||||||
|
parameterNames = {
|
||||||
|
enabled = "literals",
|
||||||
|
suppressWhenArgumentMatchesName = true,
|
||||||
|
},
|
||||||
|
parameterTypes = { enabled = true },
|
||||||
|
variableTypes = { enabled = true },
|
||||||
|
propertyDeclarationTypes = { enabled = true },
|
||||||
|
functionLikeReturnTypes = { enabled = true },
|
||||||
|
enumMemberValues = { enabled = true },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>cu",
|
||||||
|
LazyVim.lsp.action["source.removeUnused.ts"],
|
||||||
|
desc = "Remove unused imports",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>cD",
|
||||||
|
LazyVim.lsp.action["source.fixAll.ts"],
|
||||||
|
desc = "Fix all diagnostics",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
vtsls = {
|
vtsls = {
|
||||||
-- explicitly add default filetypes, so that we can extend
|
-- explicitly add default filetypes, so that we can extend
|
||||||
|
|
@ -90,11 +131,6 @@ return {
|
||||||
end,
|
end,
|
||||||
desc = "File References",
|
desc = "File References",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"<leader>co",
|
|
||||||
LazyVim.lsp.action["source.organizeImports"],
|
|
||||||
desc = "Organize Imports",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"<leader>cM",
|
"<leader>cM",
|
||||||
LazyVim.lsp.action["source.addMissingImports.ts"],
|
LazyVim.lsp.action["source.addMissingImports.ts"],
|
||||||
|
|
@ -113,7 +149,11 @@ return {
|
||||||
{
|
{
|
||||||
"<leader>cV",
|
"<leader>cV",
|
||||||
function()
|
function()
|
||||||
LazyVim.lsp.execute({ command = "typescript.selectTypeScriptVersion" })
|
LazyVim.lsp.execute({
|
||||||
|
title = "Select TypeScript Version",
|
||||||
|
filter = "vtsls",
|
||||||
|
command = "typescript.selectTypeScriptVersion",
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
desc = "Select TS workspace version",
|
desc = "Select TS workspace version",
|
||||||
},
|
},
|
||||||
|
|
@ -132,28 +172,6 @@ return {
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
vtsls = function(_, opts)
|
vtsls = function(_, opts)
|
||||||
if vim.lsp.config.denols and vim.lsp.config.vtsls then
|
|
||||||
---@param server string
|
|
||||||
local resolve = function(server)
|
|
||||||
local markers, root_dir = vim.lsp.config[server].root_markers, vim.lsp.config[server].root_dir
|
|
||||||
vim.lsp.config(server, {
|
|
||||||
root_dir = function(bufnr, on_dir)
|
|
||||||
local is_deno = vim.fs.root(bufnr, { "deno.json", "deno.jsonc" }) ~= nil
|
|
||||||
if is_deno == (server == "denols") then
|
|
||||||
if root_dir then
|
|
||||||
return root_dir(bufnr, on_dir)
|
|
||||||
elseif type(markers) == "table" then
|
|
||||||
local root = vim.fs.root(bufnr, markers)
|
|
||||||
return root and on_dir(root)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
resolve("denols")
|
|
||||||
resolve("vtsls")
|
|
||||||
end
|
|
||||||
|
|
||||||
Snacks.util.lsp.on({ name = "vtsls" }, function(buffer, client)
|
Snacks.util.lsp.on({ name = "vtsls" }, function(buffer, client)
|
||||||
client.commands["_typescript.moveToFileRefactoring"] = function(command, ctx)
|
client.commands["_typescript.moveToFileRefactoring"] = function(command, ctx)
|
||||||
---@type string, string, lsp.Range
|
---@type string, string, lsp.Range
|
||||||
|
|
@ -212,6 +230,17 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
opts = function(_, opts)
|
||||||
|
local servers = { "tsserver", "ts_ls", "vtsls", "tsgo", lsp }
|
||||||
|
for _, server in ipairs(servers) do
|
||||||
|
opts.servers[server] = opts.servers[server] or {}
|
||||||
|
opts.servers[server].enabled = server == lsp
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
optional = true,
|
optional = true,
|
||||||
|
|
@ -24,6 +24,8 @@ return {
|
||||||
local buf_name = vim.api.nvim_buf_get_name(0)
|
local buf_name = vim.api.nvim_buf_get_name(0)
|
||||||
local file_name = vim.fn.fnamemodify(buf_name, ":t")
|
local file_name = vim.fn.fnamemodify(buf_name, ":t")
|
||||||
LazyVim.lsp.execute({
|
LazyVim.lsp.execute({
|
||||||
|
title = "Pin Main",
|
||||||
|
filter = "tinymist",
|
||||||
command = "tinymist.pinMain",
|
command = "tinymist.pinMain",
|
||||||
arguments = { buf_name },
|
arguments = { buf_name },
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- disable snacks scroll when mini-indentscope is enabled
|
-- disable snacks scope when mini-indentscope is enabled
|
||||||
{
|
{
|
||||||
"snacks.nvim",
|
"snacks.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ return {
|
||||||
-- lspconfig
|
-- lspconfig
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
event = "LazyFile",
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"mason.nvim",
|
"mason.nvim",
|
||||||
{ "mason-org/mason-lspconfig.nvim", config = function() end },
|
{ "mason-org/mason-lspconfig.nvim", config = function() end },
|
||||||
|
|
@ -99,6 +99,12 @@ return {
|
||||||
desc = "Next Reference", enabled = function() return Snacks.words.is_enabled() end },
|
desc = "Next Reference", enabled = function() return Snacks.words.is_enabled() end },
|
||||||
{ "<a-p>", function() Snacks.words.jump(-vim.v.count1, true) end, has = "documentHighlight",
|
{ "<a-p>", function() Snacks.words.jump(-vim.v.count1, true) end, has = "documentHighlight",
|
||||||
desc = "Prev Reference", enabled = function() return Snacks.words.is_enabled() end },
|
desc = "Prev Reference", enabled = function() return Snacks.words.is_enabled() end },
|
||||||
|
{
|
||||||
|
"<leader>co",
|
||||||
|
LazyVim.lsp.action["source.organizeImports"],
|
||||||
|
desc = "Organize Imports",
|
||||||
|
code_action = "source.organizeImports",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
stylua = { enabled = false },
|
stylua = { enabled = false },
|
||||||
|
|
@ -150,7 +156,7 @@ return {
|
||||||
return ret
|
return ret
|
||||||
end,
|
end,
|
||||||
---@param opts PluginLspOpts
|
---@param opts PluginLspOpts
|
||||||
config = vim.schedule_wrap(function(_, opts)
|
config = function(_, opts)
|
||||||
-- setup autoformat
|
-- setup autoformat
|
||||||
LazyVim.format.register(LazyVim.lsp.formatter())
|
LazyVim.format.register(LazyVim.lsp.formatter())
|
||||||
|
|
||||||
|
|
@ -259,7 +265,7 @@ return {
|
||||||
automatic_enable = { exclude = mason_exclude },
|
automatic_enable = { exclude = mason_exclude },
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end),
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- cmdline tools and lsp servers
|
-- cmdline tools and lsp servers
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ local M = {}
|
||||||
---@type LazyKeysLspSpec[]|nil
|
---@type LazyKeysLspSpec[]|nil
|
||||||
M._keys = {}
|
M._keys = {}
|
||||||
|
|
||||||
---@alias LazyKeysLspSpec LazyKeysSpec|{has?:string|string[], enabled?:fun():boolean}
|
---@alias LazyKeysLspSpec LazyKeysSpec|{has?:string|string[], enabled?:(fun():boolean), code_action?:string}
|
||||||
---@alias LazyKeysLsp LazyKeys|{has?:string|string[], enabled?:fun():boolean}
|
---@alias LazyKeysLsp LazyKeys|{has?:string|string[], code_action?:string, enabled?:fun():boolean}
|
||||||
|
|
||||||
---@deprecated
|
---@deprecated
|
||||||
---@return LazyKeysLspSpec[]
|
---@return LazyKeysLspSpec[]
|
||||||
|
|
@ -44,7 +44,41 @@ function M.set(filter, spec)
|
||||||
for _, keys in pairs(Keys.resolve(spec)) do
|
for _, keys in pairs(Keys.resolve(spec)) do
|
||||||
---@cast keys LazyKeysLsp
|
---@cast keys LazyKeysLsp
|
||||||
local filters = {} ---@type vim.lsp.get_clients.Filter[]
|
local filters = {} ---@type vim.lsp.get_clients.Filter[]
|
||||||
if keys.has then
|
if keys.code_action then
|
||||||
|
filter = vim.tbl_extend("force", vim.deepcopy(filter), { method = "textDocument/codeAction" })
|
||||||
|
filters[#filters + 1] = filter
|
||||||
|
|
||||||
|
---@param kinds? string[]
|
||||||
|
local function has(kinds)
|
||||||
|
for _, k in ipairs(kinds or {}) do
|
||||||
|
if type(k) == "string" and vim.startswith(k, keys.code_action) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local enabled = keys.enabled
|
||||||
|
keys.enabled = function()
|
||||||
|
if type(enabled) == "function" and not enabled() then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
local clients = vim.lsp.get_clients(filter)
|
||||||
|
for _, client in ipairs(clients) do
|
||||||
|
-- check server cababilities first
|
||||||
|
if has(vim.tbl_get(client, "server_capabilities", "codeActionProvider", "codeActionKinds")) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
-- check dynamic capabilities
|
||||||
|
local regs = client.dynamic_capabilities:get("codeActionProvider")
|
||||||
|
for _, reg in ipairs(regs or {}) do
|
||||||
|
if has(vim.tbl_get(reg, "registerOptions", "codeActionKinds")) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
elseif keys.has then
|
||||||
local methods = type(keys.has) == "string" and { keys.has } or keys.has --[[@as string[] ]]
|
local methods = type(keys.has) == "string" and { keys.has } or keys.has --[[@as string[] ]]
|
||||||
for _, method in ipairs(methods) do
|
for _, method in ipairs(methods) do
|
||||||
method = method:find("/") and method or ("textDocument/" .. method)
|
method = method:find("/") and method or ("textDocument/" .. method)
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,6 @@ return {
|
||||||
"javascript",
|
"javascript",
|
||||||
"jsdoc",
|
"jsdoc",
|
||||||
"json",
|
"json",
|
||||||
"jsonc",
|
|
||||||
"lua",
|
"lua",
|
||||||
"luadoc",
|
"luadoc",
|
||||||
"luap",
|
"luap",
|
||||||
|
|
@ -181,15 +180,16 @@ return {
|
||||||
local desc = table.concat(parts, " or ")
|
local desc = table.concat(parts, " or ")
|
||||||
desc = (key:sub(1, 1) == "[" and "Prev " or "Next ") .. desc
|
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")
|
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
|
vim.keymap.set({ "n", "x", "o" }, key, function()
|
||||||
vim.keymap.set({ "n", "x", "o" }, key, function()
|
if vim.wo.diff and key:find("[cC]") then
|
||||||
require("nvim-treesitter-textobjects.move")[method](query, "textobjects")
|
return vim.cmd("normal! " .. key)
|
||||||
end, {
|
end
|
||||||
buffer = buf,
|
require("nvim-treesitter-textobjects.move")[method](query, "textobjects")
|
||||||
desc = desc,
|
end, {
|
||||||
silent = true,
|
buffer = buf,
|
||||||
})
|
desc = desc,
|
||||||
end
|
silent = true,
|
||||||
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ return {
|
||||||
{ "]b", "<cmd>BufferLineCycleNext<cr>", desc = "Next Buffer" },
|
{ "]b", "<cmd>BufferLineCycleNext<cr>", desc = "Next Buffer" },
|
||||||
{ "[B", "<cmd>BufferLineMovePrev<cr>", desc = "Move buffer prev" },
|
{ "[B", "<cmd>BufferLineMovePrev<cr>", desc = "Move buffer prev" },
|
||||||
{ "]B", "<cmd>BufferLineMoveNext<cr>", desc = "Move buffer next" },
|
{ "]B", "<cmd>BufferLineMoveNext<cr>", desc = "Move buffer next" },
|
||||||
|
{ "<leader>bj", "<cmd>BufferLinePick<cr>", desc = "Pick Buffer" },
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
options = {
|
options = {
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ function M.get()
|
||||||
if root then
|
if root then
|
||||||
LazyVim.walk(root, function(path, name, type)
|
LazyVim.walk(root, function(path, name, type)
|
||||||
if (type == "file" or type == "link") and name:match("%.lua$") then
|
if (type == "file" or type == "link") and name:match("%.lua$") then
|
||||||
name = path:sub(#root + 2, -5):gsub("/", ".")
|
name = path:sub(#root + 2, -5):gsub("/", "."):gsub("%.init$", "")
|
||||||
local ok, extra = pcall(M.get_extra, source, source.module .. "." .. name)
|
local ok, extra = pcall(M.get_extra, source, source.module .. "." .. name)
|
||||||
if ok then
|
if ok then
|
||||||
extras[#extras + 1] = extra
|
extras[#extras + 1] = extra
|
||||||
|
|
|
||||||
|
|
@ -35,18 +35,14 @@ end
|
||||||
|
|
||||||
---@param opts? lsp.Client.format
|
---@param opts? lsp.Client.format
|
||||||
function M.format(opts)
|
function M.format(opts)
|
||||||
opts = vim.tbl_deep_extend(
|
opts = vim.tbl_deep_extend("force", {}, opts or {}, LazyVim.opts("nvim-lspconfig").format or {})
|
||||||
"force",
|
|
||||||
{},
|
|
||||||
opts or {},
|
|
||||||
LazyVim.opts("nvim-lspconfig").format or {},
|
|
||||||
LazyVim.opts("conform.nvim").format or {}
|
|
||||||
)
|
|
||||||
local ok, conform = pcall(require, "conform")
|
local ok, conform = pcall(require, "conform")
|
||||||
-- use conform for formatting with LSP when available,
|
-- use conform for formatting with LSP when available,
|
||||||
-- since it has better format diffing
|
-- since it has better format diffing
|
||||||
if ok then
|
if ok then
|
||||||
opts.formatters = {}
|
-- It should be `nil`, otherwise it doesn't fetch options from `formatters_by_ft`,
|
||||||
|
-- see https://github.com/stevearc/conform.nvim/blob/5420c4b5ea0aeb99c09cfbd4fd0b70d257b44f25/lua/conform/init.lua#L417-L418
|
||||||
|
opts.formatters = nil
|
||||||
conform.format(opts)
|
conform.format(opts)
|
||||||
else
|
else
|
||||||
vim.lsp.buf.format(opts)
|
vim.lsp.buf.format(opts)
|
||||||
|
|
@ -70,9 +66,18 @@ M.action = setmetatable({}, {
|
||||||
---@class LspCommand: lsp.ExecuteCommandParams
|
---@class LspCommand: lsp.ExecuteCommandParams
|
||||||
---@field open? boolean
|
---@field open? boolean
|
||||||
---@field handler? lsp.Handler
|
---@field handler? lsp.Handler
|
||||||
|
---@field filter? string|vim.lsp.get_clients.Filter
|
||||||
|
---@field title? string
|
||||||
|
|
||||||
---@param opts LspCommand
|
---@param opts LspCommand
|
||||||
function M.execute(opts)
|
function M.execute(opts)
|
||||||
|
local filter = opts.filter or {}
|
||||||
|
filter = type(filter) == "string" and { name = filter } or filter
|
||||||
|
local buf = vim.api.nvim_get_current_buf()
|
||||||
|
|
||||||
|
---@cast filter vim.lsp.get_clients.Filter
|
||||||
|
local client = vim.lsp.get_clients(LazyVim.merge({}, filter, { bufnr = buf }))[1]
|
||||||
|
|
||||||
local params = {
|
local params = {
|
||||||
command = opts.command,
|
command = opts.command,
|
||||||
arguments = opts.arguments,
|
arguments = opts.arguments,
|
||||||
|
|
@ -83,7 +88,8 @@ function M.execute(opts)
|
||||||
params = params,
|
params = params,
|
||||||
})
|
})
|
||||||
else
|
else
|
||||||
return vim.lsp.buf_request(0, "workspace/executeCommand", params, opts.handler)
|
vim.list_extend(params, { title = opts.title })
|
||||||
|
return client:exec_cmd(params, { bufnr = buf }, opts.handler)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,9 @@ function M.open(file, opts)
|
||||||
end
|
end
|
||||||
file = plugin.dir .. "/" .. file
|
file = plugin.dir .. "/" .. file
|
||||||
elseif opts.rtp then
|
elseif opts.rtp then
|
||||||
file = vim.api.nvim_get_runtime_file(file, false)[1]
|
-- first check if file exists in VIMRUNTIME, then check the full runtimepath
|
||||||
|
local path = vim.env.VIMRUNTIME .. "/" .. file --[[@as string]]
|
||||||
|
file = vim.uv.fs_stat(path) and path or vim.api.nvim_get_runtime_file(file, false)[1]
|
||||||
end
|
end
|
||||||
|
|
||||||
if not file then
|
if not file then
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ M.deprecated_extras = {
|
||||||
}
|
}
|
||||||
M.renamed_extras = {
|
M.renamed_extras = {
|
||||||
["lazyvim.plugins.extras.lang.omnisharp"] = "lazyvim.plugins.extras.lang.dotnet",
|
["lazyvim.plugins.extras.lang.omnisharp"] = "lazyvim.plugins.extras.lang.dotnet",
|
||||||
|
["lazyvim.plugins.extras.formatting.biome"] = "lazyvim.plugins.extras.lang.typescript.biome",
|
||||||
}
|
}
|
||||||
|
|
||||||
M.deprecated_modules = {}
|
M.deprecated_modules = {}
|
||||||
|
|
@ -42,6 +43,7 @@ M.renames = {
|
||||||
["markdown.nvim"] = "render-markdown.nvim",
|
["markdown.nvim"] = "render-markdown.nvim",
|
||||||
["williamboman/mason.nvim"] = "mason-org/mason.nvim",
|
["williamboman/mason.nvim"] = "mason-org/mason.nvim",
|
||||||
["williamboman/mason-lspconfig.nvim"] = "mason-org/mason-lspconfig.nvim",
|
["williamboman/mason-lspconfig.nvim"] = "mason-org/mason-lspconfig.nvim",
|
||||||
|
["ggandor/leap.nvim"] = "https://codeberg.org/andyg/leap.nvim.git",
|
||||||
}
|
}
|
||||||
|
|
||||||
function M.save_core()
|
function M.save_core()
|
||||||
|
|
|
||||||
|
|
@ -77,10 +77,12 @@ describe("Extra", function()
|
||||||
it("it has no renamed plugins", function()
|
it("it has no renamed plugins", function()
|
||||||
for _, p in pairs(spec.plugins) do
|
for _, p in pairs(spec.plugins) do
|
||||||
local short_url = p[1]
|
local short_url = p[1]
|
||||||
assert(
|
if short_url then
|
||||||
not LazyVim.plugin.renames[short_url],
|
assert(
|
||||||
"Plugin " .. short_url .. " has been renamed to " .. (LazyVim.plugin.renames[short_url] or "")
|
not LazyVim.plugin.renames[short_url],
|
||||||
)
|
"Plugin " .. short_url .. " has been renamed to " .. (LazyVim.plugin.renames[short_url] or "")
|
||||||
|
)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue