From eebaa4e430f93135b39f5868d55fb39c8829eeb0 Mon Sep 17 00:00:00 2001 From: Pei Yang Ching <59727193+horriblename@users.noreply.github.com> Date: Wed, 5 Mar 2025 18:00:17 +0100 Subject: [PATCH] nvim-lint: fix bogus setupOpts --- .../plugins/diagnostics/nvim-lint/config.nix | 2 +- .../diagnostics/nvim-lint/nvim-lint.nix | 35 +++++++++---------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/modules/plugins/diagnostics/nvim-lint/config.nix b/modules/plugins/diagnostics/nvim-lint/config.nix index dac2c2f4..085140dc 100644 --- a/modules/plugins/diagnostics/nvim-lint/config.nix +++ b/modules/plugins/diagnostics/nvim-lint/config.nix @@ -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} ''; }; }; diff --git a/modules/plugins/diagnostics/nvim-lint/nvim-lint.nix b/modules/plugins/diagnostics/nvim-lint/nvim-lint.nix index 2211211e..a43c4989 100644 --- a/modules/plugins/diagnostics/nvim-lint/nvim-lint.nix +++ b/modules/plugins/diagnostics/nvim-lint/nvim-lint.nix @@ -1,27 +1,26 @@ {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. - ''; + # TODO:remove internal + enable = mkEnableOption "asynchronous linter plugin for Neovim [nvim-lint]" // {internal = true;}; + linters_by_ft = mkOption { + internal = true; # TODO: remove + 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. + ''; }; }; }