From de8031f696835b5a578684ba8033e99366808aae Mon Sep 17 00:00:00 2001 From: jordivandooren Date: Fri, 6 Aug 2021 17:07:04 +0200 Subject: [PATCH] docs: improve consistency of example configuration (#1063) --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index bc93e2a355..2b28056041 100644 --- a/README.md +++ b/README.md @@ -89,9 +89,9 @@ local on_attach = function(client, bufnr) local opts = { noremap=true, silent=true } -- See `:help vim.lsp.*` for documentation on any of the below functions - buf_set_keymap('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) - buf_set_keymap('n', 'gd', 'lua vim.lsp.buf.definition()', opts) - buf_set_keymap('n', 'K', 'lua vim.lsp.buf.hover()', opts) + buf_set_keymap('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) + buf_set_keymap('n', 'gd', 'lua vim.lsp.buf.definition()', opts) + buf_set_keymap('n', 'K', 'lua vim.lsp.buf.hover()', opts) buf_set_keymap('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) buf_set_keymap('n', '', 'lua vim.lsp.buf.signature_help()', opts) buf_set_keymap('n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) @@ -105,13 +105,13 @@ local on_attach = function(client, bufnr) buf_set_keymap('n', '[d', 'lua vim.lsp.diagnostic.goto_prev()', opts) buf_set_keymap('n', ']d', 'lua vim.lsp.diagnostic.goto_next()', opts) buf_set_keymap('n', 'q', 'lua vim.lsp.diagnostic.set_loclist()', opts) - buf_set_keymap("n", "f", "lua vim.lsp.buf.formatting()", opts) + buf_set_keymap('n', 'f', 'lua vim.lsp.buf.formatting()', opts) end -- Use a loop to conveniently call 'setup' on multiple servers and -- map buffer local keybindings when the language server attaches -local servers = { "pyright", "rust_analyzer", "tsserver" } +local servers = { 'pyright', 'rust_analyzer', 'tsserver' } for _, lsp in ipairs(servers) do nvim_lsp[lsp].setup { on_attach = on_attach,