mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-05 18:40:53 +00:00
languages/liquid: add syntax highlighting support for liquid templating
This commit is contained in:
parent
ac5cf327c8
commit
b767199273
4 changed files with 39 additions and 0 deletions
|
|
@ -105,6 +105,7 @@ isMaximal: {
|
|||
jinja.enable = false;
|
||||
tailwind.enable = false;
|
||||
svelte.enable = false;
|
||||
liquid.enable = false;
|
||||
tera.enable = false;
|
||||
twig.enable = false;
|
||||
gettext.enable = false;
|
||||
|
|
|
|||
|
|
@ -229,6 +229,9 @@
|
|||
- Added [tera](https://keats.github.io/tera/) language support (syntax
|
||||
highlighting only).
|
||||
|
||||
- Added [liquid](https://keats.github.io/tera/) language support (syntax
|
||||
highlighting only) via `languages.liquid`.
|
||||
|
||||
- Added Debugging support to `languages.odin` with
|
||||
[nvim-dap-odin](https://github.com/NANDquark/nvim-dap-odin).
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ in {
|
|||
./html.nix
|
||||
./tera.nix
|
||||
./twig.nix
|
||||
./liquid.nix
|
||||
./haskell.nix
|
||||
./java.nix
|
||||
./jinja.nix
|
||||
|
|
|
|||
34
modules/plugins/languages/liquid.nix
Normal file
34
modules/plugins/languages/liquid.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption literalExpression;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
|
||||
cfg = config.vim.languages.liquid;
|
||||
in {
|
||||
options.vim.languages.liquid = {
|
||||
enable = mkEnableOption "Liquid templating language support";
|
||||
|
||||
treesitter = {
|
||||
enable =
|
||||
mkEnableOption "Liquid treesitter"
|
||||
// {
|
||||
default = config.vim.languages.enableTreesitter;
|
||||
defaultText = literalExpression "config.vim.languages.enableTreesitter";
|
||||
};
|
||||
package = mkGrammarOption pkgs "liquid";
|
||||
};
|
||||
# TODO: if curlylint gets packaged for nix, add it.
|
||||
};
|
||||
|
||||
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