Closed RESDXChgfore9hing closed 2 years ago
error on loading json.
means you need to double backslashes in JSON.
and split space-separated string to N-items list:
"item1", "item2", "item3"
Runner cannot run the complex Batch command from you - so put it into the run.cmd
file and then change the windows command to run new CMD file: maybe like this:
"cmd_windows": [
"cmd.exe", "c:\\path\\to\\run.cmd"
],
awesome i think its running perfectly LSP: starting server - Java; root: None Startup: 1070ms, plugins: 580ms (lsp 563ms, tabs_list 15ms)
The lsp server seems to not properly working though no auto completion no function suggestion or hint. but at least cudatext lsp client seems to be recognizing it running. closing this issue.
let's see what you will get, what reply, at Eclipse linked topic. you need to show them your CMD script to start server.
The lsp server seems to not properly working though no auto completion no function suggestion or hint.
is it not working in other editors too?
no idea didnt try it with other client.maybe can try kate.hmmm.
Maybe try the Sublime Text with the same lsp client. if it works, report here.
sadly i have absolutely no experience with sublime,and searching doesnt seems to have any result about setting local lsp server.
Here is the update for making the JDK lsp fully working(theoretically),https://github.com/eclipse/eclipse.jdt.ls/issues/2210
The last few comment hints that we need to supply some info from client to the server at startup.How can i do that in cudatext?
try to save project file to desired folder:
didn't try with Java LSP (can't setup), but this is how client request looks like for Python: CudaText will generate this request to the server:
(rootUri
and workspaceFolders
are there!)
{
"jsonrpc": "2.0",
"method": "initialize",
"params": {
"processId": 5356,
"rootUri": "file:///C:/Users/yura/Desktop",
"workspaceFolders": [{
"uri": "file:///C:/Users/yura/Desktop",
"name": "Root"
}],
"trace": "off",
"capabilities": {
"textDocument": {
"synchronization": {
"didSave": true,
"dynamicRegistration": true
},
"publishDiagnostics": {
"relatedInformation": true
},
"completion": {
"dynamicRegistration": true,
"completionItem": {
"snippetSupport": true
},
"completionItemKind": {
"valueSet": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]
}
},
"hover": {
"dynamicRegistration": true,
"contentFormat": ["markdown", "plaintext"]
},
"definition": {
"dynamicRegistration": true,
"linkSupport": true
},
"signatureHelp": {
"dynamicRegistration": true,
"signatureInformation": {
"documentationFormat": ["markdown", "plaintext"],
"parameterInformation": {
"labelOffsetSupport": true
},
"activeParameterSupport": true
}
},
"implementation": {
"linkSupport": true,
"dynamicRegistration": true
},
"references": {
"dynamicRegistration": true
},
"callHierarchy": {
"dynamicRegistration": true
},
"declaration": {
"linkSupport": true,
"dynamicRegistration": true
},
"typeDefinition": {
"linkSupport": true,
"dynamicRegistration": true
},
"formatting": {
"dynamicRegistration": true
},
"rangeFormatting": {
"dynamicRegistration": true
},
"documentSymbol": {
"hierarchicalDocumentSymbolSupport": true,
"dynamicRegistration": true,
"symbolKind": {
"valueSet": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]
}
}
},
"window": {
"showMessage": {},
"workDoneProgress": true
},
"workspace": {
"symbol": {
"dynamicRegistration": true,
"symbolKind": {
"valueSet": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]
}
},
"workspaceFolders": true,
"configuration": true,
"didChangeConfiguration": {
"dynamicRegistration": true
}
}
}
},
"id": 0
}
this is how to set up lsp in Sublime:
Install Package Control (if missing)
Install the LSP Package (if missing)
In Sublime, go to Preferences > Package Settings > LSP > Settings
Add this lines to your LSP Settings:
{
"clients":
{
"jls":
{
"enabled": true,
"command": ["<path-to-java-language-server>"],
"scopes": ["source.java"],
"syntaxes": ["Packages/Java/Java.sublime-syntax"],
"languageId": "java"
}
}
}
where is that config file located. or is the json need to be in my project location?
are you asking about Sublime?
no cudatext.I currently didnt use sublime.
currently i just want to get the lsp working with cudatext and then see how it goes in my daily dev.
it gives me these error
Here is my lsp_Java.json>
The lsp itself works perfectly, as an eg,