Skip to content

Code action keybinding isn't available in visual mode #1060

Description

@byrmsh

Describe the bug

Code action keybinding vim.lsp.buf.code_action is not available in visual mode. This prevents using refactoring functionality such as "extract selected code into function". Is this intentional? If it is not, I can quickly send a PR. I searched for this on the issues and pull requests but couldn't find anything matching.

To Reproduce

  1. Select any code block in visual mode in a buffer with an LSP client running
  2. Use default keybinding <leader>ca for code action
  3. Selected code is deleted and mode is set to insert mode

Desktop

  • OS: Linux
  • Terminal: Alacritty

Neovim Version

NVIM v0.10.0
Build type: RelWithDebInfo
LuaJIT 2.1.1713773202
Run "nvim -V1 -v" for more info

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions