Compare commits

...

3 commits

Author SHA1 Message Date
Omar Abragh
3804e650ad
Merge 6a74c45cda into 48bcd5d695 2024-12-09 21:09:00 +01:00
Ching Pei Yang
6a74c45cda
Merge branch 'main' into fix/lightbulb-opts 2024-12-09 21:08:57 +01:00
Omar Abragh
3cdf557acd lightbulb: add setupOpts option 2024-12-09 14:01:32 +00:00
2 changed files with 4 additions and 1 deletions

View file

@ -5,6 +5,7 @@
}: let }: let
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
inherit (lib.nvim.dag) entryAnywhere; inherit (lib.nvim.dag) entryAnywhere;
inherit (lib.nvim.lua) toLuaObject;
cfg = config.vim.lsp; cfg = config.vim.lsp;
in { in {
@ -16,7 +17,7 @@ in {
vim.api.nvim_command('autocmd CursorHold,CursorHoldI * lua require\'nvim-lightbulb\'.update_lightbulb()') vim.api.nvim_command('autocmd CursorHold,CursorHoldI * lua require\'nvim-lightbulb\'.update_lightbulb()')
-- Enable trouble diagnostics viewer -- Enable trouble diagnostics viewer
require'nvim-lightbulb'.setup() require'nvim-lightbulb'.setup(${toLuaObject cfg.lightbulb.setupOpts})
''; '';
}; };
}; };

View file

@ -1,9 +1,11 @@
{lib, ...}: let {lib, ...}: let
inherit (lib.options) mkEnableOption; inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkPluginSetupOption;
in { in {
options.vim.lsp = { options.vim.lsp = {
lightbulb = { lightbulb = {
enable = mkEnableOption "Lightbulb for code actions. Requires an emoji font"; enable = mkEnableOption "Lightbulb for code actions. Requires an emoji font";
setupOpts = mkPluginSetupOption "nvim-lightbulb" {};
}; };
}; };
} }