mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-01 00:25:55 +00:00
Merge c60749b9eb into ef1f22efaf
This commit is contained in:
commit
cc9d43079e
3 changed files with 30 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ in {
|
|||
./helm.nix
|
||||
./kotlin.nix
|
||||
./html.nix
|
||||
./tera.nix
|
||||
./haskell.nix
|
||||
./java.nix
|
||||
./json.nix
|
||||
|
|
|
|||
28
modules/plugins/languages/tera.nix
Normal file
28
modules/plugins/languages/tera.nix
Normal 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];
|
||||
})
|
||||
]);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue