Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set keymaps overwrites the keymaps for :help" #438

Closed
rowsephx opened this issue Aug 15, 2022 · 1 comment
Closed

set keymaps overwrites the keymaps for :help" #438

rowsephx opened this issue Aug 15, 2022 · 1 comment

Comments

@rowsephx
Copy link

rowsephx commented Aug 15, 2022

I have the lspsaga hover set to K, and it only attaches during lsp:

M.on_attach = function(client, bufnr)
    local map = vim.keymap.set
    local bufopts = { noremap = true, silent = true, buffer = bufnr }

    map("n", "K", require("lspsaga.hover").render_hover_doc, { desc = "lsp hover" }, bufopts)

The problem is if the keymap gets attached, the K inside help no longer works. If you don't know what I'm referring to, check :h K

This only happens when I use lspsaga's hover, and not with vim.lsp.buf.hover. I can technically just use this, but it takes up the whole width of my window if the content is lengthy, which bothers me. I can also just bind the hover with a different key, but I'm already used to using K.

@rowsephx
Copy link
Author

Related: lewis6991/hover.nvim#1 and neovim/neovim#18997

@rowsephx rowsephx changed the title keymap set with lspsaga doesn't work in help window (:help) keymap set doesn't work in help window (:help) Aug 15, 2022
@rowsephx rowsephx changed the title keymap set doesn't work in help window (:help) set keymaps overwrites the keymaps for :help" Aug 15, 2022
@rowsephx rowsephx closed this as not planned Won't fix, can't repro, duplicate, stale Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant