Closed Shane-XB-Qian closed 1 year ago
I never have used it with vim, but I would happy, if we can get a description how to use it with vim.
What is the 'diag check' msg?
On 21/03/14 09:35AM, Gerald Richter wrote:
I never have used it with vim, but I would happy, if we can get a description how to use it with vim.
What is the 'diag check' msg?
nothing special, but just using vim as its client if compared to vsc. or looks this lsp server did not implement '--stdio' mode, right? usually lsp server offerred 'stdio' mode, or just 'stdio'...
// 'diag check' i mean looks i didnot get textdocument/diag... check msg // from (this) lsp server.. so I Guess so..
-- shane.xb.qian
Perl::LanguageServer always uses stdio
I don't see any diag check
message in the specification: https://microsoft.github.io/language-server-protocol/specifications/specification-current/ , so it's not implemented by Perl::LanguageServer
the detail word was textDocument/publishDiagnostics
, that's from lsp server to client.
not sure if there were some configure or installation need to be cared, or that err msg can tell something? actually i am not using perl much... i was just trying to verify lsp
btw: cpanm to install this looks had issue somehow now, even cannot locate the module path, which had discussed at #52 though that's for vsc.
LS: done handle_req id=2
LS: end aio read cnt=216, buffer len = 216
LS: line=<Content-Length: 193>
LS: line=<>
LS: read data={"id":3,"jsonrpc":"2.0","method":"textDocument/definition","params":{"textDocument":{"uri":"file:///usr/local/share/perl/5.30.0/Perl/LanguageServer.pm"},"position":{"character":13,"line":486}}}
LS: read header={ "Content-Length" => 193 }
LS: ---> Request: {
"jsonrpc" : "2.0",
"params" : {
"position" : {
"line" : 486,
"character" : 13
},
"textDocument" : {
"uri" : "file:///usr/local/share/perl/5.30.0/Perl/LanguageServer.pm"
}
},
"id" : 3,
"method" : "textDocument/definition"
}
LS: handle_req id=3
LS: method=_rpcreq_definition
LS: line 486: < $listen_port = shift @ARGV ; >
LS: word: <$listen_port> pos: 24 len: 12
LS: ok
LS: start aio read, buffer len = 0
LS: start aio read, buffer len = 0
LS: <--- Response: {
"id" : 3,
"result" : [],
"jsonrpc" : "2.0"
}
@richterger i tried to download your code directly from this repo and build/install, and trying to debug a bit, the example log like above, // so far not sure why not work, was there any something weird to you in this log above? or perhaps there is something wrong in lsp client? // to me, it looks the/this lsp server can Not response right info to lsp client........
i am trying to verify lsp server a bit, including this.. // installed from this repo, and cpanm also.
i launched it by
perl -MPerl::LanguageServer -e Perl::LanguageServer::run
// no err output.when i tried to send 'diag check' msg, looks nothing happened.. but:
logging into stderr? lsp client got this..
was there some tricky here? or this lsp server is only working via port/socket something? // note: i am not using vsc, but vim here.