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,12 +1,12 @@
{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 {
internal = true; # TODO: remove
type = attrsOf (listOf str); type = attrsOf (listOf str);
default = {}; default = {};
example = { example = {
@ -23,5 +23,4 @@ in {
''; '';
}; };
}; };
};
} }