{"id":13476386,"url":"https://github.com/weilbith/nvim-code-action-menu","last_synced_at":"2025-03-27T02:32:47.441Z","repository":{"id":39650490,"uuid":"410433681","full_name":"weilbith/nvim-code-action-menu","owner":"weilbith","description":"Pop-up menu for code actions to show meta-information and diff preview","archived":true,"fork":false,"pushed_at":"2023-12-11T09:35:13.000Z","size":127,"stargazers_count":575,"open_issues_count":24,"forks_count":19,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-20T00:52:53.188Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weilbith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-09-26T02:53:34.000Z","updated_at":"2025-03-10T07:39:58.000Z","dependencies_parsed_at":"2024-01-15T03:58:52.700Z","dependency_job_id":"12835783-81f5-4af3-bf31-534c0187a566","html_url":"https://github.com/weilbith/nvim-code-action-menu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weilbith%2Fnvim-code-action-menu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weilbith%2Fnvim-code-action-menu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weilbith%2Fnvim-code-action-menu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weilbith%2Fnvim-code-action-menu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weilbith","download_url":"https://codeload.github.com/weilbith/nvim-code-action-menu/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245769526,"owners_count":20669195,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T16:01:29.708Z","updated_at":"2025-03-27T02:32:47.188Z","avatar_url":"https://github.com/weilbith.png","language":"Lua","funding_links":[],"categories":["Lua","LSP"],"sub_categories":["(requires Neovim 0.5)"],"readme":"# NeoVim Code Action Menu\n\n\u003e [!WARNING]\n\u003e My apologies for archiving this repository. Though I guess it doesn't make\n\u003e a difference because I left this plugin unmaintained for quite some time now.\n\u003e I shared this plugin too early, it gathered attention too quickly and it was\n\u003e just too unsophisticated. I failed to rewrite this plugin multiple times to a\n\u003e state I like. Finally I got disappointed myself and just left it where is.\n\u003e\n\u003e By now there are other nice alternatives like support from\n\u003e [fzf-lua](https://github.com/ibhagwan/fzf-lua) or\n\u003e [actions-preview.nvim](https://github.com/aznhe21/actions-preview.nvim). So\n\u003e I finally archive this repository now. It still works as before. But it makes\n\u003e kinda official that it was a failed experiment.\n\n\u003e **NOTE:**\n\u003e This is still a beta version. Though it runs quite stable since some months,\n\u003e it has not been tested with many language servers. Moreover there is a good\n\u003e amount of documentation missing.\n\n![gscreenshot_2021-09-28-094359](https://user-images.githubusercontent.com/12543647/135045142-dedfe9bb-01a0-4ed0-8d40-1dc4f2c2b254.png)\n\nThis plugin provides a handy pop-up menu for code actions. Its key competence is\nto provide the user with more detailed insights for each available code action.\nSuch include meta data as well as a preview diff for certain types of actions.\nThese includes:\n  - descriptive title (usually shown by all code action \"menu\" solutions)\n  - kind of the action (e.g. refactor, command, quickfix, organize imports, ...)\n  - name of the action\n  - if the action is the preferred one according to the server (preferred\n    actions get automatically sorted to the top of the menu)\n  - if the action is disabled (disabled actions can be used and get\n    automatically sorted to the bottom of the menu with a special hightlight)\n  - a preview of the changes this action will do in a diff view for all affected\n    files (includes a diff count box visualization as GitHub pul requests do)\n  - ...more will come, especially when servers start to use the `dataSupport`\n    capability for the code action provider\n\nThe experience for all these features might vary according to the implementation\nof the used language server. Especially for the diff view, do some servers still\nuse the old code action data scheme from older Language Server Protocol versions\nwhich include less information for the clients. However this plugin tries to\ninspect those actions more deeply and try to parse as much information as\npossible.\n\nThis plugin is just a menu for code actions. Nothing more and nothing less. It\nis a minimal plugin that focuses on one single task. It tries to be a contrast\nto other plugins which also provide a code action menu but being more advanced\na do not provide any other functionality.\n\n## Installation\n\nInstall the plugin with your favorite manager tool. Here is an example using\n[packer.nvim](https://github.com/wbthomason/packer.nvim/issues):\n\n```lua\nrequire('packer').use({\n  'weilbith/nvim-code-action-menu',\n  cmd = 'CodeActionMenu',\n})\n```\n\nIt is recommended to use the\n[nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) plugin to attach\nlanguage clients to your buffers.\n\nFurthermore is quite handy to also use the\n[nvim-lightbulb](https://github.com/kosayoda/nvim-lightbulb) plugin. It will\nautomatically inform the user visually if any code actions are available for the\ncurrent cursor location.\n\nPlease note that LSP and other features for this plugin require you to have at\nleast `v0.5.0` of NeoVim.\n\n## Usage\n\nThe plugin has a single command only: `CodeActionMenu` This command works in\nnormal mode, as well as visual mode. For the latter mode it will switch to the\ncode range mode automatically.\nThe menu can be navigated as usual with `j` and `k`. The docked windows will\nalways display further information for the currently selected action. Hitting\n`\u003cCR\u003e` will execute the currently selected code action. Alternatively you can\ntype the number in front of the list entry to jump directly to this action and\napply it right away. In any case the menu window will close itself. If you want\nto manually close the window without selecting an action, just hit `\u003cEsc\u003e` or\n`q`.\n\nThis plugin only supports nvim_lsp, if you are using coc.nvim, you can install\n[coc-code-action-menu.nvim](https://github.com/xiyaowong/coc-code-action-menu.nvim)\nto add support for coc.nvim.\n\n## Customization\n\nThe plugin allows for a bunch of customization. While there is no classic\nconfiguration (yet) it can be adapted by using traditional (Neo)Vim techniques.\nEach part of the menu uses its own filetype. This gets used to separate the\nlogic implementation in Lua from other parts like highlighting, buffer options\nand mappings. As beautiful side effect is that the user can do so too. This\nmeans you can just define some\n`after/{ftplugin,syntax}/code-action-menu-{menu,details,diff,warning}.{vim,lua}`\nfiles yourself and get the full power of customization.\n\nAt the current state of documentation I must redirect you to the syntax files in\nthe source code of the plugin to get a list of available highlight groups. The\nuser can simply overwrite any of the default mappings to his liking.\n\n### Window Appearance\n\nThe following global variables can be set to alternate the appearance of the\nwindows:\n\n```lua\nvim.g.code_action_menu_window_border = 'single'\n```\n\n```vim\nlet g:code_action_menu_window_border = 'single'\n```\n### Disable parts of the UI\n\nThe following global variables can be set to disable parts of the user\ninterface:\n\n```lua\nvim.g.code_action_menu_show_details = false\nvim.g.code_action_menu_show_diff = false\nvim.g.code_action_menu_show_action_kind = false\n```\n\n```vim\nlet g:code_action_menu_show_details = v:false\nlet g:code_action_menu_show_diff = v:false\nlet g:code_action_menu_show_action_kind = v:false\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweilbith%2Fnvim-code-action-menu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweilbith%2Fnvim-code-action-menu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweilbith%2Fnvim-code-action-menu/lists"}