Skip to content

Commit

Permalink
Merge pull request neovim#830 from csaez/patch-1
Browse files Browse the repository at this point in the history
Fix conditional keymap in README
  • Loading branch information
mjlbach authored Apr 10, 2021
2 parents c7adf1f + 38ddab0 commit ae8fe11
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,9 @@ local on_attach = function(client, bufnr)
-- 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
Expand Down

0 comments on commit ae8fe11

Please sign in to comment.