diff --git a/nvim/.config/nvim/lua/core/languages.lua b/nvim/.config/nvim/lua/core/languages.lua index 2bd28f3..eb142fa 100644 --- a/nvim/.config/nvim/lua/core/languages.lua +++ b/nvim/.config/nvim/lua/core/languages.lua @@ -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" }, diff --git a/nvim/.config/nvim/lua/plugins/lsp.lua b/nvim/.config/nvim/lua/plugins/lsp.lua index f2e7009..e85672b 100644 --- a/nvim/.config/nvim/lua/plugins/lsp.lua +++ b/nvim/.config/nvim/lua/plugins/lsp.lua @@ -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, _)