mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-04-09 14:18:36 +00:00
neovim/diagnostic: fix missin submodule opts
Some checks are pending
Set up binary cache / cachix (default) (push) Waiting to run
Set up binary cache / cachix (maximal) (push) Waiting to run
Set up binary cache / cachix (nix) (push) Waiting to run
Treewide Checks / Validate flake (push) Waiting to run
Treewide Checks / Check formatting (push) Waiting to run
Treewide Checks / Check source tree for typos (push) Waiting to run
Treewide Checks / Validate documentation builds (push) Waiting to run
Treewide Checks / Validate hyperlinks in documentation sources (push) Waiting to run
Treewide Checks / Validate Editorconfig conformance (push) Waiting to run
Build and deploy documentation / Check latest commit (push) Waiting to run
Build and deploy documentation / publish (push) Blocked by required conditions
Some checks are pending
Set up binary cache / cachix (default) (push) Waiting to run
Set up binary cache / cachix (maximal) (push) Waiting to run
Set up binary cache / cachix (nix) (push) Waiting to run
Treewide Checks / Validate flake (push) Waiting to run
Treewide Checks / Check formatting (push) Waiting to run
Treewide Checks / Check source tree for typos (push) Waiting to run
Treewide Checks / Validate documentation builds (push) Waiting to run
Treewide Checks / Validate hyperlinks in documentation sources (push) Waiting to run
Treewide Checks / Validate Editorconfig conformance (push) Waiting to run
Build and deploy documentation / Check latest commit (push) Waiting to run
Build and deploy documentation / publish (push) Blocked by required conditions
This commit is contained in:
parent
0fc84ed868
commit
e2b3daa6f8
1 changed files with 59 additions and 52 deletions
|
@ -12,63 +12,70 @@
|
||||||
|
|
||||||
cfg = config.vim.diagnostics;
|
cfg = config.vim.diagnostics;
|
||||||
|
|
||||||
|
# Takes a boolean, a table, or a Lua list ({key = value}). We
|
||||||
|
# would like to allow all of those types, while clearly expressing
|
||||||
|
# them in the option's type. As such, this type is what it is.
|
||||||
diagnosticType = oneOf [(attrsOf anything) bool luaInline];
|
diagnosticType = oneOf [(attrsOf anything) bool luaInline];
|
||||||
diagnosticsSubmodule = submodule {
|
diagnosticsSubmodule = submodule {
|
||||||
|
# The table might need to be extended, so let's allow that case
|
||||||
|
# with a freeform type of what is supported by diagnostics opts.
|
||||||
freeformType = attrsOf diagnosticType;
|
freeformType = attrsOf diagnosticType;
|
||||||
underline = mkOption {
|
options = {
|
||||||
type = diagnosticType;
|
underline = mkOption {
|
||||||
default = true;
|
type = diagnosticType;
|
||||||
description = "Use underline for diagnostics.";
|
default = true;
|
||||||
};
|
description = "Use underline for diagnostics.";
|
||||||
|
|
||||||
virtual_text = mkOption {
|
|
||||||
type = diagnosticType;
|
|
||||||
default = false;
|
|
||||||
example = literalExpression ''
|
|
||||||
{
|
|
||||||
format = lib.generators.mkLuaInline '''
|
|
||||||
function(diagnostic)
|
|
||||||
return string.format("%s (%s)", diagnostic.message, diagnostic.source)
|
|
||||||
end
|
|
||||||
''';
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
|
|
||||||
description = ''
|
|
||||||
Use virtual text for diagnostics. If multiple diagnostics are set for a namespace,
|
|
||||||
one prefix per diagnostic + the last diagnostic message are shown.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
virtual_lines = mkOption {
|
|
||||||
type = diagnosticType;
|
|
||||||
default = false;
|
|
||||||
description = ''
|
|
||||||
Use virtual lines for diagnostics.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
signs = mkOption {
|
|
||||||
type = diagnosticType;
|
|
||||||
default = false;
|
|
||||||
example = {
|
|
||||||
signs.text = {
|
|
||||||
"vim.diagnostic.severity.ERROR" = " ";
|
|
||||||
"vim.diagnostic.severity.WARN" = " ";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
description = ''
|
|
||||||
Use signs for diagnostics. See {command}`:help diagnostic-signs`.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
update_in_insert = mkOption {
|
virtual_text = mkOption {
|
||||||
type = bool;
|
type = diagnosticType;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
example = literalExpression ''
|
||||||
Update diagnostics in Insert mode. If `false`, diagnostics will
|
{
|
||||||
be updated on InsertLeave ({command}`:help InsertLeave`).
|
format = lib.generators.mkLuaInline '''
|
||||||
'';
|
function(diagnostic)
|
||||||
|
return string.format("%s (%s)", diagnostic.message, diagnostic.source)
|
||||||
|
end
|
||||||
|
''';
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
description = ''
|
||||||
|
Use virtual text for diagnostics. If multiple diagnostics are set for a namespace,
|
||||||
|
one prefix per diagnostic + the last diagnostic message are shown.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
virtual_lines = mkOption {
|
||||||
|
type = diagnosticType;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Use virtual lines for diagnostics.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
signs = mkOption {
|
||||||
|
type = diagnosticType;
|
||||||
|
default = false;
|
||||||
|
example = {
|
||||||
|
signs.text = {
|
||||||
|
"vim.diagnostic.severity.ERROR" = " ";
|
||||||
|
"vim.diagnostic.severity.WARN" = " ";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
description = ''
|
||||||
|
Use signs for diagnostics. See {command}`:help diagnostic-signs`.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
update_in_insert = mkOption {
|
||||||
|
type = bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Update diagnostics in Insert mode. If `false`, diagnostics will
|
||||||
|
be updated on InsertLeave ({command}`:help InsertLeave`).
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
|
Loading…
Add table
Reference in a new issue