feat: provide configuration options for nvim-code-action-menu

This commit is contained in:
raf 2023-07-30 19:13:05 +03:00
parent 27f95e4dcb
commit 7b89a3ad25
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
3 changed files with 17 additions and 0 deletions

View file

@ -16,5 +16,15 @@ in {
vim.startPlugins = ["nvim-code-action-menu"];
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"}
'';
};
}

View file

@ -4,6 +4,12 @@ with lib; {
nvimCodeActionMenu = {
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 = {
open = mkMappingOption "Open code action menu [nvim-code-action-menu]" "<leader>ca";
};

View file

@ -38,6 +38,7 @@ in {
lspsaga = mkPluginStyleOption "lspsaga";
nvim-cmp = mkPluginStyleOption "nvim-cmp";
lsp-signature = mkPluginStyleOption "lsp-signature";
code-action-menu = mkPluginStyleOption "code-actions-menu";
};
};
}