lsp/lightbulb: cleanup; modularize autocommand behaviour
Some checks failed
Check for typos in the source tree / check-typos (push) Has been cancelled

This commit is contained in:
raf 2025-01-19 20:26:52 +03:00
commit 9a93409606
No known key found for this signature in database
GPG key ID: EED98D11B85A2819
3 changed files with 54 additions and 11 deletions

View file

@ -1,11 +1,29 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkPluginSetupOption;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) listOf str either;
inherit (lib.nvim.types) mkPluginSetupOption luaInline;
in {
options.vim.lsp = {
lightbulb = {
enable = mkEnableOption "Lightbulb for code actions. Requires an emoji font";
setupOpts = mkPluginSetupOption "nvim-lightbulb" {};
autocmd = {
enable = mkEnableOption "updating lightbulb glyph automatically" // {default = true;};
events = mkOption {
type = listOf str;
default = ["CursorHold" "CursorHoldI"];
description = "Events on which to update nvim-lightbulb glyphs";
};
pattern = mkOption {
type = either str luaInline;
default = "*";
description = ''
File patterns or buffer names to match, determining which files or buffers trigger
glyph updates.
'';
};
};
};
};
}