feat: apply new module format to lsp plugins

This commit is contained in:
NotAShelf 2023-02-27 22:25:39 +03:00
commit 067b523897
No known key found for this signature in database
GPG key ID: 5B5C8895F28445F1
18 changed files with 175 additions and 31 deletions

View file

@ -0,0 +1,23 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.lsp;
in {
config = mkIf (cfg.enable && cfg.lightbulb.enable) {
vim.startPlugins = ["nvim-lightbulb"];
vim.configRC.lightbulb = nvim.dag.entryAnywhere ''
autocmd CursorHold,CursorHoldI * lua require'nvim-lightbulb'.update_lightbulb()
'';
vim.luaConfigRC.lightbulb = nvim.dag.entryAnywhere ''
-- Enable trouble diagnostics viewer
require'nvim-lightbulb'.setup()
'';
};
}

View file

@ -0,0 +1,6 @@
_: {
imports = [
./lightbulb.nix
./config.nix
];
}

View file

@ -0,0 +1,16 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.lsp;
in {
options.vim.lsp = {
lightbulb = {
enable = mkEnableOption "lightbulb for code actions. Requires emoji font";
};
};
}