2023-02-01 20:11:37 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
2023-11-08 03:16:46 +01:00
|
|
|
}: let
|
2024-03-12 01:46:29 +01:00
|
|
|
inherit (lib.modules) mkIf;
|
|
|
|
inherit (lib.nvim.dag) entryAnywhere;
|
2024-12-10 22:00:51 +01:00
|
|
|
inherit (lib.nvim.lua) toLuaObject;
|
2023-11-08 03:16:46 +01:00
|
|
|
|
2023-02-01 20:11:37 +01:00
|
|
|
cfg = config.vim.lsp;
|
|
|
|
in {
|
|
|
|
config = mkIf (cfg.enable && cfg.lightbulb.enable) {
|
2024-03-12 01:46:29 +01:00
|
|
|
vim = {
|
|
|
|
startPlugins = ["nvim-lightbulb"];
|
2023-02-01 20:11:37 +01:00
|
|
|
|
2024-07-20 10:30:48 +02:00
|
|
|
pluginRC.lightbulb = entryAnywhere ''
|
2024-03-12 01:46:29 +01:00
|
|
|
vim.api.nvim_command('autocmd CursorHold,CursorHoldI * lua require\'nvim-lightbulb\'.update_lightbulb()')
|
2023-02-01 20:11:37 +01:00
|
|
|
|
2024-03-12 01:46:29 +01:00
|
|
|
-- Enable trouble diagnostics viewer
|
2024-12-10 22:00:51 +01:00
|
|
|
require'nvim-lightbulb'.setup(${toLuaObject cfg.lightbulb.setupOpts})
|
2024-03-12 01:46:29 +01:00
|
|
|
'';
|
|
|
|
};
|
2023-02-01 20:11:37 +01:00
|
|
|
};
|
|
|
|
}
|