mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-29 01:19:49 +01:00
73660af2e3
Co-authored-by: Ching Pei Yang <59727193+horriblename@users.noreply.github.com> Co-authored-by: raf <raf@notashelf.dev>
24 lines
585 B
Nix
24 lines
585 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (lib.modules) mkIf;
|
|
inherit (lib.nvim.dag) entryAnywhere;
|
|
inherit (lib.nvim.lua) toLuaObject;
|
|
|
|
cfg = config.vim.lsp;
|
|
in {
|
|
config = mkIf (cfg.enable && cfg.lightbulb.enable) {
|
|
vim = {
|
|
startPlugins = ["nvim-lightbulb"];
|
|
|
|
pluginRC.lightbulb = entryAnywhere ''
|
|
vim.api.nvim_command('autocmd CursorHold,CursorHoldI * lua require\'nvim-lightbulb\'.update_lightbulb()')
|
|
|
|
-- Enable trouble diagnostics viewer
|
|
require'nvim-lightbulb'.setup(${toLuaObject cfg.lightbulb.setupOpts})
|
|
'';
|
|
};
|
|
};
|
|
}
|