languages/yaml: add treesitter filetype mappings for yml

This commit is contained in:
Snoweuph 2026-04-23 22:55:34 +02:00 committed by Ching Pei Yang
commit e201640fc9
2 changed files with 8 additions and 3 deletions

View file

@ -287,7 +287,9 @@
<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 some Tree-sitter filetype mappings for:
- `bash` = `ash`, `dash`, `zsh`
- `yaml` = `yaml`
- 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

View file

@ -46,8 +46,11 @@ 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];
filetypeMappings.yaml = ["yml"];
};
}) })
(mkIf cfg.lsp.enable { (mkIf cfg.lsp.enable {