Skip to content

Commit

Permalink
lightbulb: add setupOpts option (#492)
Browse files Browse the repository at this point in the history
Co-authored-by: Ching Pei Yang <[email protected]>
Co-authored-by: raf <[email protected]>
  • Loading branch information
3 people authored Dec 10, 2024
1 parent 4daa920 commit 73660af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/plugins/lsp/lightbulb/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
}: let
inherit (lib.modules) mkIf;
inherit (lib.nvim.dag) entryAnywhere;
inherit (lib.nvim.lua) toLuaObject;

cfg = config.vim.lsp;
in {
Expand All @@ -16,7 +17,7 @@ in {
vim.api.nvim_command('autocmd CursorHold,CursorHoldI * lua require\'nvim-lightbulb\'.update_lightbulb()')
-- Enable trouble diagnostics viewer
require'nvim-lightbulb'.setup()
require'nvim-lightbulb'.setup(${toLuaObject cfg.lightbulb.setupOpts})
'';
};
};
Expand Down
2 changes: 2 additions & 0 deletions modules/plugins/lsp/lightbulb/lightbulb.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkPluginSetupOption;
in {
options.vim.lsp = {
lightbulb = {
enable = mkEnableOption "Lightbulb for code actions. Requires an emoji font";
setupOpts = mkPluginSetupOption "nvim-lightbulb" {};
};
};
}

0 comments on commit 73660af

Please sign in to comment.