mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-26 23:16:46 +00:00
feat: provide configuration options for nvim-code-action-menu
This commit is contained in:
parent
27f95e4dcb
commit
7b89a3ad25
3 changed files with 17 additions and 0 deletions
|
@ -16,5 +16,15 @@ in {
|
||||||
vim.startPlugins = ["nvim-code-action-menu"];
|
vim.startPlugins = ["nvim-code-action-menu"];
|
||||||
|
|
||||||
vim.maps.normal = mkSetBinding mappings.open ":CodeActionMenu<CR>";
|
vim.maps.normal = mkSetBinding mappings.open ":CodeActionMenu<CR>";
|
||||||
|
|
||||||
|
vim.luaConfigRC.code-action-menu = nvim.dag.entryAnywhere ''
|
||||||
|
-- border configuration
|
||||||
|
vim.g.code_action_menu_window_border = '${config.vim.ui.borders.plugins.code-action-menu.style}'
|
||||||
|
|
||||||
|
-- show individual sections of the code action menu
|
||||||
|
${lib.optionalString (cfg.nvimCodeActionMenu.show.details) "vim.g.code_action_menu_show_details = true"}
|
||||||
|
${lib.optionalString (cfg.nvimCodeActionMenu.show.diff) "vim.g.code_action_menu_show_diff = true"}
|
||||||
|
${lib.optionalString (cfg.nvimCodeActionMenu.show.actionKind) "vim.g.code_action_menu_show_action_kind = true"}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,12 @@ with lib; {
|
||||||
nvimCodeActionMenu = {
|
nvimCodeActionMenu = {
|
||||||
enable = mkEnableOption "Enable nvim code action menu";
|
enable = mkEnableOption "Enable nvim code action menu";
|
||||||
|
|
||||||
|
show = {
|
||||||
|
details = mkEnableOption "Show details" // {default = true;};
|
||||||
|
diff = mkEnableOption "Show diff" // {default = true;};
|
||||||
|
actionKind = mkEnableOption "Show action kind" // {default = true;};
|
||||||
|
};
|
||||||
|
|
||||||
mappings = {
|
mappings = {
|
||||||
open = mkMappingOption "Open code action menu [nvim-code-action-menu]" "<leader>ca";
|
open = mkMappingOption "Open code action menu [nvim-code-action-menu]" "<leader>ca";
|
||||||
};
|
};
|
||||||
|
|
|
@ -38,6 +38,7 @@ in {
|
||||||
lspsaga = mkPluginStyleOption "lspsaga";
|
lspsaga = mkPluginStyleOption "lspsaga";
|
||||||
nvim-cmp = mkPluginStyleOption "nvim-cmp";
|
nvim-cmp = mkPluginStyleOption "nvim-cmp";
|
||||||
lsp-signature = mkPluginStyleOption "lsp-signature";
|
lsp-signature = mkPluginStyleOption "lsp-signature";
|
||||||
|
code-action-menu = mkPluginStyleOption "code-actions-menu";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue