nvim: Add experimental nushell lsp and treesitter
HACK Added support for nushell lsp (not yet available to automatically install through mason integration) and for nushell treesitter (VERY manual installation as of right now). Will work for testing out the shell and its nvim integration but definitely has to be integrated better in the future.
This commit is contained in:
parent
78f7112c11
commit
4d886e7e6d
2 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue