mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-12 18:24:35 +02:00
treewide: Reformat with nixfmt
This commit is contained in:
parent
c6281260dc
commit
62f32bfc71
459 changed files with 28139 additions and 26377 deletions
|
@ -1,38 +1,35 @@
|
|||
{ lib, helpers }:
|
||||
with lib;
|
||||
{
|
||||
lib,
|
||||
helpers,
|
||||
}:
|
||||
with lib; {
|
||||
enabled =
|
||||
helpers.defaultNullOpts.mkNullable
|
||||
(with types; either bool (listOf str))
|
||||
''["bibtex" "context" "context.tex" "html" "latex" "markdown" "org" "restructuredtext" "rsweave"]''
|
||||
''
|
||||
Controls whether the extension is enabled.
|
||||
Allows disabling LanguageTool on specific workspaces or for specific code language modes
|
||||
(i.e., file types).
|
||||
helpers.defaultNullOpts.mkNullable (with types; either bool (listOf str))
|
||||
''["bibtex" "context" "context.tex" "html" "latex" "markdown" "org" "restructuredtext" "rsweave"]''
|
||||
''
|
||||
Controls whether the extension is enabled.
|
||||
Allows disabling LanguageTool on specific workspaces or for specific code language modes
|
||||
(i.e., file types).
|
||||
|
||||
Either supply a boolean value stating whether LTEX is enabled for all supported markup languages
|
||||
or disabled for all of them, or supply a list of code language identifiers for which LTEX should
|
||||
be enabled (note that extensions can define additional code language identifiers).
|
||||
Either supply a boolean value stating whether LTEX is enabled for all supported markup languages
|
||||
or disabled for all of them, or supply a list of code language identifiers for which LTEX should
|
||||
be enabled (note that extensions can define additional code language identifiers).
|
||||
|
||||
All supported markup languages are listed in the default value of this setting.
|
||||
In addition, LTEX can check comments in many popular programming languages like C++ or Java, if
|
||||
you add the corresponding code language identifiers to this setting.
|
||||
If you add an unsupported code language mode, LTEX will check corresponding files as plain text
|
||||
without any parsing.
|
||||
All supported markup languages are listed in the default value of this setting.
|
||||
In addition, LTEX can check comments in many popular programming languages like C++ or Java, if
|
||||
you add the corresponding code language identifiers to this setting.
|
||||
If you add an unsupported code language mode, LTEX will check corresponding files as plain text
|
||||
without any parsing.
|
||||
|
||||
The activation events are unaffected by this setting.
|
||||
This means that the extension will be activated whenever a file with a supported code language
|
||||
mode is opened.
|
||||
For unsupported code language modes, you may need to activate the extension explicitly by
|
||||
executing the LTeX: Activate Extension command.
|
||||
The activation events are unaffected by this setting.
|
||||
This means that the extension will be activated whenever a file with a supported code language
|
||||
mode is opened.
|
||||
For unsupported code language modes, you may need to activate the extension explicitly by
|
||||
executing the LTeX: Activate Extension command.
|
||||
|
||||
Examples:
|
||||
- true
|
||||
- false
|
||||
- ["latex" "markdown"]
|
||||
'';
|
||||
Examples:
|
||||
- true
|
||||
- false
|
||||
- ["latex" "markdown"]
|
||||
'';
|
||||
|
||||
language = helpers.defaultNullOpts.mkStr "en-US" ''
|
||||
The language (e.g., "en-US") LanguageTool should check against.
|
||||
|
@ -94,175 +91,159 @@ with lib; {
|
|||
- "zh-CN": Chinese
|
||||
'';
|
||||
|
||||
dictionary =
|
||||
helpers.defaultNullOpts.mkNullable
|
||||
(with types; attrsOf (listOf str))
|
||||
"{}"
|
||||
''
|
||||
Lists of additional words that should not be counted as spelling errors.
|
||||
This setting is language-specific, so use an attrs of the format
|
||||
```nix
|
||||
{
|
||||
"<LANGUAGE1>" = [
|
||||
"<WORD1>"
|
||||
"<WORD2>"
|
||||
...
|
||||
];
|
||||
"<LANGUAGE2>" = [
|
||||
"<WORD1>"
|
||||
"<WORD2>"
|
||||
];
|
||||
...
|
||||
};
|
||||
```
|
||||
where <LANGUAGE> denotes the language code in `settings.language`.
|
||||
|
||||
This setting is a multi-scope setting. See the documentation for details.
|
||||
This setting supports external files. See the documentation for details.
|
||||
By default, no additional spelling errors will be ignored.
|
||||
|
||||
Example:
|
||||
```nix
|
||||
dictionary = helpers.defaultNullOpts.mkNullable (with types; attrsOf (listOf str)) "{}" ''
|
||||
Lists of additional words that should not be counted as spelling errors.
|
||||
This setting is language-specific, so use an attrs of the format
|
||||
```nix
|
||||
{
|
||||
"en-US" = [
|
||||
"adaptivity"
|
||||
"precomputed"
|
||||
"subproblem"
|
||||
"<LANGUAGE1>" = [
|
||||
"<WORD1>"
|
||||
"<WORD2>"
|
||||
...
|
||||
];
|
||||
"de-DE" = [
|
||||
"B-Splines"
|
||||
"<LANGUAGE2>" = [
|
||||
"<WORD1>"
|
||||
"<WORD2>"
|
||||
];
|
||||
...
|
||||
};
|
||||
```
|
||||
where <LANGUAGE> denotes the language code in `settings.language`.
|
||||
|
||||
This setting is a multi-scope setting. See the documentation for details.
|
||||
This setting supports external files. See the documentation for details.
|
||||
By default, no additional spelling errors will be ignored.
|
||||
|
||||
Example:
|
||||
```nix
|
||||
{
|
||||
"en-US" = [
|
||||
"adaptivity"
|
||||
"precomputed"
|
||||
"subproblem"
|
||||
];
|
||||
"de-DE" = [
|
||||
"B-Splines"
|
||||
":/path/to/externalFile.txt"
|
||||
];
|
||||
}
|
||||
```
|
||||
'';
|
||||
|
||||
disabledRules = helpers.defaultNullOpts.mkNullable (with types; attrsOf (listOf str)) "{}" ''
|
||||
Lists of rules that should be disabled (if enabled by default by LanguageTool).
|
||||
This setting is language-specific, so use an attrs of the format
|
||||
```nix
|
||||
{
|
||||
"<LANGUAGE1>" = [
|
||||
"<WORD1>"
|
||||
"<WORD2>"
|
||||
...
|
||||
];
|
||||
"<LANGUAGE2>" = [
|
||||
"<WORD1>"
|
||||
"<WORD2>"
|
||||
];
|
||||
...
|
||||
};
|
||||
```
|
||||
where `<LANGUAGE>` denotes the language code in `settings.language` and `<RULE>` the ID of
|
||||
the LanguageTool rule.
|
||||
|
||||
This setting is a multi-scope setting. See the documentation for details.
|
||||
This setting supports external files. See the documentation for details.
|
||||
By default, no additional rules will be disabled.
|
||||
|
||||
Example:
|
||||
```nix
|
||||
{
|
||||
"en-US" = [
|
||||
"EN_QUOTES"
|
||||
"UPPERCASE_SENTENCE_START"
|
||||
":/path/to/externalFile.txt"
|
||||
];
|
||||
}
|
||||
```
|
||||
'';
|
||||
|
||||
enabledRules = helpers.defaultNullOpts.mkNullable (with types; attrsOf (listOf str)) "{}" ''
|
||||
Lists of rules that should be enabled (if disabled by default by LanguageTool).
|
||||
This setting is language-specific, so use an attrs of the format
|
||||
```nix
|
||||
{
|
||||
"<LANGUAGE1>" = [
|
||||
"<WORD1>"
|
||||
"<WORD2>"
|
||||
...
|
||||
];
|
||||
"<LANGUAGE2>" = [
|
||||
"<WORD1>"
|
||||
"<WORD2>"
|
||||
];
|
||||
...
|
||||
};
|
||||
```
|
||||
where `<LANGUAGE>` denotes the language code in `settings.language` and `<RULE>` the ID of
|
||||
the LanguageTool rule.
|
||||
|
||||
This setting is a multi-scope setting. See the documentation for details.
|
||||
This setting supports external files. See the documentation for details.
|
||||
By default, no additional rules will be enabled.
|
||||
|
||||
Example:
|
||||
```nix
|
||||
{
|
||||
"en-GB" = [
|
||||
"PASSIVE_VOICE"
|
||||
"OXFORD_SPELLING_NOUNS"
|
||||
":/path/to/externalFile.txt"
|
||||
];
|
||||
}
|
||||
```
|
||||
'';
|
||||
```
|
||||
'';
|
||||
|
||||
disabledRules =
|
||||
helpers.defaultNullOpts.mkNullable
|
||||
(with types; attrsOf (listOf str))
|
||||
"{}"
|
||||
''
|
||||
Lists of rules that should be disabled (if enabled by default by LanguageTool).
|
||||
This setting is language-specific, so use an attrs of the format
|
||||
```nix
|
||||
{
|
||||
"<LANGUAGE1>" = [
|
||||
"<WORD1>"
|
||||
"<WORD2>"
|
||||
...
|
||||
];
|
||||
"<LANGUAGE2>" = [
|
||||
"<WORD1>"
|
||||
"<WORD2>"
|
||||
];
|
||||
...
|
||||
};
|
||||
```
|
||||
where `<LANGUAGE>` denotes the language code in `settings.language` and `<RULE>` the ID of
|
||||
the LanguageTool rule.
|
||||
|
||||
This setting is a multi-scope setting. See the documentation for details.
|
||||
This setting supports external files. See the documentation for details.
|
||||
By default, no additional rules will be disabled.
|
||||
|
||||
Example:
|
||||
```nix
|
||||
hiddenFalsePositives = helpers.defaultNullOpts.mkNullable (with types; attrsOf (listOf str)) "{}" ''
|
||||
Lists of false-positive diagnostics to hide (by hiding all diagnostics of a specific rule
|
||||
within a specific sentence).
|
||||
This setting is language-specific, so use an attrs of the format
|
||||
```nix
|
||||
{
|
||||
"en-US" = [
|
||||
"EN_QUOTES"
|
||||
"UPPERCASE_SENTENCE_START"
|
||||
":/path/to/externalFile.txt"
|
||||
"<LANGUAGE1>" = [
|
||||
"<JSON1>"
|
||||
"<JSON2>"
|
||||
...
|
||||
];
|
||||
"<LANGUAGE2>" = [
|
||||
"<JSON1>"
|
||||
"<JSON2>"
|
||||
];
|
||||
...
|
||||
};
|
||||
```
|
||||
where `<LANGUAGE>` denotes the language code in `settings.language` and `<JSON>` is a JSON
|
||||
string containing information about the rule and sentence.
|
||||
|
||||
Although it is possible to manually edit this setting, the intended way is the
|
||||
`Hide false positive` quick fix.
|
||||
|
||||
The JSON string currently has the form `{"rule": "<RULE>", "sentence": "<SENTENCE>"}`, where
|
||||
`<RULE>` is the ID of the LanguageTool rule and `<SENTENCE>` is a Java-compatible regular
|
||||
expression.
|
||||
All occurrences of the given rule are hidden in sentences (as determined by the LanguageTool
|
||||
tokenizer) that match the regular expression.
|
||||
See the documentation for details.
|
||||
|
||||
This setting is a multi-scope setting. See the documentation for details.
|
||||
This setting supports external files. See the documentation for details.
|
||||
If this list is very large, performance may suffer.
|
||||
|
||||
Example:
|
||||
```nix
|
||||
{
|
||||
"en-US" = [ ":/path/to/externalFile.txt" ];
|
||||
}
|
||||
```
|
||||
'';
|
||||
|
||||
enabledRules =
|
||||
helpers.defaultNullOpts.mkNullable
|
||||
(with types; attrsOf (listOf str))
|
||||
"{}"
|
||||
''
|
||||
Lists of rules that should be enabled (if disabled by default by LanguageTool).
|
||||
This setting is language-specific, so use an attrs of the format
|
||||
```nix
|
||||
{
|
||||
"<LANGUAGE1>" = [
|
||||
"<WORD1>"
|
||||
"<WORD2>"
|
||||
...
|
||||
];
|
||||
"<LANGUAGE2>" = [
|
||||
"<WORD1>"
|
||||
"<WORD2>"
|
||||
];
|
||||
...
|
||||
};
|
||||
```
|
||||
where `<LANGUAGE>` denotes the language code in `settings.language` and `<RULE>` the ID of
|
||||
the LanguageTool rule.
|
||||
|
||||
This setting is a multi-scope setting. See the documentation for details.
|
||||
This setting supports external files. See the documentation for details.
|
||||
By default, no additional rules will be enabled.
|
||||
|
||||
Example:
|
||||
```nix
|
||||
{
|
||||
"en-GB" = [
|
||||
"PASSIVE_VOICE"
|
||||
"OXFORD_SPELLING_NOUNS"
|
||||
":/path/to/externalFile.txt"
|
||||
];
|
||||
}
|
||||
```
|
||||
'';
|
||||
|
||||
hiddenFalsePositives =
|
||||
helpers.defaultNullOpts.mkNullable
|
||||
(with types; attrsOf (listOf str))
|
||||
"{}"
|
||||
''
|
||||
Lists of false-positive diagnostics to hide (by hiding all diagnostics of a specific rule
|
||||
within a specific sentence).
|
||||
This setting is language-specific, so use an attrs of the format
|
||||
```nix
|
||||
{
|
||||
"<LANGUAGE1>" = [
|
||||
"<JSON1>"
|
||||
"<JSON2>"
|
||||
...
|
||||
];
|
||||
"<LANGUAGE2>" = [
|
||||
"<JSON1>"
|
||||
"<JSON2>"
|
||||
];
|
||||
...
|
||||
};
|
||||
```
|
||||
where `<LANGUAGE>` denotes the language code in `settings.language` and `<JSON>` is a JSON
|
||||
string containing information about the rule and sentence.
|
||||
|
||||
Although it is possible to manually edit this setting, the intended way is the
|
||||
`Hide false positive` quick fix.
|
||||
|
||||
The JSON string currently has the form `{"rule": "<RULE>", "sentence": "<SENTENCE>"}`, where
|
||||
`<RULE>` is the ID of the LanguageTool rule and `<SENTENCE>` is a Java-compatible regular
|
||||
expression.
|
||||
All occurrences of the given rule are hidden in sentences (as determined by the LanguageTool
|
||||
tokenizer) that match the regular expression.
|
||||
See the documentation for details.
|
||||
|
||||
This setting is a multi-scope setting. See the documentation for details.
|
||||
This setting supports external files. See the documentation for details.
|
||||
If this list is very large, performance may suffer.
|
||||
|
||||
Example:
|
||||
```nix
|
||||
{
|
||||
"en-US" = [ ":/path/to/externalFile.txt" ];
|
||||
}
|
||||
```
|
||||
'';
|
||||
```
|
||||
'';
|
||||
|
||||
fields = helpers.defaultNullOpts.mkNullable (with types; attrsOf bool) "{}" ''
|
||||
List of BibTEX fields whose values are to be checked in BibTEX files.
|
||||
|
@ -351,19 +332,18 @@ with lib; {
|
|||
};
|
||||
|
||||
configurationTarget =
|
||||
helpers.defaultNullOpts.mkNullable
|
||||
(with types; attrsOf str)
|
||||
''
|
||||
{
|
||||
dictionary = "workspaceFolderExternalFile";
|
||||
disabledRules = "workspaceFolderExternalFile";
|
||||
hiddenFalsePositives = "workspaceFolderExternalFile";
|
||||
}
|
||||
''
|
||||
''
|
||||
Controls which `settings.json` or external setting file (see documentation) to update when
|
||||
using one of the quick fixes.
|
||||
'';
|
||||
helpers.defaultNullOpts.mkNullable (with types; attrsOf str)
|
||||
''
|
||||
{
|
||||
dictionary = "workspaceFolderExternalFile";
|
||||
disabledRules = "workspaceFolderExternalFile";
|
||||
hiddenFalsePositives = "workspaceFolderExternalFile";
|
||||
}
|
||||
''
|
||||
''
|
||||
Controls which `settings.json` or external setting file (see documentation) to update when
|
||||
using one of the quick fixes.
|
||||
'';
|
||||
|
||||
additionalRules = {
|
||||
enablePickyRules = helpers.defaultNullOpts.mkBool false ''
|
||||
|
@ -483,34 +463,34 @@ with lib; {
|
|||
|
||||
logLevel =
|
||||
helpers.defaultNullOpts.mkEnum
|
||||
[
|
||||
"severe"
|
||||
"warning"
|
||||
"info"
|
||||
"config"
|
||||
[
|
||||
"severe"
|
||||
"warning"
|
||||
"info"
|
||||
"config"
|
||||
"fine"
|
||||
"finer"
|
||||
"finest"
|
||||
]
|
||||
"fine"
|
||||
"finer"
|
||||
"finest"
|
||||
]
|
||||
"fine"
|
||||
''
|
||||
Logging level (verbosity) of the `ltex-ls` server log.
|
||||
''
|
||||
Logging level (verbosity) of the `ltex-ls` server log.
|
||||
|
||||
The levels in descending order are "severe", "warning", "info", "config", "fine", "finer", and
|
||||
"finest".
|
||||
All messages that have the specified log level or a higher level are logged.
|
||||
The levels in descending order are "severe", "warning", "info", "config", "fine", "finer", and
|
||||
"finest".
|
||||
All messages that have the specified log level or a higher level are logged.
|
||||
|
||||
`ltex-ls` does not use all log levels.
|
||||
`ltex-ls` does not use all log levels.
|
||||
|
||||
Possible values:
|
||||
- "severe": Minimum verbosity. Only log severe errors.
|
||||
- "warning": Very low verbosity. Only log severe errors and warnings.
|
||||
- "info": Low verbosity. Additionally, log startup and shutdown messages.
|
||||
- "config": Medium verbosity. Additionally, log configuration messages.
|
||||
- "fine": Medium to high verbosity (default). Additionally, log when LanguageTool is called or LanguageTool has to be reinitialized due to changed settings.
|
||||
- "finer": High verbosity. Log additional debugging information such as full texts to be checked.
|
||||
- "finest": Maximum verbosity. Log all available debugging information.
|
||||
'';
|
||||
Possible values:
|
||||
- "severe": Minimum verbosity. Only log severe errors.
|
||||
- "warning": Very low verbosity. Only log severe errors and warnings.
|
||||
- "info": Low verbosity. Additionally, log startup and shutdown messages.
|
||||
- "config": Medium verbosity. Additionally, log configuration messages.
|
||||
- "fine": Medium to high verbosity (default). Additionally, log when LanguageTool is called or LanguageTool has to be reinitialized due to changed settings.
|
||||
- "finer": High verbosity. Log additional debugging information such as full texts to be checked.
|
||||
- "finest": Maximum verbosity. Log all available debugging information.
|
||||
'';
|
||||
};
|
||||
|
||||
java = {
|
||||
|
@ -574,40 +554,42 @@ with lib; {
|
|||
'';
|
||||
|
||||
diagnosticSeverity =
|
||||
helpers.defaultNullOpts.mkNullable
|
||||
(with types; either str (attrsOf str))
|
||||
"information"
|
||||
''
|
||||
Severity of the diagnostics corresponding to the grammar and spelling errors.
|
||||
helpers.defaultNullOpts.mkNullable (with types; either str (attrsOf str)) "information"
|
||||
''
|
||||
Severity of the diagnostics corresponding to the grammar and spelling errors.
|
||||
|
||||
Controls how and where the diagnostics appear.
|
||||
The possible severities are "error", "warning", "information", and "hint".
|
||||
Controls how and where the diagnostics appear.
|
||||
The possible severities are "error", "warning", "information", and "hint".
|
||||
|
||||
This setting can either be a string with the severity to use for all diagnostics, or an attrs
|
||||
with rule-dependent severities.
|
||||
If an attrs is used, each key is the ID of a LanguageTool rule and each value is one of the
|
||||
possible severities.
|
||||
In this case, the severity of other rules, which don’t match any of the keys, has to be
|
||||
specified with the special key "default".
|
||||
This setting can either be a string with the severity to use for all diagnostics, or an attrs
|
||||
with rule-dependent severities.
|
||||
If an attrs is used, each key is the ID of a LanguageTool rule and each value is one of the
|
||||
possible severities.
|
||||
In this case, the severity of other rules, which don’t match any of the keys, has to be
|
||||
specified with the special key "default".
|
||||
|
||||
Examples:
|
||||
- `"information"`
|
||||
- `{PASSIVE_VOICE = "hint"; default = "information";}`
|
||||
'';
|
||||
Examples:
|
||||
- `"information"`
|
||||
- `{PASSIVE_VOICE = "hint"; default = "information";}`
|
||||
'';
|
||||
|
||||
checkFrequency =
|
||||
helpers.defaultNullOpts.mkEnumFirstDefault
|
||||
["edit" "save" "manual"]
|
||||
''
|
||||
Controls when documents should be checked.
|
||||
[
|
||||
"edit"
|
||||
"save"
|
||||
"manual"
|
||||
]
|
||||
''
|
||||
Controls when documents should be checked.
|
||||
|
||||
Possible values:
|
||||
- "edit": Documents are checked when they are opened or edited (on every keystroke), or when
|
||||
the settings change.
|
||||
- "save": Documents are checked when they are opened or saved, or when the settings change.
|
||||
- "manual": Documents are not checked automatically, except when the settings change.
|
||||
Use commands such as LTeX: Check Current Document to manually trigger checks.
|
||||
'';
|
||||
Possible values:
|
||||
- "edit": Documents are checked when they are opened or edited (on every keystroke), or when
|
||||
the settings change.
|
||||
- "save": Documents are checked when they are opened or saved, or when the settings change.
|
||||
- "manual": Documents are not checked automatically, except when the settings change.
|
||||
Use commands such as LTeX: Check Current Document to manually trigger checks.
|
||||
'';
|
||||
|
||||
clearDiagnosticsWhenClosingFile = helpers.defaultNullOpts.mkBool true ''
|
||||
If set to true, diagnostics of a file are cleared when the file is closed.
|
||||
|
@ -620,20 +602,24 @@ with lib; {
|
|||
trace = {
|
||||
server =
|
||||
helpers.defaultNullOpts.mkEnumFirstDefault
|
||||
["off" "messages" "verbose"]
|
||||
''
|
||||
Debug setting to log the communication between language client and server.
|
||||
[
|
||||
"off"
|
||||
"messages"
|
||||
"verbose"
|
||||
]
|
||||
''
|
||||
Debug setting to log the communication between language client and server.
|
||||
|
||||
When reporting issues, set this to "verbose".
|
||||
Append the relevant part to the GitHub issue.
|
||||
When reporting issues, set this to "verbose".
|
||||
Append the relevant part to the GitHub issue.
|
||||
|
||||
Changes require restarting LTEX to take effect.
|
||||
Changes require restarting LTEX to take effect.
|
||||
|
||||
Possible values:
|
||||
- "off": Don’t log any of the communication between language client and server.
|
||||
- "messages": Log the type of requests and responses between language client and server.
|
||||
- "verbose": Log the type and contents of requests and responses between language client and
|
||||
server.
|
||||
'';
|
||||
Possible values:
|
||||
- "off": Don’t log any of the communication between language client and server.
|
||||
- "messages": Log the type of requests and responses between language client and server.
|
||||
- "verbose": Log the type and contents of requests and responses between language client and
|
||||
server.
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue