mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-10 07:25:30 +00:00
Added diagnostic options for texlab
This commit is contained in:
parent
1bebf495dc
commit
934eed8181
1 changed files with 41 additions and 4 deletions
|
|
@ -1,8 +1,6 @@
|
|||
# TODO:
|
||||
# - Add Texlab LSP settings:
|
||||
# - chktex
|
||||
# - diagnosticsDelay
|
||||
# - diagnostics
|
||||
# - symbols
|
||||
# - formatterLineLength
|
||||
# - bibtexFormatter
|
||||
|
|
@ -19,7 +17,7 @@
|
|||
}: let
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.types) listOf package str attrs;
|
||||
inherit (lib.types) listOf package str attrs ints;
|
||||
inherit
|
||||
(builtins)
|
||||
attrNames
|
||||
|
|
@ -90,6 +88,37 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
diagnostics = {
|
||||
delay = mkOption {
|
||||
type = ints.positive;
|
||||
default = 300;
|
||||
description = "Delay in milliseconds before reporting diagnostics.";
|
||||
};
|
||||
allowedPatterns = mkOption {
|
||||
type = listOf str;
|
||||
default = [];
|
||||
description = ''
|
||||
A list of regular expressions used to filter the list of reported diagnostics.
|
||||
If specified, only diagnostics that match at least one of the specified patterns are sent to the client.
|
||||
|
||||
See also texlab.diagnostics.ignoredPatterns.
|
||||
|
||||
Hint: If both allowedPatterns and ignoredPatterns are set, then allowed patterns are applied first.
|
||||
Afterwards, the results are filtered with the ignored patterns.
|
||||
'';
|
||||
};
|
||||
ignoredPatterns = mkOption {
|
||||
type = listOf str;
|
||||
default = [];
|
||||
description = ''
|
||||
A list of regular expressions used to filter the list of reported diagnostics.
|
||||
If specified, only diagnostics that match none of the specified patterns are sent to the client.
|
||||
|
||||
See also texlab.diagnostics.allowedPatterns.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
extraLuaSettings = mkOption {
|
||||
type = attrs;
|
||||
default = {};
|
||||
|
|
@ -125,7 +154,15 @@ in {
|
|||
|
||||
# Create texlab settings section
|
||||
setupConfig.settings.texlab = (
|
||||
{}
|
||||
# -- General Settings --
|
||||
# -- Diagnostics --
|
||||
{
|
||||
diagnosticsDelay = texlabCfg.diagnostics.delay;
|
||||
diagnostics = {
|
||||
allowedPatterns = texlabCfg.diagnostics.allowedPatterns;
|
||||
ignoredPatterns = texlabCfg.diagnostics.ignoredPatterns;
|
||||
};
|
||||
}
|
||||
# -- Forward Search --
|
||||
// (
|
||||
if texlabCfg.forwardSearch.enable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue