From e7035f7312aba0f0a951593d9685d6bd2c2460e8 Mon Sep 17 00:00:00 2001 From: brotifypacha Date: Thu, 13 Jun 2024 19:17:20 +0300 Subject: [PATCH 1/3] rephrase 'features' section --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c2e6bd7..ad0c727 100644 --- a/README.md +++ b/README.md @@ -21,8 +21,8 @@ if you use vscode, see `vscode-extension/README.md` ## features -1. documentSymbol -2. jump to defines -3. format file with clang-format -4. code completion -5. jump from protobuf's cpp header to proto define (only global message and enum) +1. Parsing document symbols +2. Go to definition +3. Format file with clang-format +4. Code completion +5. Jump from protobuf's cpp header to proto define (only global message and enum) From da866ffd3d0646dbdca642136573405160caa504 Mon Sep 17 00:00:00 2001 From: brotifypacha Date: Thu, 13 Jun 2024 20:02:24 +0300 Subject: [PATCH 2/3] rework `how to use` section to be `installation` --- README.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ad0c727..2fef12e 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,19 @@ A language server implementation for Google Protocol Buffers -## how to use +## installation -1. build the target `pls`, add `pls` to `PATH` -2. for `coc.nvim`, `:CocConfig` like this +Build binary + +```sh +go build -o pls . +``` + +Add it to your PATH + +Configure vim/nvim + +Using [coc.nvim](https://github.com/neoclide/coc.nvim), add it to `:CocConfig` ```json "languageserver": { @@ -17,7 +26,7 @@ A language server implementation for Google Protocol Buffers } ``` -if you use vscode, see `vscode-extension/README.md` +if you use vscode, see [vscode-extension/README.md](./vscode-extension/README.md) ## features From a21d5f5e71f1bdae15952cb3027532acda94fa74 Mon Sep 17 00:00:00 2001 From: brotifypacha Date: Thu, 13 Jun 2024 20:03:08 +0300 Subject: [PATCH 3/3] add install instructions for `lsp-config.nvim` users --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 2fef12e..fc2747e 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,28 @@ Using [coc.nvim](https://github.com/neoclide/coc.nvim), add it to `:CocConfig` } ``` +Using [lsp-config.nvim](https://github.com/neovim/nvim-lspconfig) + +```lua +-- first we need to configure our custom server +local configs = require('lspconfig.configs') +local util = require('lspconfig.util') + +configs.pls = { + default_config = { + cmd = { 'path/to/pls' }, + filetypes = { 'proto', 'cpp' }, + root_fir = util.root_pattern('.git'), + single_file_support = true, + settings = {}, + } +} + +-- then we can continue as we do with official servers +local lspconfig = require('lspconfig') +lspconfig.pls.setup {} +``` + if you use vscode, see [vscode-extension/README.md](./vscode-extension/README.md) ## features