modules/lsp: switch to explicit lib calls

This commit is contained in:
raf 2024-03-12 03:46:29 +03:00
commit c488f0490f
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
33 changed files with 285 additions and 273 deletions

View file

@ -3,20 +3,21 @@
lib,
...
}: let
inherit (lib) mkIf nvim;
inherit (lib.modules) mkIf;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.lsp;
in {
config = mkIf (cfg.enable && cfg.lightbulb.enable) {
vim.startPlugins = ["nvim-lightbulb"];
vim = {
startPlugins = ["nvim-lightbulb"];
vim.configRC.lightbulb = nvim.dag.entryAnywhere ''
autocmd CursorHold,CursorHoldI * lua require'nvim-lightbulb'.update_lightbulb()
'';
luaConfigRC.lightbulb = entryAnywhere ''
vim.api.nvim_command('autocmd CursorHold,CursorHoldI * lua require\'nvim-lightbulb\'.update_lightbulb()')
vim.luaConfigRC.lightbulb = nvim.dag.entryAnywhere ''
-- Enable trouble diagnostics viewer
require'nvim-lightbulb'.setup()
'';
-- Enable trouble diagnostics viewer
require'nvim-lightbulb'.setup()
'';
};
};
}

View file

@ -1,4 +1,4 @@
_: {
{
imports = [
./lightbulb.nix
./config.nix

View file

@ -1,9 +1,5 @@
{
config,
lib,
...
}: let
inherit (lib) mkEnableOption;
{lib, ...}: let
inherit (lib.options) mkEnableOption;
in {
options.vim.lsp = {
lightbulb = {