mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-02-03 10:25:52 +00:00
Merge pull request #1289 from snoweuph/feature/tera
languages/tera: add syntax highlighting support for tera templating
This commit is contained in:
commit
1ba66d978b
4 changed files with 33 additions and 0 deletions
|
|
@ -96,6 +96,7 @@ isMaximal: {
|
||||||
jinja.enable = false;
|
jinja.enable = false;
|
||||||
tailwind.enable = false;
|
tailwind.enable = false;
|
||||||
svelte.enable = false;
|
svelte.enable = false;
|
||||||
|
tera.enable = false;
|
||||||
|
|
||||||
# Nim LSP is broken on Darwin and therefore
|
# Nim LSP is broken on Darwin and therefore
|
||||||
# should be disabled by default. Users may still enable
|
# should be disabled by default. Users may still enable
|
||||||
|
|
|
||||||
|
|
@ -161,6 +161,9 @@
|
||||||
|
|
||||||
- Added XML syntax highlighting, LSP support and formatting
|
- Added XML syntax highlighting, LSP support and formatting
|
||||||
|
|
||||||
|
- Added [tera](https://keats.github.io/tera/) language support (syntax
|
||||||
|
highlighting only).
|
||||||
|
|
||||||
[vagahbond](https://github.com/vagahbond): [codewindow.nvim]:
|
[vagahbond](https://github.com/vagahbond): [codewindow.nvim]:
|
||||||
https://github.com/gorbit99/codewindow.nvim
|
https://github.com/gorbit99/codewindow.nvim
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ in {
|
||||||
./helm.nix
|
./helm.nix
|
||||||
./kotlin.nix
|
./kotlin.nix
|
||||||
./html.nix
|
./html.nix
|
||||||
|
./tera.nix
|
||||||
./haskell.nix
|
./haskell.nix
|
||||||
./java.nix
|
./java.nix
|
||||||
./jinja.nix
|
./jinja.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