GithubHelp home page GithubHelp logo

lasorda / protobuf-language-server Goto Github PK

View Code? Open in Web Editor NEW
40.0 5.0 7.0 16.61 MB

A language server implementation for Google Protocol Buffers

License: Apache License 2.0

Go 99.33% TypeScript 0.63% JavaScript 0.03%
google-protobuf google-protocol-buffers language-server-protocol protobuf vim-extension vscode-extension coc cpp

protobuf-language-server's People

Contributors

brotifypacha avatar johannes-altmanninger avatar krobelus avatar lasorda avatar lonnywong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

protobuf-language-server's Issues

Visual Studio Code plugin does not work

The Visual Studio Code plugin does not work. Here is the error output of the language server:

flag provided but not defined: -stdio
Usage of protobuf-language-server:
  -listen string
    	address on which to listen for remote connections
  -logs string
    	logs file path (default "C:\\Users\\itsame/.protobuf-language-server.log")
[Error - 4:28:46 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Info  - 4:28:46 PM] Connection to server got closed. Server will restart.
true
[Error - 4:28:46 PM] protobuf-language-server client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 

Apparently the server gets started with incompatible arguments.

I downloaded and installed everything fresh from Github (274197a) after the downloadable plugin from the registry did not work, but the effect is the same.

Error executing vim.schedule lua callback: ...vim/0.10.0/share/nvim/runtime/lua/vim/lsp/diagnostic.lua:237: attempt to get length of local 'diagnostics' (a nil value)

When i open xxx.proto, or in insert mode. I will get this error:

Error executing vim.schedule lua callback: ...vim/0.10.0/share/nvim/runtime/lua/vim/lsp/diagnostic.lua:237: attempt
 to get length of local 'diagnostics' (a nil value)
stack traceback:
        ...vim/0.10.0/share/nvim/runtime/lua/vim/lsp/diagnostic.lua:237: in function 'handle_diagnostics'
        ...vim/0.10.0/share/nvim/runtime/lua/vim/lsp/diagnostic.lua:293: in function 'on_publish_diagnostics'
        ...aiyun/.local/share/nvim/lazy/go.nvim/lua/go/lsp_diag.lua:38: in function 'handler'
        .../neovim/0.10.0/share/nvim/runtime/lua/vim/lsp/client.lua:1005: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

是否支持与 AstroNvim 整合?

我用的是 AstroNvim~/.config/nvim/lua/user/init.lua 配置如下:

return {
  lsp = {
    servers = {
      "pls",
    },
    config = {
      clangd = {
        filetypes = { "c", "cpp", "objc", "objcpp", "cuda" },
      },
      pls = function()
        return {
          cmd = { "pls" },
          filetypes = "proto",
          root_dir = require("lspconfig.util").root_pattern ".git",
        }
      end,
    },
  },
}

配置文档可以参考:https://docs.astronvim.com/recipes/advanced_lsp/#lsp-setup-without-installer

nvim 打开 proto 文件后,发现 pls 在运行中了,但是补全和错误提示等功能都没有。

~/.pls.log 中有 parseProto err <input>:8:17: found "//" but expected [field identifier],但是在 nvim 中没有显示。

Panic

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1162ad3]

goroutine 13 [running]:
pls/proto/view.(*view).setContent(0xc00010fd70, {0xc00022a880?, 0xc9c?}, {0xc000100460, 0x63}, {0xc00030db00, 0xc9c, 0xd80})
	/Users/Gaojianli/protobuf-language-server/proto/view/view.go:73 +0x213
pls/proto/view.didChange({0x1232a78, 0xc00023d8c0}, 0xc00023c4b0)
	/Users/Gaojianli/protobuf-language-server/proto/view/view.go:274 +0xdb
github.com/TobiasYin/go-lsp/lsp.(*Methods).didChangeTextDocument(0x0?, {0x1232a78?, 0xc00023d8c0?}, {0x119a440?, 0xc00023c4b0?})
	/Users/Gaojianli/protobuf-language-server/go-lsp/lsp/methods_gen.go:260 +0x53
github.com/TobiasYin/go-lsp/jsonrpc.(*Session).execute.func1()
	/Users/Gaojianli/protobuf-language-server/go-lsp/jsonrpc/session.go:208 +0xbc
created by github.com/TobiasYin/go-lsp/jsonrpc.(*Session).execute
	/Users/Gaojianli/protobuf-language-server/go-lsp/jsonrpc/session.go:206 +0x29f
[Error - 2:52:00 PM] The protobuf-language-server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.

Panic while type some non-exist message

panic: runtime error: index out of range [-1]

goroutine 23 [running]:
pls/components.getWord({0x0?, 0xc0001522a0?}, 0x63?, 0x0?)
	/Users/gaojianli/protobuf-language-server/components/jump_definition.go:250 +0x112
pls/components.Completion({0x0?, 0x0?}, 0xc000151ac0)
	/Users/gaojianli/protobuf-language-server/components/completion.go:16 +0xc5
github.com/TobiasYin/go-lsp/lsp.(*Methods).completion(0x0?, {0x1232a58?, 0xc0001d2f00?}, {0x119a120?, 0xc000151ac0?})
	/Users/gaojianli/protobuf-language-server/go-lsp/lsp/methods_gen.go:428 +0x53
github.com/TobiasYin/go-lsp/jsonrpc.(*Session).execute.func1()
	/Users/gaojianli/protobuf-language-server/go-lsp/jsonrpc/session.go:208 +0xbc
created by github.com/TobiasYin/go-lsp/jsonrpc.(*Session).execute
	/Users/gaojianli/protobuf-language-server/go-lsp/jsonrpc/session.go:206 +0x29f

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.