-
Notifications
You must be signed in to change notification settings - Fork 4
/
bash.lua
30 lines (27 loc) · 840 Bytes
/
bash.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
local generator = require("plugins.extras.langspec"):new()
-- Register the bash parser for zsh
vim.treesitter.language.register("bash", "zsh")
-- lua= vim.treesitter.language.get_filetypes("bash")
-- lua= vim.treesitter.language.get_lang("zsh")
---@type LangConfig
local conf = {
ft = { "sh", "bash", "zsh" },
parsers = { -- nvim-treesitter: language parsers
"bash",
},
cmdtools = { -- mason.nvim: cmdline tools for LSP servers, DAP servers, formatters and linters
"bash-language-server",
"shfmt",
"shellcheck", -- bashls is integrated, so no need to configure `null-ls` diagnostics
},
lsp = {
servers = { -- nvim-lspconfig: setup lspconfig servers
---@type lspconfig.options.bashls
bashls = {},
},
},
formatters = { -- conform.nvim
"shfmt",
},
}
return generator:generate(conf)