mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 10:21:31 +00:00
feat: apply new module format to lsp plugins
This commit is contained in:
parent
e09ccfd014
commit
067b523897
18 changed files with 175 additions and 31 deletions
18
modules/lsp/nvim-code-action-menu/config.nix
Normal file
18
modules/lsp/nvim-code-action-menu/config.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.lsp;
|
||||
in {
|
||||
config = mkIf (cfg.enable && cfg.nvimCodeActionMenu.enable) {
|
||||
vim.startPlugins = ["nvim-code-action-menu"];
|
||||
|
||||
vim.nnoremap = {
|
||||
"<silent><leader>ca" = ":CodeActionMenu<CR>";
|
||||
};
|
||||
};
|
||||
}
|
6
modules/lsp/nvim-code-action-menu/default.nix
Normal file
6
modules/lsp/nvim-code-action-menu/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./nvim-code-action-menu.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
16
modules/lsp/nvim-code-action-menu/nvim-code-action-menu.nix
Normal file
16
modules/lsp/nvim-code-action-menu/nvim-code-action-menu.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.lsp;
|
||||
in {
|
||||
options.vim.lsp = {
|
||||
nvimCodeActionMenu = {
|
||||
enable = mkEnableOption "nvim code action menu";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue