nvim: Update nushell lsp installation
Nushell lsp is now integrated directly into the 'nu' command. This update stops mason from trying to install a 'nushell' LSP and simply activates the nu-internal LSP if it finds the correct executable instead.
This commit is contained in:
parent
3d1f925f78
commit
7cc7195f9a
2 changed files with 11 additions and 4 deletions
|
|
@ -7,9 +7,12 @@
|
|||
-- with their respective names used by lspconfig, nvim-treesitter, nvim-lint and conform.
|
||||
--
|
||||
|
||||
local nushell = { lsp = { nushell = {} }, ts = { "nu" } }
|
||||
if vim.fn.executable("nufmt") == 1 then
|
||||
nushell.format = { nu = { "nufmt" } }
|
||||
local nushell = function()
|
||||
local nushell = { ts = { "nu" } } -- nushell lsp directly built into `nu` cmd
|
||||
if vim.fn.executable("nufmt") == 1 then
|
||||
nushell.format = { nu = { "nufmt" } }
|
||||
end
|
||||
return nushell
|
||||
end
|
||||
|
||||
-- FIXME: This does not work for populating LSP config,
|
||||
|
|
@ -96,7 +99,7 @@ local languages = {
|
|||
format = { markdown = { "prettier", "injected" } },
|
||||
},
|
||||
nim = { lsp = { nim_langserver = {} }, ts = { "nim", "nim_format_string" }, format = { nim = { "nimpretty" } } },
|
||||
nu = nushell,
|
||||
nu = nushell(),
|
||||
python = {
|
||||
lsp = { basedpyright = {}, ruff = {} },
|
||||
ts = { "python" },
|
||||
|
|
|
|||
|
|
@ -83,6 +83,10 @@ local lsp = {
|
|||
end
|
||||
end
|
||||
|
||||
if vim.fn.executable("nu") == 1 then
|
||||
register("nushell")
|
||||
end
|
||||
|
||||
register("marksman", {
|
||||
filetypes = { "markdown", "quarto" },
|
||||
on_attach = function(client, _)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue