mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-10 07:25:30 +00:00
Altered mkEnableTreesitterOption functionallity to take in a boolean instead of all of config
This commit is contained in:
parent
cc5e7c9730
commit
91a3f67a9e
2 changed files with 7 additions and 5 deletions
|
|
@ -33,10 +33,10 @@
|
|||
default = ["vimPlugins" "nvim-treesitter" "builtGrammars" grammar];
|
||||
};
|
||||
|
||||
mkEnableTreesitterOption = config: language:
|
||||
mkEnableTreesitterOption = defaultCondition: language:
|
||||
mkOption {
|
||||
type = bool;
|
||||
default = config.vim.languages.enableTreesitter;
|
||||
default = defaultCondition;
|
||||
description = "Whether to enable ${language} treesitter";
|
||||
};
|
||||
in {
|
||||
|
|
|
|||
|
|
@ -5,17 +5,19 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.nvim.types) mkGrammarOption mkEnableTreesitterOption;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
|
||||
mkEnableTreesitterOption = lib.nvim.types.mkEnableTreesitterOption config.vim.languages.enableTreesitter;
|
||||
|
||||
cfg = config.vim.languages.tex;
|
||||
in {
|
||||
options.vim.languages.tex.treesitter = {
|
||||
latex = {
|
||||
enable = mkEnableTreesitterOption config "latex";
|
||||
enable = mkEnableTreesitterOption "latex";
|
||||
package = mkGrammarOption pkgs "latex";
|
||||
};
|
||||
bibtex = {
|
||||
enable = mkEnableTreesitterOption config "bibtex";
|
||||
enable = mkEnableTreesitterOption "bibtex";
|
||||
package = mkGrammarOption pkgs "bibtex";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue