diff --git a/README.md b/README.md index 783208f..d0d750e 100644 --- a/README.md +++ b/README.md @@ -8,25 +8,11 @@ A Language Server for **proto3** files. It uses tree-sitter parser for all opera - [x] Go to definition - [x] Diagnostics -## Installation and testing +## Installation -Run `cargo install protols` to install and add below to your `init.lua` until we start shipping this via Mason. +Run `cargo install protols` to install and add below to setup using [`nvim-lspconfig`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#protols) until we start shipping this via Mason. ```lua -local client = vim.lsp.start_client({ - name = "protols", - cmd = { vim.fn.expand("$HOME/.cargo/bin/protols") }, -}) - -if not client then - vim.notify("Could not connect to protols server") -end - -vim.api.nvim_create_autocmd("FileType", { - pattern = "proto", - callback = function() - vim.lsp.buf_attach_client(0, client) - end, -}) +require'lspconfig'.protols.setup{} ```