mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-27 02:59:00 +02:00
plugins/lsp: normalize plugin defaults
This commit is contained in:
parent
6f408f2bd0
commit
0f07201a0c
10 changed files with 205 additions and 199 deletions
|
@ -15,9 +15,10 @@ in
|
||||||
|
|
||||||
package = helpers.mkPluginPackageOption "conform-nvim" pkgs.vimPlugins.conform-nvim;
|
package = helpers.mkPluginPackageOption "conform-nvim" pkgs.vimPlugins.conform-nvim;
|
||||||
|
|
||||||
formattersByFt =
|
formattersByFt = helpers.defaultNullOpts.mkAttrsOf' {
|
||||||
helpers.defaultNullOpts.mkNullable (types.attrsOf types.anything) "see documentation"
|
type = types.anything;
|
||||||
''
|
# Unknown plugin default
|
||||||
|
description = ''
|
||||||
```nix
|
```nix
|
||||||
# Map of filetype to formatters
|
# Map of filetype to formatters
|
||||||
formattersByFt =
|
formattersByFt =
|
||||||
|
@ -35,10 +36,10 @@ in
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
formatOnSave =
|
formatOnSave = helpers.defaultNullOpts.mkNullable' {
|
||||||
helpers.defaultNullOpts.mkNullable
|
type =
|
||||||
(
|
|
||||||
with helpers.nixvimTypes;
|
with helpers.nixvimTypes;
|
||||||
either strLuaFn (submodule {
|
either strLuaFn (submodule {
|
||||||
options = {
|
options = {
|
||||||
|
@ -53,19 +54,18 @@ in
|
||||||
description = "See :help conform.format for details.";
|
description = "See :help conform.format for details.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
})
|
});
|
||||||
)
|
# Unknown plugin default
|
||||||
"see documentation"
|
description = ''
|
||||||
''
|
|
||||||
If this is set, Conform will run the formatter on save.
|
If this is set, Conform will run the formatter on save.
|
||||||
It will pass the table to conform.format().
|
It will pass the table to conform.format().
|
||||||
This can also be a function that returns the table.
|
This can also be a function that returns the table.
|
||||||
See :help conform.format for details.
|
See :help conform.format for details.
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
formatAfterSave =
|
formatAfterSave = helpers.defaultNullOpts.mkNullable' {
|
||||||
helpers.defaultNullOpts.mkNullable
|
type =
|
||||||
(
|
|
||||||
with helpers.nixvimTypes;
|
with helpers.nixvimTypes;
|
||||||
either strLuaFn (submodule {
|
either strLuaFn (submodule {
|
||||||
options = {
|
options = {
|
||||||
|
@ -75,14 +75,14 @@ in
|
||||||
description = "See :help conform.format for details.";
|
description = "See :help conform.format for details.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
})
|
});
|
||||||
)
|
# Unknown plugin default
|
||||||
"see documentation"
|
description = ''
|
||||||
''
|
|
||||||
If this is set, Conform will run the formatter asynchronously after save.
|
If this is set, Conform will run the formatter asynchronously after save.
|
||||||
It will pass the table to conform.format().
|
It will pass the table to conform.format().
|
||||||
This can also be a function that returns the table.
|
This can also be a function that returns the table.
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
logLevel = helpers.defaultNullOpts.mkLogLevel "error" ''
|
logLevel = helpers.defaultNullOpts.mkLogLevel "error" ''
|
||||||
Set the log level. Use `:ConformInfo` to see the location of the log file.
|
Set the log level. Use `:ConformInfo` to see the location of the log file.
|
||||||
|
@ -90,9 +90,11 @@ in
|
||||||
|
|
||||||
notifyOnError = helpers.defaultNullOpts.mkBool true "Conform will notify you when a formatter errors";
|
notifyOnError = helpers.defaultNullOpts.mkBool true "Conform will notify you when a formatter errors";
|
||||||
|
|
||||||
formatters =
|
formatters = helpers.defaultNullOpts.mkAttrsOf' {
|
||||||
helpers.defaultNullOpts.mkNullable (types.attrsOf types.anything) "see documentation"
|
type = types.anything;
|
||||||
"Custom formatters and changes to built-in formatters";
|
# Unknown plugin default
|
||||||
|
description = "Custom formatters and changes to built-in formatters";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config =
|
config =
|
||||||
|
|
|
@ -149,7 +149,7 @@ in
|
||||||
|
|
||||||
# Options related to LSP progress subsystem
|
# Options related to LSP progress subsystem
|
||||||
progress = {
|
progress = {
|
||||||
pollRate = helpers.defaultNullOpts.mkNullable (with types; either (enum [ false ]) number) "0" ''
|
pollRate = helpers.defaultNullOpts.mkNullable (with types; either (enum [ false ]) number) 0 ''
|
||||||
How and when to poll for progress messages.
|
How and when to poll for progress messages.
|
||||||
|
|
||||||
Set to `0` to immediately poll on each `|LspProgress|` event.
|
Set to `0` to immediately poll on each `|LspProgress|` event.
|
||||||
|
@ -232,15 +232,13 @@ in
|
||||||
will be installed).
|
will be installed).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ignore = helpers.defaultNullOpts.mkNullable (with types; listOf str) "[]" ''
|
ignore = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
List of LSP servers to ignore.
|
List of LSP servers to ignore.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Options related to how LSP progress messages are displayed as notifications
|
# Options related to how LSP progress messages are displayed as notifications
|
||||||
display = {
|
display = {
|
||||||
renderLimit =
|
renderLimit = helpers.defaultNullOpts.mkNullable (with types; either (enum [ false ]) number) 16 ''
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either (enum [ false ]) number) "16"
|
|
||||||
''
|
|
||||||
How many LSP messages to show at once.
|
How many LSP messages to show at once.
|
||||||
|
|
||||||
If `false`, no limit.
|
If `false`, no limit.
|
||||||
|
@ -316,14 +314,12 @@ in
|
||||||
formatGroupName = helpers.defaultNullOpts.mkLuaFn "function(group) return tostring(group) end" "How to format a progress notification group's name.";
|
formatGroupName = helpers.defaultNullOpts.mkLuaFn "function(group) return tostring(group) end" "How to format a progress notification group's name.";
|
||||||
|
|
||||||
overrides =
|
overrides =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; attrsOf notificationConfigType)
|
helpers.defaultNullOpts.mkAttrsOf notificationConfigType
|
||||||
''
|
|
||||||
{
|
{
|
||||||
rust_analyzer = {
|
rust_analyzer = {
|
||||||
name = "rust-analyzer";
|
name = "rust-analyzer";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
''
|
|
||||||
''
|
''
|
||||||
Override options from the default notification config.
|
Override options from the default notification config.
|
||||||
Keys of the table are each notification group's `key`.
|
Keys of the table are each notification group's `key`.
|
||||||
|
@ -379,12 +375,8 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configs =
|
configs =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; attrsOf (either notificationConfigType str))
|
helpers.defaultNullOpts.mkAttrsOf (with types; either str notificationConfigType)
|
||||||
''
|
{ default = "require('fidget.notification').default_config"; }
|
||||||
{
|
|
||||||
default = "require('fidget.notification').default_config";
|
|
||||||
}
|
|
||||||
''
|
|
||||||
''
|
''
|
||||||
How to configure notification groups when instantiated.
|
How to configure notification groups when instantiated.
|
||||||
|
|
||||||
|
@ -551,11 +543,11 @@ in
|
||||||
|
|
||||||
floatPrecision = helpers.defaultNullOpts.mkNullable (
|
floatPrecision = helpers.defaultNullOpts.mkNullable (
|
||||||
with types; numbers.between 0.0 1.0
|
with types; numbers.between 0.0 1.0
|
||||||
) "0.01" "Limit the number of decimals displayed for floats.";
|
) 1.0e-2 "Limit the number of decimals displayed for floats.";
|
||||||
|
|
||||||
path =
|
path =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either str helpers.nixvimTypes.rawLua)
|
helpers.defaultNullOpts.mkStr
|
||||||
''{__raw = "string.format('%s/fidget.nvim.log', vim.fn.stdpath('cache'))";}''
|
{ __raw = "string.format('%s/fidget.nvim.log', vim.fn.stdpath('cache'))"; }
|
||||||
''
|
''
|
||||||
Where Fidget writes its logs to.
|
Where Fidget writes its logs to.
|
||||||
|
|
||||||
|
|
|
@ -69,13 +69,13 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
clang = {
|
clang = {
|
||||||
extraArgs = helpers.defaultNullOpts.mkNullable (with types; listOf str) "[]" ''
|
extraArgs = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Additional arguments for `compile_commands.json` entries.
|
Additional arguments for `compile_commands.json` entries.
|
||||||
|
|
||||||
Example: `["-frounding-math"]`
|
Example: `["-frounding-math"]`
|
||||||
'';
|
'';
|
||||||
|
|
||||||
excludeArgs = helpers.defaultNullOpts.mkNullable (with types; listOf str) "[]" ''
|
excludeArgs = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Excluded arguments for `compile_commands.json` entries.
|
Excluded arguments for `compile_commands.json` entries.
|
||||||
|
|
||||||
If your compiler is not Clang and it supports arguments which Clang doesn't understand, then
|
If your compiler is not Clang and it supports arguments which Clang doesn't understand, then
|
||||||
|
@ -84,7 +84,7 @@ in
|
||||||
Example: `["-frounding-math"]`
|
Example: `["-frounding-math"]`
|
||||||
'';
|
'';
|
||||||
|
|
||||||
pathMappings = helpers.defaultNullOpts.mkNullable (with types; listOf str) "[]" ''
|
pathMappings = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
A list of `src>dest` path conversions used to remap the paths of files in the project.
|
A list of `src>dest` path conversions used to remap the paths of files in the project.
|
||||||
This can be used to move a project to a new location without re-indexing.
|
This can be used to move a project to a new location without re-indexing.
|
||||||
|
|
||||||
|
@ -238,7 +238,7 @@ in
|
||||||
Also consider using `index.multiVersionBlacklist` to exclude system headers.
|
Also consider using `index.multiVersionBlacklist` to exclude system headers.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
multiVersionBlacklist = helpers.defaultNullOpts.mkNullable (with types; listOf str) "[]" ''
|
multiVersionBlacklist = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
A list of regular expressions matching files that should not be indexed via multi-version
|
A list of regular expressions matching files that should not be indexed via multi-version
|
||||||
if `index.multiVersion` is set to `1`.
|
if `index.multiVersion` is set to `1`.
|
||||||
|
|
||||||
|
@ -248,7 +248,7 @@ in
|
||||||
Example: `["^/usr/include"]`
|
Example: `["^/usr/include"]`
|
||||||
'';
|
'';
|
||||||
|
|
||||||
initialBlacklist = helpers.defaultNullOpts.mkNullable (with types; listOf str) "[]" ''
|
initialBlacklist = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
A list of regular expressions matching files that should not be indexed when the `ccls`
|
A list of regular expressions matching files that should not be indexed when the `ccls`
|
||||||
server starts up, but will still be indexed if a client opens them.
|
server starts up, but will still be indexed if a client opens them.
|
||||||
If there are areas of the project that you have no interest in indexing you can use this to
|
If there are areas of the project that you have no interest in indexing you can use this to
|
||||||
|
|
|
@ -44,7 +44,7 @@ in
|
||||||
Setting this explicitly to `true` will install the dependency for this plugin (flake8).
|
Setting this explicitly to `true` will install the dependency for this plugin (flake8).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
exclude = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
exclude = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
List of files or directories to exclude.
|
List of files or directories to exclude.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ in
|
||||||
Hang closing bracket instead of matching indentation of opening bracket's line.
|
Hang closing bracket instead of matching indentation of opening bracket's line.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ignore = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
ignore = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
List of errors and warnings to ignore (or skip).
|
List of errors and warnings to ignore (or skip).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ in
|
||||||
Set indentation spaces.
|
Set indentation spaces.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
perFileIgnores = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
perFileIgnores = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
A pairing of filenames and violation codes that defines which violations to ignore in a
|
A pairing of filenames and violation codes that defines which violations to ignore in a
|
||||||
particular file.
|
particular file.
|
||||||
|
|
||||||
|
@ -89,11 +89,11 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
jedi = {
|
jedi = {
|
||||||
auto_import_modules =
|
auto_import_modules = helpers.defaultNullOpts.mkListOf types.str [
|
||||||
helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[ \"numpy\" ]"
|
"numpy"
|
||||||
"List of module names for `jedi.settings.auto_import_modules`.";
|
] "List of module names for `jedi.settings.auto_import_modules`.";
|
||||||
|
|
||||||
extra_paths = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
extra_paths = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Define extra paths for jedi.Script.
|
Define extra paths for jedi.Script.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -129,10 +129,12 @@ in
|
||||||
How many labels and snippets (at most) should be resolved.
|
How many labels and snippets (at most) should be resolved.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cache_for =
|
cache_for = helpers.defaultNullOpts.mkListOf types.str [
|
||||||
helpers.defaultNullOpts.mkNullable (types.listOf types.str)
|
"pandas"
|
||||||
"[ \"pandas\" \"numpy\" \"tensorflow\" \"matplotlib\" ]"
|
"numpy"
|
||||||
"Modules for which labels and snippets should be cached.";
|
"tensorflow"
|
||||||
|
"matplotlib"
|
||||||
|
] "Modules for which labels and snippets should be cached.";
|
||||||
};
|
};
|
||||||
|
|
||||||
jedi_definition = {
|
jedi_definition = {
|
||||||
|
@ -189,7 +191,7 @@ in
|
||||||
preload = {
|
preload = {
|
||||||
enabled = helpers.defaultNullOpts.mkBool true "Enable or disable the plugin.";
|
enabled = helpers.defaultNullOpts.mkBool true "Enable or disable the plugin.";
|
||||||
|
|
||||||
modules = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
modules = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
List of modules to import on startup.
|
List of modules to import on startup.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -201,11 +203,11 @@ in
|
||||||
(pycodestyle).
|
(pycodestyle).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
exclude = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
exclude = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Exclude files or directories which match these patterns.
|
Exclude files or directories which match these patterns.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
filename = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
filename = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
When parsing directories, only check filenames matching these patterns.
|
When parsing directories, only check filenames matching these patterns.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -213,7 +215,7 @@ in
|
||||||
Select errors and warnings.
|
Select errors and warnings.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ignore = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
ignore = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Ignore errors and warnings.
|
Ignore errors and warnings.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -244,15 +246,15 @@ in
|
||||||
"None"
|
"None"
|
||||||
]) "Choose the basic list of checked errors by specifying an existing convention.";
|
]) "Choose the basic list of checked errors by specifying an existing convention.";
|
||||||
|
|
||||||
addIgnore = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
addIgnore = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Ignore errors and warnings in addition to the specified convention.
|
Ignore errors and warnings in addition to the specified convention.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
addSelect = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
addSelect = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Select errors and warnings in addition to the specified convention.
|
Select errors and warnings in addition to the specified convention.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ignore = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
ignore = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Ignore errors and warnings.
|
Ignore errors and warnings.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -284,7 +286,7 @@ in
|
||||||
Setting this explicitly to `true` will install the dependency for this plugin (pylint).
|
Setting this explicitly to `true` will install the dependency for this plugin (pylint).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
args = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
args = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Arguments to pass to pylint.
|
Arguments to pass to pylint.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -352,23 +354,13 @@ in
|
||||||
This option often is too strict to be useful.
|
This option often is too strict to be useful.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
overrides =
|
overrides = helpers.defaultNullOpts.mkListOf (with types; either bool str) [ true ] ''
|
||||||
helpers.defaultNullOpts.mkNullable
|
|
||||||
(types.listOf (
|
|
||||||
types.oneOf [
|
|
||||||
types.bool
|
|
||||||
types.str
|
|
||||||
helpers.nixvimTypes.rawLua
|
|
||||||
]
|
|
||||||
))
|
|
||||||
"[true]"
|
|
||||||
''
|
|
||||||
Specifies a list of alternate or supplemental command-line options.
|
Specifies a list of alternate or supplemental command-line options.
|
||||||
This modifies the options passed to mypy or the mypy-specific ones passed to dmypy run.
|
This modifies the options passed to mypy or the mypy-specific ones passed to dmypy run.
|
||||||
When present, the special boolean member true is replaced with the command-line options that
|
When present, the special boolean member true is replaced with the command-line options that
|
||||||
would've been passed had overrides not been specified.
|
would've been passed had overrides not been specified.
|
||||||
Later options take precedence, which allows for replacing or negating individual default
|
Later options take precedence, which allows for replacing or negating individual default
|
||||||
options (see mypy.main:process_options and mypy --help | grep inverse).
|
options (see `mypy.main:process_options` and `mypy --help | grep inverse`).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
dmypy_status_file = helpers.defaultNullOpts.mkStr ".dmypy.json" ''
|
dmypy_status_file = helpers.defaultNullOpts.mkStr ".dmypy.json" ''
|
||||||
|
@ -376,7 +368,7 @@ in
|
||||||
This modifies the --status-file option passed to dmypy given dmypy is active.
|
This modifies the --status-file option passed to dmypy given dmypy is active.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
config_sub_paths = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
config_sub_paths = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Specifies sub paths under which the mypy configuration file may be found.
|
Specifies sub paths under which the mypy configuration file may be found.
|
||||||
For each directory searched for the mypy config file, this also searches the sub paths
|
For each directory searched for the mypy config file, this also searches the sub paths
|
||||||
specified here.
|
specified here.
|
||||||
|
@ -449,7 +441,7 @@ in
|
||||||
|
|
||||||
config = helpers.mkNullOrOption types.str "Path to optional pyproject.toml file.";
|
config = helpers.mkNullOrOption types.str "Path to optional pyproject.toml file.";
|
||||||
|
|
||||||
exclude = helpers.defaultNullOpts.mkNullable (with types; listOf str) "[]" ''
|
exclude = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Exclude files from being checked by ruff.
|
Exclude files from being checked by ruff.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -457,11 +449,11 @@ in
|
||||||
Path to the ruff executable. Assumed to be in PATH by default.
|
Path to the ruff executable. Assumed to be in PATH by default.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ignore = helpers.defaultNullOpts.mkNullable (with types; listOf str) "[]" ''
|
ignore = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Error codes to ignore.
|
Error codes to ignore.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
extendIgnore = helpers.defaultNullOpts.mkNullable (with types; listOf str) "[]" ''
|
extendIgnore = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Same as ignore, but append to existing ignores.
|
Same as ignore, but append to existing ignores.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -471,15 +463,15 @@ in
|
||||||
File-specific error codes to be ignored.
|
File-specific error codes to be ignored.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
select = helpers.defaultNullOpts.mkNullable (with types; listOf str) "[]" ''
|
select = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
List of error codes to enable.
|
List of error codes to enable.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
extendSelect = helpers.defaultNullOpts.mkNullable (with types; listOf str) "[]" ''
|
extendSelect = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Same as select, but append to existing error codes.
|
Same as select, but append to existing error codes.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
format = helpers.defaultNullOpts.mkNullable (with types; listOf str) "[]" ''
|
format = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
List of error codes to fix during formatting.
|
List of error codes to fix during formatting.
|
||||||
The default is ["I"], any additional codes are appended to this list.
|
The default is ["I"], any additional codes are appended to this list.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -50,7 +50,7 @@ with lib;
|
||||||
If set to null or not set, the extension will use the default behavior of the Typst compiler.
|
If set to null or not set, the extension will use the default behavior of the Typst compiler.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
fontPaths = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
fontPaths = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Font paths, which doesn't allow for dynamic configuration.
|
Font paths, which doesn't allow for dynamic configuration.
|
||||||
Note: you can use vscode variables in the path, e.g. `$\{workspaceFolder}/fonts`.
|
Note: you can use vscode variables in the path, e.g. `$\{workspaceFolder}/fonts`.
|
||||||
'';
|
'';
|
||||||
|
@ -69,7 +69,7 @@ with lib;
|
||||||
server level.
|
server level.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
typstExtraArgs = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
typstExtraArgs = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
You can pass any arguments as you like, and we will try to follow behaviors of the
|
You can pass any arguments as you like, and we will try to follow behaviors of the
|
||||||
**same version** of typst-cli.
|
**same version** of typst-cli.
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
kind_labels = helpers.defaultNullOpts.mkAttrsOf types.str "{}" ''
|
kind_labels = helpers.defaultNullOpts.mkAttrsOf types.str { } ''
|
||||||
An optional map from LSP symbol kinds to label symbols. Used to decorate the current function name.
|
An optional map from LSP symbol kinds to label symbols. Used to decorate the current function name.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -66,21 +66,25 @@ in
|
||||||
|
|
||||||
actionfix = helpers.defaultNullOpts.mkStr "" "Action fix icon.";
|
actionfix = helpers.defaultNullOpts.mkStr "" "Action fix icon.";
|
||||||
|
|
||||||
lines = helpers.defaultNullOpts.mkNullable (
|
lines = helpers.defaultNullOpts.mkListOf types.str [
|
||||||
with types; listOf str
|
"┗"
|
||||||
) ''["┗" "┣" "┃" "━" "┏"]'' "Symbols used in virtual text connect.";
|
"┣"
|
||||||
|
"┃"
|
||||||
|
"━"
|
||||||
|
"┏"
|
||||||
|
] "Symbols used in virtual text connect.";
|
||||||
|
|
||||||
kind = helpers.defaultNullOpts.mkNullable types.attrs "{}" "LSP kind custom table.";
|
kind = helpers.defaultNullOpts.mkAttrsOf types.anything { } "LSP kind custom table.";
|
||||||
|
|
||||||
impSign = helpers.defaultNullOpts.mkStr " " "Implement icon.";
|
impSign = helpers.defaultNullOpts.mkStr " " "Implement icon.";
|
||||||
};
|
};
|
||||||
|
|
||||||
hover = {
|
hover = {
|
||||||
maxWidth = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) "0.9" ''
|
maxWidth = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) 0.9 ''
|
||||||
Defines float window width.
|
Defines float window width.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
maxHeight = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) "0.8" ''
|
maxHeight = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) 0.8 ''
|
||||||
Defines float window height.
|
Defines float window height.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -107,19 +111,19 @@ in
|
||||||
Enable number shortcuts to execute code action quickly.
|
Enable number shortcuts to execute code action quickly.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
maxWidth = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) "0.8" ''
|
maxWidth = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) 0.8 ''
|
||||||
Diagnostic jump window max width.
|
Diagnostic jump window max width.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
maxHeight = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) "0.6" ''
|
maxHeight = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) 0.6 ''
|
||||||
Diagnostic jump window max height.
|
Diagnostic jump window max height.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
maxShowWidth = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) "0.9" ''
|
maxShowWidth = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) 0.9 ''
|
||||||
Show window max width when layout is float.
|
Show window max width when layout is float.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
maxShowHeight = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) "0.6" ''
|
maxShowHeight = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) 0.6 ''
|
||||||
Show window max height when layout is float.
|
Show window max height when layout is float.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -201,19 +205,19 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
finder = {
|
finder = {
|
||||||
maxHeight = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) "0.5" ''
|
maxHeight = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) 0.5 ''
|
||||||
`max_height` of the finder window (float layout).
|
`max_height` of the finder window (float layout).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
leftWidth = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) "0.3" ''
|
leftWidth = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) 0.3 ''
|
||||||
Width of the left finder window (float layout).
|
Width of the left finder window (float layout).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
rightWidth = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) "0.3" ''
|
rightWidth = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) 0.3 ''
|
||||||
Width of the right finder window (float layout).
|
Width of the right finder window (float layout).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
methods = helpers.defaultNullOpts.mkNullable (with types; attrsOf str) "{}" ''
|
methods = helpers.defaultNullOpts.mkAttrsOf types.str { } ''
|
||||||
Keys are alias of LSP methods.
|
Keys are alias of LSP methods.
|
||||||
Values are LSP methods, which you want show in finder.
|
Values are LSP methods, which you want show in finder.
|
||||||
|
|
||||||
|
@ -243,7 +247,7 @@ in
|
||||||
If it’s true, it will disable show the no response message.
|
If it’s true, it will disable show the no response message.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
filter = helpers.defaultNullOpts.mkNullable (with types; attrsOf str) "{}" ''
|
filter = helpers.defaultNullOpts.mkAttrsOf types.str { } ''
|
||||||
Keys are LSP methods.
|
Keys are LSP methods.
|
||||||
Values are a filter handler.
|
Values are a filter handler.
|
||||||
Function parameter are `client_id` and `result`.
|
Function parameter are `client_id` and `result`.
|
||||||
|
@ -269,11 +273,11 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
definition = {
|
definition = {
|
||||||
width = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) "0.6" ''
|
width = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) 0.6 ''
|
||||||
Defines float window width.
|
Defines float window width.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
height = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) "0.5" ''
|
height = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) 0.5 ''
|
||||||
Defines float window height.
|
Defines float window height.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -309,11 +313,11 @@ in
|
||||||
|
|
||||||
projectMaxWidth = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0
|
projectMaxWidth = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0
|
||||||
1.0
|
1.0
|
||||||
) "0.5" "Width for the `project_replace` float window.";
|
) 0.5 "Width for the `project_replace` float window.";
|
||||||
|
|
||||||
projectMaxHeight = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0
|
projectMaxHeight = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0
|
||||||
1.0
|
1.0
|
||||||
) "0.5" "Height for the `project_replace` float window.";
|
) 0.5 "Height for the `project_replace` float window.";
|
||||||
|
|
||||||
keys = {
|
keys = {
|
||||||
quit = mkKeymapOption "<C-k>" "Quit rename window or `project_replace` window.";
|
quit = mkKeymapOption "<C-k>" "Quit rename window or `project_replace` window.";
|
||||||
|
@ -369,15 +373,15 @@ in
|
||||||
]
|
]
|
||||||
''
|
''
|
||||||
`float` or `normal`.
|
`float` or `normal`.
|
||||||
Default is normal.
|
|
||||||
If set to float, above options will ignored.
|
If set to float, above options will ignored.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
maxHeight = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) "0.5" ''
|
maxHeight = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) 0.5 ''
|
||||||
Height of outline float layout.
|
Height of outline float layout.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
leftWidth = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) "0.3" ''
|
leftWidth = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) 0.3 ''
|
||||||
Width of outline float layout left window.
|
Width of outline float layout left window.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
Highlight group to highlight the floating window.
|
Highlight group to highlight the floating window.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
win_opts = helpers.defaultNullOpts.mkAttrsOf types.anything "{}" ''
|
win_opts = helpers.defaultNullOpts.mkAttrsOf types.anything { } ''
|
||||||
Window options.
|
Window options.
|
||||||
See |vim.lsp.util.open_floating_preview| and |nvim_open_win|.
|
See |vim.lsp.util.open_floating_preview| and |nvim_open_win|.
|
||||||
Note that some options may be overridden by |open_floating_preview|.
|
Note that some options may be overridden by |open_floating_preview|.
|
||||||
|
@ -176,22 +176,28 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
Set to a negative value to avoid setting the updatetime.
|
Set to a negative value to avoid setting the updatetime.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
pattern = helpers.defaultNullOpts.mkListOf types.str ''["*"]'' ''
|
pattern = helpers.defaultNullOpts.mkListOf types.str [ "*" ] ''
|
||||||
See |nvim_create_autocmd| and |autocmd-pattern|.
|
See |nvim_create_autocmd| and |autocmd-pattern|.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
events = helpers.defaultNullOpts.mkListOf types.str ''["CursorHold" "CursorHoldI"]'' ''
|
events =
|
||||||
|
helpers.defaultNullOpts.mkListOf types.str
|
||||||
|
[
|
||||||
|
"CursorHold"
|
||||||
|
"CursorHoldI"
|
||||||
|
]
|
||||||
|
''
|
||||||
See |nvim_create_autocmd|.
|
See |nvim_create_autocmd|.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
ignore = {
|
ignore = {
|
||||||
clients = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
clients = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
LSP client names to ignore.
|
LSP client names to ignore.
|
||||||
Example: {"null-ls", "lua_ls"}
|
Example: {"null-ls", "lua_ls"}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ft = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
ft = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Filetypes to ignore.
|
Filetypes to ignore.
|
||||||
Example: {"neo-tree", "lua"}
|
Example: {"neo-tree", "lua"}
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -180,23 +180,26 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
description = "Manually refresh";
|
description = "Manually refresh";
|
||||||
};
|
};
|
||||||
jump = {
|
jump = {
|
||||||
default = "[ \"<cr>\" \"<tab>\" ]";
|
default = [
|
||||||
|
"<cr>"
|
||||||
|
"<tab>"
|
||||||
|
];
|
||||||
description = "Jump to the diagnostic or open / close folds";
|
description = "Jump to the diagnostic or open / close folds";
|
||||||
};
|
};
|
||||||
open_split = {
|
open_split = {
|
||||||
default = "[ \"<c-x>\" ]";
|
default = [ "<c-x>" ];
|
||||||
description = "Open buffer in new split";
|
description = "Open buffer in new split";
|
||||||
};
|
};
|
||||||
open_vsplit = {
|
open_vsplit = {
|
||||||
default = "[ \"<c-v>\" ]";
|
default = [ "<c-v>" ];
|
||||||
description = "Open buffer in new vsplit";
|
description = "Open buffer in new vsplit";
|
||||||
};
|
};
|
||||||
open_tab = {
|
open_tab = {
|
||||||
default = "[ \"<c-t>\" ]";
|
default = [ "<c-t>" ];
|
||||||
description = "Open buffer in new tab";
|
description = "Open buffer in new tab";
|
||||||
};
|
};
|
||||||
jump_close = {
|
jump_close = {
|
||||||
default = "[ \"o\" ]";
|
default = [ "o" ];
|
||||||
description = "Jump to the diagnostic and close the list";
|
description = "Jump to the diagnostic and close the list";
|
||||||
};
|
};
|
||||||
toggle_mode = {
|
toggle_mode = {
|
||||||
|
@ -216,15 +219,24 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
description = "Preview the diagnostic location";
|
description = "Preview the diagnostic location";
|
||||||
};
|
};
|
||||||
close_folds = {
|
close_folds = {
|
||||||
default = "[ \"zM\" \"zm\" ]";
|
default = [
|
||||||
|
"zM"
|
||||||
|
"zm"
|
||||||
|
];
|
||||||
description = "Close all folds";
|
description = "Close all folds";
|
||||||
};
|
};
|
||||||
open_folds = {
|
open_folds = {
|
||||||
default = "[ \"zR\" \"zr\" ]";
|
default = [
|
||||||
|
"zR"
|
||||||
|
"zr"
|
||||||
|
];
|
||||||
description = "Open all folds";
|
description = "Open all folds";
|
||||||
};
|
};
|
||||||
toggle_fold = {
|
toggle_fold = {
|
||||||
default = "[ \"zA\" \"za\" ]";
|
default = [
|
||||||
|
"zA"
|
||||||
|
"za"
|
||||||
|
];
|
||||||
description = "Toggle fold of current file";
|
description = "Toggle fold of current file";
|
||||||
};
|
};
|
||||||
previous = {
|
previous = {
|
||||||
|
@ -241,11 +253,9 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
Add an indent guide below the fold icons.
|
Add an indent guide below the fold icons.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
win_config = helpers.defaultNullOpts.mkAttrsOf types.anything ''
|
win_config = helpers.defaultNullOpts.mkAttrsOf types.anything {
|
||||||
{
|
|
||||||
border = "single";
|
border = "single";
|
||||||
}
|
} "Configuration for floating windows. See `|nvim_open_win()|`.";
|
||||||
'' "Configuration for floating windows. See `|nvim_open_win()|`.";
|
|
||||||
|
|
||||||
auto_open = helpers.defaultNullOpts.mkBool false ''
|
auto_open = helpers.defaultNullOpts.mkBool false ''
|
||||||
Automatically open the list when you have diagnostics.
|
Automatically open the list when you have diagnostics.
|
||||||
|
@ -264,14 +274,15 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
Automatically fold a file trouble list at creation.
|
Automatically fold a file trouble list at creation.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
auto_jump = helpers.defaultNullOpts.mkListOf types.str ''["lsp_definitions"]'' ''
|
auto_jump = helpers.defaultNullOpts.mkListOf types.str [ "lsp_definitions" ] ''
|
||||||
For the given modes, automatically jump if there is only a single result.
|
For the given modes, automatically jump if there is only a single result.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
include_declaration =
|
include_declaration = helpers.defaultNullOpts.mkListOf types.str [
|
||||||
helpers.defaultNullOpts.mkListOf types.str
|
"lsp_references"
|
||||||
''["lsp_references" "lsp_implementations" "lsp_definitions"]''
|
"lsp_implementations"
|
||||||
"For the given modes, include the declaration of the current symbol in the results.";
|
"lsp_definitions"
|
||||||
|
] "For the given modes, include the declaration of the current symbol in the results.";
|
||||||
|
|
||||||
signs =
|
signs =
|
||||||
mapAttrs
|
mapAttrs
|
||||||
|
|
|
@ -41,18 +41,17 @@ in
|
||||||
) defaultKeymaps;
|
) defaultKeymaps;
|
||||||
|
|
||||||
popupType =
|
popupType =
|
||||||
helpers.defaultNullOpts.mkEnum
|
helpers.defaultNullOpts.mkEnumFirstDefault
|
||||||
[
|
[
|
||||||
"popup"
|
"popup"
|
||||||
"horizontal"
|
"horizontal"
|
||||||
"vertical"
|
"vertical"
|
||||||
]
|
]
|
||||||
"popup"
|
|
||||||
''
|
''
|
||||||
Default AI popup type.
|
Default AI popup type.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
openaiApiKey = helpers.mkNullOrOption (with types; either str helpers.nixvimTypes.rawLua) ''
|
openaiApiKey = helpers.defaultNullOpts.mkStr null ''
|
||||||
An alternative way to set your API key.
|
An alternative way to set your API key.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -66,12 +65,12 @@ in
|
||||||
|
|
||||||
additionalInstructions = helpers.mkNullOrOption types.str "Any additional instructions.";
|
additionalInstructions = helpers.mkNullOrOption types.str "Any additional instructions.";
|
||||||
|
|
||||||
searchEngine = helpers.defaultNullOpts.mkEnum [
|
searchEngine = helpers.defaultNullOpts.mkEnumFirstDefault [
|
||||||
"google"
|
"google"
|
||||||
"duck_duck_go"
|
"duck_duck_go"
|
||||||
"stack_overflow"
|
"stack_overflow"
|
||||||
"github"
|
"github"
|
||||||
] "google" "Default search engine.";
|
] "Default search engine.";
|
||||||
|
|
||||||
hooks = {
|
hooks = {
|
||||||
requestStarted = helpers.defaultNullOpts.mkLuaFn "nil" "Callback for request start.";
|
requestStarted = helpers.defaultNullOpts.mkLuaFn "nil" "Callback for request start.";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue