plugins/treesitter: allow highlight to be fine-grained

This commit is contained in:
raf 2024-04-23 16:48:39 +03:00
commit 5e08ed42e7
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
2 changed files with 42 additions and 4 deletions

View file

@ -6,7 +6,9 @@
}: let
inherit (lib.modules) mkIf mkMerge;
inherit (lib.lists) optional;
inherit (lib.trivial) boolToString;
inherit (lib.nvim.binds) mkSetBinding addDescriptionsToMappings;
inherit (lib.nvim.lua) toLuaObject;
inherit (lib.nvim.dag) entryBefore entryAnywhere;
cfg = config.vim.treesitter;
@ -50,8 +52,8 @@ in {
ensure_installed = {},
highlight = {
enable = true,
disable = {},
enable = ${boolToString cfg.highlight.enable},
disable = ${toLuaObject cfg.highlight.disable},
},
incremental_selection = {