mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-03-30 18:01:52 +00:00
diagnostics/nvim-lint: fix invalid setup table call
This commit is contained in:
parent
cacbac08fb
commit
bc978c4fad
2 changed files with 15 additions and 17 deletions
|
@ -13,7 +13,7 @@ in {
|
|||
vim = {
|
||||
startPlugins = ["nvim-lint"];
|
||||
pluginRC.nvim-lint = entryAnywhere ''
|
||||
require("lint").setup(${toLuaObject cfg.setupOpts})
|
||||
require("lint").linters_by_ft(${toLuaObject cfg.linters_by_ft})
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,27 +1,25 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.types) attrsOf listOf str;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.diagnostics.nvim-lint = {
|
||||
enable = mkEnableOption "asynchronous linter plugin for Neovim [nvim-lint]";
|
||||
setupOpts = mkPluginSetupOption "nvim-lint" {
|
||||
linters_by_ft = mkOption {
|
||||
type = attrsOf (listOf str);
|
||||
default = {};
|
||||
example = {
|
||||
text = ["vale"];
|
||||
markdown = ["vale"];
|
||||
};
|
||||
|
||||
description = ''
|
||||
Map of filetype to formatters. This option takes a set of
|
||||
`key = value` format where the `value` will be converted
|
||||
to its Lua equivalent. You are responsible for passing the
|
||||
correct Nix data types to generate a correct Lua value that
|
||||
conform is able to accept.
|
||||
'';
|
||||
# nvim-lint does not have a setup table.
|
||||
linters_by_ft = mkOption {
|
||||
type = attrsOf (listOf str);
|
||||
default = {};
|
||||
example = {
|
||||
text = ["vale"];
|
||||
markdown = ["vale"];
|
||||
};
|
||||
description = ''
|
||||
Map of filetype to formatters. This option takes a set of `key = value`
|
||||
format where the `value` will be converted to its Lua equivalent
|
||||
through `toLuaObject. You are responsible for passing the correct Nix
|
||||
data types to generate a correct Lua value that conform is able to
|
||||
accept.
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue