mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
plugins/barbar: switch from mkDesc
to pluginDefaultText
This commit is contained in:
parent
44cd01b253
commit
6e979dbe94
1 changed files with 40 additions and 39 deletions
|
@ -314,7 +314,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
Use `false` to disable it.
|
Use `false` to disable it.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
diagnostics = mkOption {
|
diagnostics = mkOption rec {
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
freeformType = with types; attrsOf anything;
|
freeformType = with types; attrsOf anything;
|
||||||
options =
|
options =
|
||||||
|
@ -338,45 +338,46 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
};
|
};
|
||||||
apply = helpers.toRawKeys;
|
apply = helpers.toRawKeys;
|
||||||
default = { };
|
default = { };
|
||||||
description =
|
defaultText = helpers.pluginDefaultText {
|
||||||
helpers.defaultNullOpts.mkDesc
|
inherit default;
|
||||||
{
|
pluginDefault = {
|
||||||
"vim.diagnostic.severity.ERROR" = {
|
"vim.diagnostic.severity.ERROR" = {
|
||||||
enabled = false;
|
enabled = false;
|
||||||
icon = " ";
|
icon = " ";
|
||||||
};
|
};
|
||||||
"vim.diagnostic.severity.HINT" = {
|
"vim.diagnostic.severity.HINT" = {
|
||||||
enabled = false;
|
enabled = false;
|
||||||
icon = " ";
|
icon = " ";
|
||||||
};
|
};
|
||||||
"vim.diagnostic.severity.INFO" = {
|
"vim.diagnostic.severity.INFO" = {
|
||||||
enabled = false;
|
enabled = false;
|
||||||
icon = " ";
|
icon = " ";
|
||||||
};
|
};
|
||||||
"vim.diagnostic.severity.WARN" = {
|
"vim.diagnostic.severity.WARN" = {
|
||||||
enabled = false;
|
enabled = false;
|
||||||
icon = " ";
|
icon = " ";
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
''
|
};
|
||||||
Set the icon for each diagnostic level.
|
description = ''
|
||||||
|
Set the icon for each diagnostic level.
|
||||||
|
|
||||||
The keys will be automatically translated to raw lua:
|
The keys will be automatically translated to raw lua:
|
||||||
```nix
|
```nix
|
||||||
{
|
{
|
||||||
"vim.diagnostic.severity.INFO".enabled = true;
|
"vim.diagnostic.severity.INFO".enabled = true;
|
||||||
"vim.diagnostic.severity.WARN".enabled = true;
|
"vim.diagnostic.severity.WARN".enabled = true;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
will result in the following lua:
|
will result in the following lua:
|
||||||
```lua
|
```lua
|
||||||
{
|
{
|
||||||
-- Note the table keys are not string literals:
|
-- Note the table keys are not string literals:
|
||||||
[vim.diagnostic.severity.INFO] = { ['enabled'] = true },
|
[vim.diagnostic.severity.INFO] = { ['enabled'] = true },
|
||||||
[vim.diagnostic.severity.WARN] = { ['enabled'] = true },
|
[vim.diagnostic.severity.WARN] = { ['enabled'] = true },
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
gitsigns =
|
gitsigns =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue