feat(nvim): highlight mustache templates

nvim detects `.mustache` but ships no syntax for it, leaving Moodle templates
as plain text. `vim-mustache-handlebars` supplies syntax, indent and ftdetect,
covering the constructs the Handlebars tree-sitter grammar rejects: bare
sections, `{{{unescaped}}}`, partials and `{{< parent }}` inheritance.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015D4NsszUG7hy9ghKZ4nfhm
This commit is contained in:
2026-09-15 12:53:54 +02:00
co-authored by Claude Opus 5
parent 93a4a934eb
commit d4f326bfd9
+11
View File
@@ -248,6 +248,17 @@ in
}; };
}; };
# Moodle/Mustache templates. nvim detects `.mustache` as filetype mustache
# but ships no syntax file for it, so the buffer renders as plain text.
# Tree-sitter is not an option here: the Handlebars grammar (glimmer)
# rejects mustache's argument-less sections, `{{{unescaped}}}`, partials
# and Moodle's `{{< parent }}` inheritance, and a single error node drops
# highlighting for the rest of the file. This plugin carries the syntax,
# indent and ftdetect scripts. nixpkgs marks it unfree only because
# upstream ships no license metadata; `allowUnfree` in modules/nixos.nix
# already covers it.
extraPlugins = [ pkgs.vimPlugins.vim-mustache-handlebars ];
# Global (non-LSP) keymaps. Deliberately small — a starting point to grow. # Global (non-LSP) keymaps. Deliberately small — a starting point to grow.
keymaps = [ keymaps = [
{ mode = "n"; key = "<leader>w"; action = "<cmd>w<cr>"; options.desc = "Save"; } { mode = "n"; key = "<leader>w"; action = "<cmd>w<cr>"; options.desc = "Save"; }