mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-05 02:07:19 +00:00
modules: start breaking down core modules; simplify tree structure
This commit is contained in:
parent
4703ed7731
commit
370913e827
242 changed files with 178 additions and 124 deletions
22
modules/plugins/lsp/lightbulb/config.nix
Normal file
22
modules/plugins/lsp/lightbulb/config.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf nvim;
|
||||
|
||||
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()
|
||||
'';
|
||||
};
|
||||
}
|
||||
6
modules/plugins/lsp/lightbulb/default.nix
Normal file
6
modules/plugins/lsp/lightbulb/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./lightbulb.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
||||
13
modules/plugins/lsp/lightbulb/lightbulb.nix
Normal file
13
modules/plugins/lsp/lightbulb/lightbulb.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption;
|
||||
in {
|
||||
options.vim.lsp = {
|
||||
lightbulb = {
|
||||
enable = mkEnableOption "Lightbulb for code actions. Requires an emoji font";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue