mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-03 05:44:31 +02:00
plugins/illuminate: fix filetypeOverrides option
This commit is contained in:
parent
acc9c8cad1
commit
3b9fa101fb
2 changed files with 17 additions and 28 deletions
|
@ -73,21 +73,10 @@ in {
|
|||
|
||||
package = mkPackageOption "vim-illuminate" pkgs.vimPlugins.vim-illuminate;
|
||||
|
||||
filetypeOverrides = mkOption {
|
||||
type = types.listOf (types.submodule {
|
||||
options = {
|
||||
filetype = defaultNullOpts.mkStr "" ''
|
||||
Filetype to override
|
||||
'';
|
||||
|
||||
overrides = commonOptions;
|
||||
};
|
||||
});
|
||||
description = ''
|
||||
Filetype specific overrides.
|
||||
'';
|
||||
default = [];
|
||||
};
|
||||
filetypeOverrides = helpers.defaultNullOpts.mkAttrsOf (types.submodule {options = commonOptions;}) "{}" ''
|
||||
Filetype specific overrides.
|
||||
The keys are strings to represent the filetype.
|
||||
'';
|
||||
|
||||
largeFileOverrides = mkOption {
|
||||
type = types.submodule {
|
||||
|
@ -126,10 +115,13 @@ in {
|
|||
{
|
||||
large_file_overrides = (commonSetupOptions largeFileOverrides) // (filetypeSetupOptions largeFileOverrides);
|
||||
|
||||
filetype_overrides = let
|
||||
override = attr: {${attr.filetype} = commonSetupOptions attr.overrides;};
|
||||
in
|
||||
map override filetypeOverrides;
|
||||
filetype_overrides =
|
||||
helpers.ifNonNull' filetypeOverrides
|
||||
(
|
||||
mapAttrs
|
||||
(_: commonSetupOptions)
|
||||
filetypeOverrides
|
||||
);
|
||||
}
|
||||
// (filetypeSetupOptions cfg)
|
||||
// (commonSetupOptions cfg);
|
||||
|
|
|
@ -16,15 +16,12 @@
|
|||
minCountToHighlight = 2;
|
||||
filetypesDenylist = ["csharp"];
|
||||
filetypesAllowlist = ["python"];
|
||||
filetypeOverrides = [
|
||||
{
|
||||
filetype = "c";
|
||||
overrides = {
|
||||
delay = 10;
|
||||
providers = ["treesitter"];
|
||||
};
|
||||
}
|
||||
];
|
||||
filetypeOverrides = {
|
||||
x = {
|
||||
delay = 10;
|
||||
providers = ["treesitter"];
|
||||
};
|
||||
};
|
||||
largeFileOverrides = {
|
||||
delay = 20;
|
||||
underCursor = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue