lasorda / protobuf-language-server Goto Github PK
View Code? Open in Web Editor NEWA language server implementation for Google Protocol Buffers
License: Apache License 2.0
A language server implementation for Google Protocol Buffers
License: Apache License 2.0
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
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.
我用的是 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
中没有显示。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.