diff --git a/nvim/.config/nvim/lua/plugins/config/lsp.lua b/nvim/.config/nvim/lua/plugins/config/lsp.lua index 0670395..d46c0e0 100644 --- a/nvim/.config/nvim/lua/plugins/config/lsp.lua +++ b/nvim/.config/nvim/lua/plugins/config/lsp.lua @@ -137,6 +137,7 @@ lsp.setup({ }) local lspconfig = require("lspconfig") +lspconfig.nushell.setup({}) local python_path -- ensure python virtualenv is determined automatically on lsp start diff --git a/nvim/.config/nvim/lua/plugins/treesitter.lua b/nvim/.config/nvim/lua/plugins/treesitter.lua index 5db83dc..73953db 100644 --- a/nvim/.config/nvim/lua/plugins/treesitter.lua +++ b/nvim/.config/nvim/lua/plugins/treesitter.lua @@ -39,6 +39,20 @@ return { enable = true, enable_autocmd = false, -- since we run it as a hook from the mini.comment plugin }) + + -- treesitter parser for nushell. To fully get e.g. syntax highlight + -- working you need a highlight file too. For now I installed manually, see: + -- https://github.com/nushell/tree-sitter-nu/blob/main/installation/neovim.md + local parser_config = require("nvim-treesitter.parsers").get_parser_configs() + parser_config.nu = { + install_info = { + url = "https://github.com/nushell/tree-sitter-nu", + files = { "src/parser.c" }, + branch = "main", + }, + filetype = "nu", + } + end, event = "BufReadPost", cmd = {