This commit is contained in:
Snoweuph 2026-01-05 20:18:23 +00:00 committed by GitHub
commit e01bb105db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 36 additions and 1 deletions

View file

@ -94,6 +94,7 @@ isMaximal: {
tailwind.enable = false;
svelte.enable = false;
tera.enable = false;
# Nim LSP is broken on Darwin and therefore
# should be disabled by default. Users may still enable

View file

@ -23,4 +23,9 @@
[ccc.nvim]: https://github.com/uga-rosa/ccc.nvim
- Added [ccc.nvim] option {option}`vim.utility.ccc.setupOpts` with the existing
hard-coded options as default values.
hard-coded options as default values
[Snoweuph](https://github.com/snoweuph):
- Added [tera](https://keats.github.io/tera/) language support (syntax highlighting only).

View file

@ -19,6 +19,7 @@ in {
./helm.nix
./kotlin.nix
./html.nix
./tera.nix
./haskell.nix
./java.nix
./json.nix

View file

@ -0,0 +1,28 @@
{
config,
pkgs,
lib,
...
}: let
inherit (lib.options) mkEnableOption;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.nvim.types) mkGrammarOption;
cfg = config.vim.languages.tera;
in {
options.vim.languages.tera = {
enable = mkEnableOption "Tera templating language support";
treesitter = {
enable = mkEnableOption "Tera treesitter" // {default = config.vim.languages.enableTreesitter;};
package = mkGrammarOption pkgs "tera";
};
};
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
]);
}