languages/bash: add filetype mappings for ash, dash and zsh

This commit is contained in:
Snoweuph 2026-04-23 22:52:51 +02:00 committed by Ching Pei Yang
commit 2592c16878
3 changed files with 9 additions and 5 deletions

View file

@ -95,15 +95,19 @@ in {
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
vim.treesitter = {
enable = true;
grammars = [cfg.treesitter.package];
# not perfect mappings, but better than none
filetypeMappings.bash = ["ash" "dash" "zsh"];
};
})
(mkIf cfg.lsp.enable {
vim.lsp = {
presets = genAttrs cfg.lsp.servers (_: {enable = true;});
servers = genAttrs cfg.lsp.servers (_: {
filetypes = ["bash" "sh" "zsh"];
filetypes = ["bash" "sh" "ash" "dash" "zsh"];
});
};
})