nvim-lightbulb: fix helpers

This commit is contained in:
Pedro Alves 2023-01-23 14:17:07 +00:00
parent a178cf7268
commit 1233dc4ed5

View file

@ -1,10 +1,11 @@
{ { pkgs
pkgs, , lib
lib, , config
config, , ...
helpers,
...
}: }:
let
helpers = import ../helpers.nix { inherit lib; };
in
with lib; { with lib; {
options.plugins.nvim-lightbulb = { options.plugins.nvim-lightbulb = {
enable = mkEnableOption "nvim-lightbulb, showing available code actions"; enable = mkEnableOption "nvim-lightbulb, showing available code actions";
@ -66,7 +67,8 @@ with lib; {
}; };
}; };
config = let config =
let
cfg = config.plugins.nvim-lightbulb; cfg = config.plugins.nvim-lightbulb;
setupOptions = { setupOptions = {
inherit (cfg) ignore sign autocmd; inherit (cfg) ignore sign autocmd;
@ -85,7 +87,7 @@ with lib; {
}; };
in in
mkIf cfg.enable { mkIf cfg.enable {
extraPlugins = [cfg.package]; extraPlugins = [ cfg.package ];
extraConfigLua = '' extraConfigLua = ''
require("nvim-lightbulb").setup(${helpers.toLuaObject setupOptions}) require("nvim-lightbulb").setup(${helpers.toLuaObject setupOptions})
''; '';