aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2021-08-28 20:09:15 +0200
committerWilliam Boman <william@redwill.se>2021-08-28 20:09:15 +0200
commite67cc360cb44a73fc43d1d81cbc3c77094f13432 (patch)
tree539f7220f34ff0acad192434900d3f91086a7f80
parentuse boolean value for g:lsp_installer_allow_federated_servers (diff)
downloadmason-e67cc360cb44a73fc43d1d81cbc3c77094f13432.tar
mason-e67cc360cb44a73fc43d1d81cbc3c77094f13432.tar.gz
mason-e67cc360cb44a73fc43d1d81cbc3c77094f13432.tar.bz2
mason-e67cc360cb44a73fc43d1d81cbc3c77094f13432.tar.lz
mason-e67cc360cb44a73fc43d1d81cbc3c77094f13432.tar.xz
mason-e67cc360cb44a73fc43d1d81cbc3c77094f13432.tar.zst
mason-e67cc360cb44a73fc43d1d81cbc3c77094f13432.zip
README: simplify example a bit, add clarifying comment
-rw-r--r--README.md9
1 files changed, 2 insertions, 7 deletions
diff --git a/README.md b/README.md
index ca85ad12..25a0698d 100644
--- a/README.md
+++ b/README.md
@@ -63,20 +63,15 @@ Plug 'williamboman/nvim-lsp-installer'
```lua
local lsp_installer = require("nvim-lsp-installer")
-function common_on_attach(client, bufnr)
- -- ... set up buffer keymaps, etc.
-end
-
lsp_installer.on_server_ready(function(server)
- local opts = {
- on_attach = common_on_attach,
- }
+ local opts = {}
-- (optional) Customize the options passed to the server
-- if server.name == "tsserver" then
-- opts.root_dir = function() ... end
-- end
+ -- This setup() function is exactly the same as lspconfig's setup function (:help lspconfig-quickstart)
server:setup(opts)
vim.cmd [[ do User LspAttachBuffers ]]
end)