plugins/bufferlines: normalize plugin defaults

This commit is contained in:
Matt Sturgeon 2024-06-11 16:50:36 +01:00
parent 9000e69f4b
commit d57cbd867a
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
3 changed files with 24 additions and 12 deletions

View file

@ -24,11 +24,17 @@ in
Whether to create winbar updater autocmd.
'';
includeBuftypes = mkListStr ''[""]'' ''
includeBuftypes = mkListStr [ "" ] ''
Buftypes to enable winbar in.
'';
excludeFiletypes = mkListStr ''["netrw" "toggleterm"]'' ''
excludeFiletypes =
mkListStr
[
"netrw"
"toggleterm"
]
''
Filetypes not to enable winbar in.
'';

View file

@ -208,7 +208,7 @@ in
"nvim_lsp"
"coc"
])
) "false" "diagnostics";
) false "diagnostics";
diagnosticsIndicator = helpers.defaultNullOpts.mkLuaFn null "Either `null` or a function that returns the diagnostics indicator.";
@ -217,7 +217,7 @@ in
offsets = helpers.defaultNullOpts.mkNullable (types.listOf types.attrs) null "offsets";
groups = {
items = helpers.defaultNullOpts.mkNullable (types.listOf types.attrs) "[]" "List of groups.";
items = helpers.defaultNullOpts.mkListOf types.attrs [ ] "List of groups.";
options = {
toggleHiddenOnEnter = helpers.defaultNullOpts.mkBool true "Re-open hidden groups on bufenter.";
@ -227,7 +227,7 @@ in
hover = {
enabled = mkEnableOption "hover";
reveal = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" "reveal";
reveal = helpers.defaultNullOpts.mkListOf types.str [ ] "reveal";
delay = helpers.defaultNullOpts.mkInt 200 "delay";
};

View file

@ -49,12 +49,18 @@ in
Enable to have nvim-navic automatically attach to every LSP for current buffer. Its disabled by default.
'';
preference = helpers.defaultNullOpts.mkNullable (with types; listOf str) "[]" ''
preference = helpers.defaultNullOpts.mkListOf' {
type = types.str;
pluginDefault = [ ];
example = [
"clangd"
"pyright"
];
description = ''
Table ranking lsp_servers. Lower the index, higher the priority of the server. If there are more than one server attached to a buffer. In the example below will prefer clangd over pyright
Example: `[ "clangd" "pyright" ]`.
'';
};
};
highlight = helpers.defaultNullOpts.mkBool false ''
If set to true, will add colors to icons and text as defined by highlight groups NavicIcons* (NavicIconsFile, NavicIconsModule.. etc.), NavicText and NavicSeparator.