aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lspconfig.txt
diff options
context:
space:
mode:
authorGithub Actions <actions@github>2021-04-10 06:58:47 +0000
committerGithub Actions <actions@github>2021-04-10 06:58:47 +0000
commitee538c3e8e71244473fe8377cbb36d04d896dd32 (patch)
treef4f182eb403c70b58762f0296b072fc7c30d9570 /doc/lspconfig.txt
parentMerge pull request #830 from csaez/patch-1 (diff)
downloadnvim-lspconfig-ee538c3e8e71244473fe8377cbb36d04d896dd32.tar
nvim-lspconfig-ee538c3e8e71244473fe8377cbb36d04d896dd32.tar.gz
nvim-lspconfig-ee538c3e8e71244473fe8377cbb36d04d896dd32.tar.bz2
nvim-lspconfig-ee538c3e8e71244473fe8377cbb36d04d896dd32.tar.lz
nvim-lspconfig-ee538c3e8e71244473fe8377cbb36d04d896dd32.tar.xz
nvim-lspconfig-ee538c3e8e71244473fe8377cbb36d04d896dd32.tar.zst
nvim-lspconfig-ee538c3e8e71244473fe8377cbb36d04d896dd32.zip
[docgen] Update README.md
skip-checks: true
Diffstat (limited to 'doc/lspconfig.txt')
-rw-r--r--doc/lspconfig.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/lspconfig.txt b/doc/lspconfig.txt
index 203d1c0d..f300e70f 100644
--- a/doc/lspconfig.txt
+++ b/doc/lspconfig.txt
@@ -226,8 +226,9 @@ omnicomplete to use the lsp.omnifunc. See `:help lsp` for more details
-- Set some keybinds conditional on server capabilities
if client.resolved_capabilities.document_formatting then
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
- elseif client.resolved_capabilities.document_range_formatting then
- buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.range_formatting()<CR>", opts)
+ end
+ if client.resolved_capabilities.document_range_formatting then
+ buf_set_keymap("v", "<space>f", "<cmd>lua vim.lsp.buf.range_formatting()<CR>", opts)
end
-- Set autocommands conditional on server_capabilities