mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-05 06:44:33 +02:00
nvim-lightbulb: fix helpers
This commit is contained in:
parent
a178cf7268
commit
1233dc4ed5
1 changed files with 27 additions and 25 deletions
|
@ -1,10 +1,11 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, lib
|
||||||
lib,
|
, config
|
||||||
config,
|
, ...
|
||||||
helpers,
|
|
||||||
...
|
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
helpers = import ../helpers.nix { inherit lib; };
|
||||||
|
in
|
||||||
with lib; {
|
with lib; {
|
||||||
options.plugins.nvim-lightbulb = {
|
options.plugins.nvim-lightbulb = {
|
||||||
enable = mkEnableOption "nvim-lightbulb, showing available code actions";
|
enable = mkEnableOption "nvim-lightbulb, showing available code actions";
|
||||||
|
@ -62,30 +63,31 @@ with lib; {
|
||||||
|
|
||||||
events =
|
events =
|
||||||
helpers.defaultNullOpts.mkNullable (types.listOf types.str)
|
helpers.defaultNullOpts.mkNullable (types.listOf types.str)
|
||||||
''["CursorHold" "CursorHoldI"]'' "";
|
''["CursorHold" "CursorHoldI"]'' "";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = let
|
config =
|
||||||
cfg = config.plugins.nvim-lightbulb;
|
let
|
||||||
setupOptions = {
|
cfg = config.plugins.nvim-lightbulb;
|
||||||
inherit (cfg) ignore sign autocmd;
|
setupOptions = {
|
||||||
float = {
|
inherit (cfg) ignore sign autocmd;
|
||||||
inherit (cfg.float) enabled text;
|
float = {
|
||||||
win_opts = cfg.float.winOpts;
|
inherit (cfg.float) enabled text;
|
||||||
|
win_opts = cfg.float.winOpts;
|
||||||
|
};
|
||||||
|
virtual_text = {
|
||||||
|
inherit (cfg.virtualText) enabled text;
|
||||||
|
hl_mode = cfg.virtualText.hlMode;
|
||||||
|
};
|
||||||
|
status_text = {
|
||||||
|
inherit (cfg.statusText) enabled text;
|
||||||
|
text_unavailable = cfg.statusText.textUnavailable;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
virtual_text = {
|
in
|
||||||
inherit (cfg.virtualText) enabled text;
|
|
||||||
hl_mode = cfg.virtualText.hlMode;
|
|
||||||
};
|
|
||||||
status_text = {
|
|
||||||
inherit (cfg.statusText) enabled text;
|
|
||||||
text_unavailable = cfg.statusText.textUnavailable;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
mkIf cfg.enable {
|
mkIf cfg.enable {
|
||||||
extraPlugins = [cfg.package];
|
extraPlugins = [ cfg.package ];
|
||||||
extraConfigLua = ''
|
extraConfigLua = ''
|
||||||
require("nvim-lightbulb").setup(${helpers.toLuaObject setupOptions})
|
require("nvim-lightbulb").setup(${helpers.toLuaObject setupOptions})
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue