nvim-lint: fix bogus setupOpts

This commit is contained in:
Pei Yang Ching 2025-03-05 18:00:17 +01:00
commit eebaa4e430
2 changed files with 18 additions and 19 deletions

View file

@ -13,7 +13,7 @@ in {
vim = { vim = {
startPlugins = ["nvim-lint"]; startPlugins = ["nvim-lint"];
pluginRC.nvim-lint = entryAnywhere '' pluginRC.nvim-lint = entryAnywhere ''
require("lint").setup(${toLuaObject cfg.setupOpts}) require("lint").linters_by_ft = ${toLuaObject cfg.linters_by_ft}
''; '';
}; };
}; };

View file

@ -1,27 +1,26 @@
{lib, ...}: let {lib, ...}: let
inherit (lib.options) mkOption mkEnableOption; inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) attrsOf listOf str; inherit (lib.types) attrsOf listOf str;
inherit (lib.nvim.types) mkPluginSetupOption;
in { in {
options.vim.diagnostics.nvim-lint = { options.vim.diagnostics.nvim-lint = {
enable = mkEnableOption "asynchronous linter plugin for Neovim [nvim-lint]"; # TODO:remove internal
setupOpts = mkPluginSetupOption "nvim-lint" { enable = mkEnableOption "asynchronous linter plugin for Neovim [nvim-lint]" // {internal = true;};
linters_by_ft = mkOption { linters_by_ft = mkOption {
type = attrsOf (listOf str); internal = true; # TODO: remove
default = {}; type = attrsOf (listOf str);
example = { default = {};
text = ["vale"]; example = {
markdown = ["vale"]; 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.
'';
}; };
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.
'';
}; };
}; };
} }