From 10ce9d569538e516946643620aee2dc7ea8e2273 Mon Sep 17 00:00:00 2001 From: zhihaopan Date: Fri, 5 Jul 2024 12:02:24 +0800 Subject: [PATCH] up --- .gitconfig | 2 +- .gitignore | 2 +- README.md | 12 ++++++------ components/completion.go | 5 +++-- components/document_symbol.go | 6 +++--- components/format.go | 4 ++-- components/hover.go | 6 +++--- components/jump_definition.go | 8 ++++---- go-lsp/example/example | Bin 4070414 -> 4095454 bytes go-lsp/example/main.go | 6 +++--- go-lsp/jsonrpc/session.go | 2 +- go-lsp/lsp/builtin.go | 2 +- go-lsp/lsp/methods.go | 4 ++-- go-lsp/lsp/methods.temp.go | 2 +- go-lsp/lsp/methods_gen.go | 4 ++-- go-lsp/lsp/methods_gen_test.go | 2 +- go-lsp/lsp/option.go | 2 +- go-lsp/lsp/server.go | 4 ++-- go-lsp/lsp/stdio.go | 2 +- go.mod | 2 +- main.go | 12 ++++++------ proto/parser/parser.go | 2 +- proto/parser/proto.go | 4 ++-- proto/view/file.go | 4 ++-- proto/view/view.go | 8 ++++---- vscode-extension/README.md | 2 +- vscode-extension/src/extension.ts | 4 ++-- 27 files changed, 57 insertions(+), 56 deletions(-) diff --git a/.gitconfig b/.gitconfig index 868bab7..116c981 100644 --- a/.gitconfig +++ b/.gitconfig @@ -1 +1 @@ -./pls +./protobuf-language-server diff --git a/.gitignore b/.gitignore index 3b9a313..1a9b7ac 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ .idea .DS_Strore -pls +protobuf-language-server diff --git a/README.md b/README.md index bca99d3..ea4e867 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# pls +# protobuf-language-server A language server implementation for Google Protocol Buffers @@ -8,7 +8,7 @@ A language server implementation for Google Protocol Buffers Build binary ```sh -go build -o pls . +go install github.com/lasorda/protobuf-language-server@master ``` Add it to your PATH @@ -20,7 +20,7 @@ Using [coc.nvim](https://github.com/neoclide/coc.nvim), add it to `:CocConfig` ```json "languageserver": { "proto" :{ - "command": "pls", + "command": "protobuf-language-server", "filetypes": ["proto", "cpp"] } } @@ -33,9 +33,9 @@ Using [lsp-config.nvim](https://github.com/neovim/nvim-lspconfig) local configs = require('lspconfig.configs') local util = require('lspconfig.util') -configs.pls = { +configs.protobuf-language-server = { default_config = { - cmd = { 'path/to/pls' }, + cmd = { 'path/to/protobuf-language-server' }, filetypes = { 'proto', 'cpp' }, root_fir = util.root_pattern('.git'), single_file_support = true, @@ -45,7 +45,7 @@ configs.pls = { -- then we can continue as we do with official servers local lspconfig = require('lspconfig') -lspconfig.pls.setup {} +lspconfig.protobuf-language-server.setup {} ``` if you use vscode, see [vscode-extension/README.md](./vscode-extension/README.md) diff --git a/components/completion.go b/components/completion.go index edea2ce..ef403cb 100644 --- a/components/completion.go +++ b/components/completion.go @@ -2,11 +2,12 @@ package components import ( "context" - "pls/proto/view" "strings" "time" - "pls/go-lsp/lsp/defines" + "github.com/lasorda/protobuf-language-server/proto/view" + + "github.com/lasorda/protobuf-language-server/go-lsp/lsp/defines" ) var ( diff --git a/components/document_symbol.go b/components/document_symbol.go index 97688d0..1008c87 100644 --- a/components/document_symbol.go +++ b/components/document_symbol.go @@ -2,10 +2,10 @@ package components import ( "context" - "pls/proto/view" + "github.com/lasorda/protobuf-language-server/proto/view" - "pls/go-lsp/logs" - "pls/go-lsp/lsp/defines" + "github.com/lasorda/protobuf-language-server/go-lsp/logs" + "github.com/lasorda/protobuf-language-server/go-lsp/lsp/defines" ) func ProvideDocumentSymbol(ctx context.Context, req *defines.DocumentSymbolParams) (result *[]defines.DocumentSymbol, err error) { diff --git a/components/format.go b/components/format.go index 840a513..3d08ef7 100644 --- a/components/format.go +++ b/components/format.go @@ -8,9 +8,9 @@ import ( "math" "os/exec" "path/filepath" - "pls/proto/view" + "github.com/lasorda/protobuf-language-server/proto/view" - "pls/go-lsp/lsp/defines" + "github.com/lasorda/protobuf-language-server/go-lsp/lsp/defines" ) func Format(ctx context.Context, req *defines.DocumentFormattingParams) (result *[]defines.TextEdit, err error) { diff --git a/components/hover.go b/components/hover.go index 27a3ae3..148958c 100644 --- a/components/hover.go +++ b/components/hover.go @@ -3,12 +3,12 @@ package components import ( "bytes" "context" - "pls/proto/parser" - "pls/proto/view" + "github.com/lasorda/protobuf-language-server/proto/parser" + "github.com/lasorda/protobuf-language-server/proto/view" "strings" "text/template" - "pls/go-lsp/lsp/defines" + "github.com/lasorda/protobuf-language-server/go-lsp/lsp/defines" "github.com/emicklei/proto" ) diff --git a/components/jump_definition.go b/components/jump_definition.go index 9b76493..6360bf9 100644 --- a/components/jump_definition.go +++ b/components/jump_definition.go @@ -4,13 +4,13 @@ import ( "context" "errors" "fmt" - "pls/proto/parser" - "pls/proto/view" + "github.com/lasorda/protobuf-language-server/proto/parser" + "github.com/lasorda/protobuf-language-server/proto/view" "regexp" "strings" - "pls/go-lsp/logs" - "pls/go-lsp/lsp/defines" + "github.com/lasorda/protobuf-language-server/go-lsp/logs" + "github.com/lasorda/protobuf-language-server/go-lsp/lsp/defines" ) type SymbolDefinition struct { diff --git a/go-lsp/example/example b/go-lsp/example/example index 73bf4be8a107e51bceff206fdeb0e834b7e0e079..b003a738e1be9a146d38f29903021c477053c276 100755 GIT binary patch delta 33088 zcmbVVYjjlCbv7}e=jb_l>t0C+2_&Q$jUk2y^2d~6&@sE11HgS{u@BN*Oz`|Qyj z+5N-*?vJA%TIZYnJm>7Y&tpIF>i^D}oc?Ui!?8KBuf%SR&5g~A&5xzTQe$bc^jJnL zGv2X$?mx(7FJ`%Yj(bW5-&G7#Tu52!i%LW99ECT;u0f zz^#y55x3%a;hK^+hoGODI$i>CyW`X2CEQB6mBl|jULG5T$T8%02tkIz_z^xCxMrw?3qYE9^JZlw${ZlFJIV(d6VjTpOUFTe2e(rsa)vL1{|MUX-Cp|0f@2Ap; z&p(&8{GM%6nq@0|X7k0aweQlpYLKRbOv$9cLgd%A^qiUt5zw>BfG7odbRrL z#BM8~6hNk#9V`8%bYqv5j)2yk50@gUN>F;ivXn%`c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ha z)Tl5V>GiU}f39%3i3qS1&X>PUwO-Os7Q{qI%uM5&>4mi+mGN zB312qg9yTZB_-U6gu)tm{6Z74TJHSOz*A~>^~Kp#K$kMCZTFK+k>|c*z~EED#E-?By`M+Pl}UueLoLx-S;fP~@}thlaK3 F{{vYJfX4s; diff --git a/go-lsp/example/main.go b/go-lsp/example/main.go index befcf3b..c1696f7 100644 --- a/go-lsp/example/main.go +++ b/go-lsp/example/main.go @@ -10,9 +10,9 @@ import ( "os" "strings" - "pls/go-lsp/logs" - "pls/go-lsp/lsp" - "pls/go-lsp/lsp/defines" + "github.com/lasorda/protobuf-language-server/go-lsp/logs" + "github.com/lasorda/protobuf-language-server/go-lsp/lsp" + "github.com/lasorda/protobuf-language-server/go-lsp/lsp/defines" ) func strPtr(str string) *string { diff --git a/go-lsp/jsonrpc/session.go b/go-lsp/jsonrpc/session.go index d4dc9f5..a16806e 100644 --- a/go-lsp/jsonrpc/session.go +++ b/go-lsp/jsonrpc/session.go @@ -10,7 +10,7 @@ import ( "strings" "sync" - "pls/go-lsp/logs" + "github.com/lasorda/protobuf-language-server/go-lsp/logs" jsoniter "github.com/json-iterator/go" ) diff --git a/go-lsp/lsp/builtin.go b/go-lsp/lsp/builtin.go index bf13c3a..82c1b93 100644 --- a/go-lsp/lsp/builtin.go +++ b/go-lsp/lsp/builtin.go @@ -3,7 +3,7 @@ package lsp import ( "context" - "pls/go-lsp/lsp/defines" + "github.com/lasorda/protobuf-language-server/go-lsp/lsp/defines" ) func (m *Methods) builtinInitialize(ctx context.Context, req *defines.InitializeParams) (defines.InitializeResult, error) { diff --git a/go-lsp/lsp/methods.go b/go-lsp/lsp/methods.go index eece326..7a51b07 100644 --- a/go-lsp/lsp/methods.go +++ b/go-lsp/lsp/methods.go @@ -5,8 +5,8 @@ package lsp // "context" // "fmt" // -// "pls/go-lsp/jsonrpc" -// "pls/go-lsp/lsp/defines" +// "github.com/lasorda/protobuf-language-server/go-lsp/jsonrpc" +// "github.com/lasorda/protobuf-language-server/go-lsp/lsp/defines" //) // //type Methods struct { diff --git a/go-lsp/lsp/methods.temp.go b/go-lsp/lsp/methods.temp.go index c75f054..4fdc795 100644 --- a/go-lsp/lsp/methods.temp.go +++ b/go-lsp/lsp/methods.temp.go @@ -1,6 +1,6 @@ package lsp -import "pls/go-lsp/lsp/defines" +import "github.com/lasorda/protobuf-language-server/go-lsp/lsp/defines" type method struct { Name string diff --git a/go-lsp/lsp/methods_gen.go b/go-lsp/lsp/methods_gen.go index 03c846f..1201197 100755 --- a/go-lsp/lsp/methods_gen.go +++ b/go-lsp/lsp/methods_gen.go @@ -4,8 +4,8 @@ package lsp import ( "context" - "pls/go-lsp/jsonrpc" - "pls/go-lsp/lsp/defines" + "github.com/lasorda/protobuf-language-server/go-lsp/jsonrpc" + "github.com/lasorda/protobuf-language-server/go-lsp/lsp/defines" ) type Methods struct { diff --git a/go-lsp/lsp/methods_gen_test.go b/go-lsp/lsp/methods_gen_test.go index 67e3533..771bb93 100644 --- a/go-lsp/lsp/methods_gen_test.go +++ b/go-lsp/lsp/methods_gen_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "pls/go-lsp/lsp/defines" + "github.com/lasorda/protobuf-language-server/go-lsp/lsp/defines" ) type typ_ struct { diff --git a/go-lsp/lsp/option.go b/go-lsp/lsp/option.go index 69b2dcc..3e6fd54 100644 --- a/go-lsp/lsp/option.go +++ b/go-lsp/lsp/option.go @@ -1,6 +1,6 @@ package lsp -import "pls/go-lsp/lsp/defines" +import "github.com/lasorda/protobuf-language-server/go-lsp/lsp/defines" type Options struct { // if Network is null, will use stdio diff --git a/go-lsp/lsp/server.go b/go-lsp/lsp/server.go index f74ea66..5e5ace7 100644 --- a/go-lsp/lsp/server.go +++ b/go-lsp/lsp/server.go @@ -5,8 +5,8 @@ import ( "net" "reflect" - "pls/go-lsp/jsonrpc" - "pls/go-lsp/logs" + "github.com/lasorda/protobuf-language-server/go-lsp/jsonrpc" + "github.com/lasorda/protobuf-language-server/go-lsp/logs" ) type Server struct { diff --git a/go-lsp/lsp/stdio.go b/go-lsp/lsp/stdio.go index 277daa9..5f7c409 100644 --- a/go-lsp/lsp/stdio.go +++ b/go-lsp/lsp/stdio.go @@ -4,7 +4,7 @@ import ( "io" "os" - "pls/go-lsp/jsonrpc" + "github.com/lasorda/protobuf-language-server/go-lsp/jsonrpc" ) type stdioReaderWriter struct { diff --git a/go.mod b/go.mod index b201f7f..ecf0d27 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module pls +module github.com/lasorda/protobuf-language-server go 1.16 diff --git a/main.go b/main.go index 294c37a..f9afb9c 100644 --- a/main.go +++ b/main.go @@ -7,12 +7,12 @@ import ( "os" "path" - "pls/components" - "pls/proto/view" + "github.com/lasorda/protobuf-language-server/components" + "github.com/lasorda/protobuf-language-server/proto/view" - "pls/go-lsp/logs" - "pls/go-lsp/lsp" - "pls/go-lsp/lsp/defines" + "github.com/lasorda/protobuf-language-server/go-lsp/logs" + "github.com/lasorda/protobuf-language-server/go-lsp/lsp" + "github.com/lasorda/protobuf-language-server/go-lsp/lsp/defines" ) func strPtr(str string) *string { @@ -29,7 +29,7 @@ func init() { if err != nil { home = "" } - logPath = flag.String("logs", path.Join(home, ".pls.log"), "logs file path") + logPath = flag.String("logs", path.Join(home, ".protobuf-language-server.log"), "logs file path") if logPath == nil || *logPath == "" { logger = log.New(os.Stderr, "", 0) return diff --git a/proto/parser/parser.go b/proto/parser/parser.go index 4a5e3bc..97f118d 100644 --- a/proto/parser/parser.go +++ b/proto/parser/parser.go @@ -3,7 +3,7 @@ package parser import ( "io" - "pls/go-lsp/lsp/defines" + "github.com/lasorda/protobuf-language-server/go-lsp/lsp/defines" protobuf "github.com/emicklei/proto" ) diff --git a/proto/parser/proto.go b/proto/parser/proto.go index 8259a81..0f418ee 100644 --- a/proto/parser/proto.go +++ b/proto/parser/proto.go @@ -3,8 +3,8 @@ package parser import ( "sync" - "pls/go-lsp/logs" - "pls/go-lsp/lsp/defines" + "github.com/lasorda/protobuf-language-server/go-lsp/logs" + "github.com/lasorda/protobuf-language-server/go-lsp/lsp/defines" protobuf "github.com/emicklei/proto" ) diff --git a/proto/view/file.go b/proto/view/file.go index 404f2a5..76d91d4 100644 --- a/proto/view/file.go +++ b/proto/view/file.go @@ -4,9 +4,9 @@ import ( "context" "strings" - "pls/proto/parser" + "github.com/lasorda/protobuf-language-server/proto/parser" - "pls/go-lsp/lsp/defines" + "github.com/lasorda/protobuf-language-server/go-lsp/lsp/defines" ) // File represents a source file of any type. diff --git a/proto/view/view.go b/proto/view/view.go index 46bb5a2..076f951 100644 --- a/proto/view/view.go +++ b/proto/view/view.go @@ -14,13 +14,13 @@ import ( "sync" "unicode/utf8" - "pls/go-lsp/logs" - "pls/go-lsp/lsp" - "pls/go-lsp/lsp/defines" + "github.com/lasorda/protobuf-language-server/go-lsp/logs" + "github.com/lasorda/protobuf-language-server/go-lsp/lsp" + "github.com/lasorda/protobuf-language-server/go-lsp/lsp/defines" "go.lsp.dev/jsonrpc2" "go.lsp.dev/uri" - "pls/proto/parser" + "github.com/lasorda/protobuf-language-server/proto/parser" ) type view struct { diff --git a/vscode-extension/README.md b/vscode-extension/README.md index 0597ab7..6e2a77a 100644 --- a/vscode-extension/README.md +++ b/vscode-extension/README.md @@ -5,7 +5,7 @@ A language server implementation for Google Protocol Buffers ## how to use 1. Get code from [https://github.com/lasorda/protobuf-language-server](https://github.com/lasorda/protobuf-language-server) -2. Build the target `pls`, add `pls` to `PATH` +2. Build the target `protobuf-language-server`, add `protobuf-language-server` to `PATH` ## features diff --git a/vscode-extension/src/extension.ts b/vscode-extension/src/extension.ts index 296a854..e17870e 100644 --- a/vscode-extension/src/extension.ts +++ b/vscode-extension/src/extension.ts @@ -13,9 +13,9 @@ import { export function activate(context: ExtensionContext) { // The server is implemented in node // const serverModule = context.asAbsolutePath( - // path.join('bin', 'pls') + // path.join('bin', 'protobuf-language-server') // ); - const serverModule = 'pls'; + const serverModule = 'protobuf-language-server'; // let debugOptions = { execArgv: ["--nolazy", "--debug=6004"] }; // If the extension is launched in debug mode then the debug server options are used // Otherwise the run options are used