mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-05-22 06:43:52 +00:00
languages/bash: add filetype mappings for ash, dash and zsh
This commit is contained in:
parent
9ff0dcb60c
commit
2592c16878
3 changed files with 9 additions and 5 deletions
|
|
@ -287,6 +287,8 @@
|
||||||
<https://github.com/nvim-treesitter/nvim-treesitter/blob/main/plugin/filetypes.lua>.
|
<https://github.com/nvim-treesitter/nvim-treesitter/blob/main/plugin/filetypes.lua>.
|
||||||
This is mostly use full for Markdown code block injections.
|
This is mostly use full for Markdown code block injections.
|
||||||
|
|
||||||
|
- Added some Tree-sitter filetype mappings for `ash`, `dash` and `zsh`.
|
||||||
|
|
||||||
- Added `vim.lsp.presets.<name>` to contain LSP configurations. This allows for
|
- Added `vim.lsp.presets.<name>` to contain LSP configurations. This allows for
|
||||||
more flexibility in nvf and reuse of LSPs across languages. Dropped
|
more flexibility in nvf and reuse of LSPs across languages. Dropped
|
||||||
`deprecatedSingleOrListOf` in favor of `listOf` for the affected LSP options.
|
`deprecatedSingleOrListOf` in favor of `listOf` for the affected LSP options.
|
||||||
|
|
|
||||||
|
|
@ -95,15 +95,19 @@ in {
|
||||||
|
|
||||||
config = mkIf cfg.enable (mkMerge [
|
config = mkIf cfg.enable (mkMerge [
|
||||||
(mkIf cfg.treesitter.enable {
|
(mkIf cfg.treesitter.enable {
|
||||||
vim.treesitter.enable = true;
|
vim.treesitter = {
|
||||||
vim.treesitter.grammars = [cfg.treesitter.package];
|
enable = true;
|
||||||
|
grammars = [cfg.treesitter.package];
|
||||||
|
# not perfect mappings, but better than none
|
||||||
|
filetypeMappings.bash = ["ash" "dash" "zsh"];
|
||||||
|
};
|
||||||
})
|
})
|
||||||
|
|
||||||
(mkIf cfg.lsp.enable {
|
(mkIf cfg.lsp.enable {
|
||||||
vim.lsp = {
|
vim.lsp = {
|
||||||
presets = genAttrs cfg.lsp.servers (_: {enable = true;});
|
presets = genAttrs cfg.lsp.servers (_: {enable = true;});
|
||||||
servers = genAttrs cfg.lsp.servers (_: {
|
servers = genAttrs cfg.lsp.servers (_: {
|
||||||
filetypes = ["bash" "sh" "zsh"];
|
filetypes = ["bash" "sh" "ash" "dash" "zsh"];
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -158,8 +158,6 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable (mkMerge [
|
config = mkIf cfg.enable (mkMerge [
|
||||||
{vim.globals.markdown_fenced_languages = ["ts=typescript"];}
|
|
||||||
|
|
||||||
(mkIf cfg.treesitter.enable {
|
(mkIf cfg.treesitter.enable {
|
||||||
vim.treesitter.enable = true;
|
vim.treesitter.enable = true;
|
||||||
vim.treesitter.grammars = [
|
vim.treesitter.grammars = [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue