From 16a7f2202e9bc7075d934390f95ff23a456e43b9 Mon Sep 17 00:00:00 2001 From: mohammadkhan Date: Tue, 25 Jun 2024 15:57:16 +0530 Subject: [PATCH 1/2] docs: update readme to use nvim-lspconfig --- README.md | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 783208f..55d6dff 100644 --- a/README.md +++ b/README.md @@ -10,23 +10,9 @@ A Language Server for **proto3** files. It uses tree-sitter parser for all opera ## Installation and testing -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` 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{} ``` From 1e15ec4311de34915a50171e04d5a0aca3304bf9 Mon Sep 17 00:00:00 2001 From: mohammadkhan Date: Tue, 25 Jun 2024 16:02:28 +0530 Subject: [PATCH 2/2] docs: fix title and link for file --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 55d6dff..d0d750e 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ 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 setup using `nvim-lspconfig` 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 require'lspconfig'.protols.setup{}