2023-02-01 19:11:37 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib;
|
|
|
|
with builtins; let
|
|
|
|
cfg = config.vim.lsp;
|
2023-05-02 21:22:35 +00:00
|
|
|
|
|
|
|
self = import ./nvim-code-action-menu.nix {inherit lib;};
|
|
|
|
|
|
|
|
mappingDefinitions = self.options.vim.lsp.nvimCodeActionMenu.mappings;
|
|
|
|
mappings = addDescriptionsToMappings cfg.nvimCodeActionMenu.mappings mappingDefinitions;
|
2023-02-01 19:11:37 +00:00
|
|
|
in {
|
|
|
|
config = mkIf (cfg.enable && cfg.nvimCodeActionMenu.enable) {
|
|
|
|
vim.startPlugins = ["nvim-code-action-menu"];
|
|
|
|
|
2023-05-02 21:22:35 +00:00
|
|
|
vim.maps.normal = mkSetBinding mappings.open ":CodeActionMenu<CR>";
|
2023-02-01 19:11:37 +00:00
|
|
|
};
|
|
|
|
}
|