diff --git a/modules/nvim.nix b/modules/nvim.nix index 1fbdaa0..391fbc4 100644 --- a/modules/nvim.nix +++ b/modules/nvim.nix @@ -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. keymaps = [ { mode = "n"; key = "w"; action = "w"; options.desc = "Save"; }