bugst / go-lsp Goto Github PK
View Code? Open in Web Editor NEWA client/server library for the LSP (Language Server Protocol) specification
License: BSD 3-Clause "New" or "Revised" License
A client/server library for the LSP (Language Server Protocol) specification
License: BSD 3-Clause "New" or "Revised" License
I pass pipestdin and stdout to newclient.
request can be sent ,but no respone revieved .
func Test_new_client(t *testing.T) {
cmd := exec.Command("clangd", "--log=verbose")
stdin, err := cmd.StdinPipe()
if err != nil {
log.Fatal(err)
}
stdout, err := cmd.StdoutPipe()
if err != nil {
log.Fatal(err)
}
if err := cmd.Start(); err != nil {
log.Fatal(err)
}
var rw = readwriter{w: stdin, r: stdout}
var handle = servhandle{}
client := lsp.NewClient(rw, rw, handle, func(e error) {})
var path = "/home/z/dev/lsp/pylspclient/tests"
initializationOptions := map[string]interface{}{
"clangdFileStatus": true,
}
capabilities := map[string]interface{}{
"window": map[string]bool{
"workDoneProgress": true,
},
"textDocument": map[string]interface{}{
"completion": map[string]interface{}{
"completionItem": map[string]bool{
"commitCharactersSupport": true,
"snippetSupport": true,
},
},
},
}
var ProcessID = -1
client.Run()
result, err_resp, err := client.Initialize(context.Background(),
&lsp.InitializeParams{
ProcessID: &ProcessID,
RootURI: lsp.NewDocumentURI(path),
InitializationOptions: initializationOptions,
Capabilities: capabilities,
},
)
fmt.Printf("%v%v", err_resp, err)
fmt.Printf("clangd initialized: %+v %+v\n", result.ServerInfo.Name, result.ServerInfo.Version)
}
Hi! This library seems to be not supporting the new capabilities, such as inlayHint
. As a result arduino LSP (which depends on it) doesn't work with the newer IDE versions. See description of the problem here arduino/arduino-language-server#187
Is it possible to update the capabilities definition with all the new available capabilities?
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.