mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
feat(defaults): map gO to LSP document_symbol #30781
This commit is contained in:
parent
0086ee90dd
commit
0b7cc014fc
@ -77,6 +77,7 @@ Some keymaps are created unconditionally when Nvim starts:
|
||||
- "gra" is mapped in Normal and Visual mode to |vim.lsp.buf.code_action()|
|
||||
- "grr" is mapped in Normal mode to |vim.lsp.buf.references()|
|
||||
- "gri" is mapped in Normal mode to |vim.lsp.buf.implementation()|
|
||||
- "gO" is mapped in Normal mode to |vim.lsp.buf.document_symbol()|
|
||||
- CTRL-S is mapped in Insert mode to |vim.lsp.buf.signature_help()|
|
||||
|
||||
If not wanted, these keymaps can be removed at any time using
|
||||
|
@ -160,6 +160,7 @@ DEFAULTS
|
||||
• |grn| in Normal mode maps to |vim.lsp.buf.rename()|
|
||||
• |grr| in Normal mode maps to |vim.lsp.buf.references()|
|
||||
• |gri| in Normal mode maps to |vim.lsp.buf.implementation()|
|
||||
• |gO| in Normal mode maps to |vim.lsp.buf.document_symbol()|
|
||||
• |gra| in Normal and Visual mode maps to |vim.lsp.buf.code_action()|
|
||||
• CTRL-S in Insert mode maps to |vim.lsp.buf.signature_help()|
|
||||
• Mouse |popup-menu| includes an "Open in web browser" item when you right-click
|
||||
|
@ -151,6 +151,7 @@ of these in your config by simply removing the mapping, e.g. ":unmap Y".
|
||||
- |grr|
|
||||
- |gra|
|
||||
- |gri|
|
||||
- |gO|
|
||||
- <C-S> |i_CTRL-S|
|
||||
- ]d |]d-default|
|
||||
- [d |[d-default|
|
||||
|
@ -157,7 +157,7 @@ do
|
||||
--- client is attached. If no client is attached, or if a server does not support a capability, an
|
||||
--- error message is displayed rather than exhibiting different behavior.
|
||||
---
|
||||
--- See |grr|, |grn|, |gra|, |gri|, |i_CTRL-S|.
|
||||
--- See |grr|, |grn|, |gra|, |gri|, |gO|, |i_CTRL-S|.
|
||||
do
|
||||
vim.keymap.set('n', 'grn', function()
|
||||
vim.lsp.buf.rename()
|
||||
@ -175,6 +175,10 @@ do
|
||||
vim.lsp.buf.implementation()
|
||||
end, { desc = 'vim.lsp.buf.implementation()' })
|
||||
|
||||
vim.keymap.set('n', 'gO', function()
|
||||
vim.lsp.buf.document_symbol()
|
||||
end, { desc = 'vim.lsp.buf.document_symbol()' })
|
||||
|
||||
vim.keymap.set('i', '<C-S>', function()
|
||||
vim.lsp.buf.signature_help()
|
||||
end, { desc = 'vim.lsp.buf.signature_help()' })
|
||||
|
Loading…
Reference in New Issue
Block a user