2023-02-01 20:11:37 +01:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib;
|
2023-04-17 22:27:27 +02:00
|
|
|
with builtins; let
|
|
|
|
cfg = config.vim.treesitter;
|
|
|
|
usingNvimCmp = config.vim.autocomplete.enable && config.vim.autocomplete.type == "nvim-cmp";
|
|
|
|
in {
|
2023-02-01 20:11:37 +01:00
|
|
|
options.vim.treesitter = {
|
2023-04-17 22:27:27 +02:00
|
|
|
enable = mkEnableOption "treesitter, also enabled automatically through language options";
|
2023-02-01 20:11:37 +01:00
|
|
|
|
2023-04-17 22:27:27 +02:00
|
|
|
fold = mkEnableOption "fold with treesitter";
|
2023-02-01 20:11:37 +01:00
|
|
|
|
2023-04-17 22:27:27 +02:00
|
|
|
autotagHtml = mkEnableOption "autoclose and rename html tag";
|
2023-02-01 20:11:37 +01:00
|
|
|
|
|
|
|
grammars = mkOption {
|
|
|
|
type = with types; listOf package;
|
2023-04-17 22:27:27 +02:00
|
|
|
default = [];
|
2023-02-01 20:11:37 +01:00
|
|
|
description = ''
|
2023-04-17 22:27:27 +02:00
|
|
|
List of treesitter grammars to install. For supported languages
|
|
|
|
use the `vim.language.<lang>.treesitter` option
|
2023-02-01 20:11:37 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|