diff options
author | Mathias Fußenegger <mfussenegger@users.noreply.github.com> | 2023-07-14 18:47:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-14 09:47:18 -0700 |
commit | 33e1a8cd7042816a064c0d2bf32b6570d7e88b79 (patch) | |
tree | 252a6296f031c413e441f4d4c88ed82eb24710c0 /runtime/doc | |
parent | fd9ac5aa8e1c769d8cb22275206145b8d2603687 (diff) | |
download | rneovim-33e1a8cd7042816a064c0d2bf32b6570d7e88b79.tar.gz rneovim-33e1a8cd7042816a064c0d2bf32b6570d7e88b79.tar.bz2 rneovim-33e1a8cd7042816a064c0d2bf32b6570d7e88b79.zip |
feat(lsp): map K to hover by default #24331
Related: https://github.com/neovim/neovim/issues/24252
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/lsp.txt | 3 | ||||
-rw-r--r-- | runtime/doc/news.txt | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 3aef5bb7dd..450690fe3b 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -58,6 +58,8 @@ options are not restored when the LSP client is stopped or detached. - 'formatexpr' is set to |vim.lsp.formatexpr()|, so you can format lines via |gq| if the language server supports it. - To opt out of this use |gw| instead of gq, or set 'formatexpr' on LspAttach. +- |K| is mapped to |vim.lsp.buf.hover()| unless |'keywordprg'| is customized or + a custom keymap for `K` exists. *lsp-defaults-disable* To override the above defaults, set or unset the options on |LspAttach|: >lua @@ -65,6 +67,7 @@ To override the above defaults, set or unset the options on |LspAttach|: >lua callback = function(ev) vim.bo[ev.buf].formatexpr = nil vim.bo[ev.buf].omnifunc = nil + vim.keymap.del("n", "K", { bufnr = ev.buf }) end, }) diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 51ff0b4468..e16bcafac2 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -156,6 +156,10 @@ The following changes to existing APIs or features add new behavior. `vim.ui.open` or remap `gx`. To continue using netrw (deprecated): >vim :call netrw#BrowseX(expand(exists("g:netrw_gx")? g:netrw_gx : '<cfile>'), netrw#CheckIfRemote())<CR> +• |vim.lsp.start()| now maps |K| to use |vim.lsp.buf.hover()| if the server + supports it, unless |'keywordprg'| was customized before calling + |vim.lsp.start()|. + ============================================================================== REMOVED FEATURES *news-removed* |