mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-26 15:06:45 +00:00
feat: add nvim-code-action-menu keybindings
This commit is contained in:
parent
25c9bb0962
commit
46c602f74d
2 changed files with 12 additions and 10 deletions
|
@ -6,12 +6,15 @@
|
|||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.lsp;
|
||||
|
||||
self = import ./nvim-code-action-menu.nix {inherit lib;};
|
||||
|
||||
mappingDefinitions = self.options.vim.lsp.nvimCodeActionMenu.mappings;
|
||||
mappings = addDescriptionsToMappings cfg.nvimCodeActionMenu.mappings mappingDefinitions;
|
||||
in {
|
||||
config = mkIf (cfg.enable && cfg.nvimCodeActionMenu.enable) {
|
||||
vim.startPlugins = ["nvim-code-action-menu"];
|
||||
|
||||
vim.maps.normal = {
|
||||
"<silent><leader>ca" = {action = ":CodeActionMenu<CR>";};
|
||||
};
|
||||
vim.maps.normal = mkSetBinding mappings.open ":CodeActionMenu<CR>";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; {
|
||||
{lib, ...}:
|
||||
with lib; {
|
||||
options.vim.lsp = {
|
||||
nvimCodeActionMenu = {
|
||||
enable = mkEnableOption "Enable nvim code action menu";
|
||||
|
||||
mappings = {
|
||||
open = mkMappingOption "Open code action menu [nvim-code-action-menu]" "<leader>ca";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue