weilbith / nvim-code-action-menu

Pop-up menu for code actions to show meta-information and diff preview
MIT License
577 stars 19 forks source link

Can't run `CodeActionMenu` in visual mode #67

Open Andrew15-5 opened 1 year ago

Andrew15-5 commented 1 year ago

When I select a range and run :'<,'>CodeActionMenu I get:

E481: No range allowed

But if I do this:

M.nvim_code_action_menu = {
  v = {
    ["<leader>ca"] = { "<Cmd>CodeActionMenu<CR>", "LSP Code action" },
  },
}

Then it suddenly works for the selected range. Can you explain why I'm getting an error and how to trigger the command manually in the visual mode?