mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 08:53:33 +02:00
feat(nushell): add minimal support (#2416)
## Description This will add minimal support for [Nushell](https://www.nushell.sh/) include lspconfig and treesitter highlight ## Additional Context Close #2164 --------- Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
This commit is contained in:
parent
502602e4a2
commit
4ef42b4578
1 changed files with 34 additions and 0 deletions
34
lua/lazyvim/plugins/extras/lang/nushell.lua
Normal file
34
lua/lazyvim/plugins/extras/lang/nushell.lua
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
return {
|
||||||
|
recommended = {
|
||||||
|
ft = "nu",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
opts = {
|
||||||
|
servers = {
|
||||||
|
nushell = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
dependencies = {
|
||||||
|
{ "nushell/tree-sitter-nu" },
|
||||||
|
},
|
||||||
|
opts = function(_, opts)
|
||||||
|
---@diagnostic disable-next-line: inject-field
|
||||||
|
require("nvim-treesitter.parsers").get_parser_configs().nu = {
|
||||||
|
install_info = {
|
||||||
|
url = "https://github.com/nushell/tree-sitter-nu",
|
||||||
|
files = { "src/parser.c" },
|
||||||
|
branch = "main",
|
||||||
|
},
|
||||||
|
filetype = "nu",
|
||||||
|
}
|
||||||
|
|
||||||
|
if type(opts.ensure_installed) == "table" then
|
||||||
|
vim.list_extend(opts.ensure_installed, { "nu" })
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue