Closed wbthomason closed 4 years ago
emmylua-ls works fine with vscode/sublime..., may be its not an issue of emmylua-ls ? btw: emmylua-ls use lsp4j
Hmm, ok. Thanks, that's useful to know. I'll check in with the coc.nvim
project. It looks like lsp4j
has some known differences of behavior around specifically the Content-Length
header, e.g. https://github.com/eclipse/lsp4j/issues/210, so it might be an issue with them, too. Probably not an EmmyLua issue, though. Thank you!
Sorry to reopen this issue, but I just recovered this stacktrace:
Nov 02, 2019 11:29:16 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleNotification
WARNING: Notification threw an exception: {
"jsonrpc": "2.0",
"method": "initialized",
"params": {}
}
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.notify(GenericEndpoint.java:152)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleNotification(RemoteEndpoint.java:220)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:187)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:192)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:99)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
... 11 more
Caused by: java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - Error at index 0 in: "ng"
at java.base/java.net.URLDecoder.decode(URLDecoder.java:232)
at java.base/java.net.URLDecoder.decode(URLDecoder.java:142)
at com.tang.lsp.FileURIKt.decodeURL(FileURI.kt:10)
at com.tang.lsp.FileURIKt.access$decodeURL(FileURI.kt:1)
at com.tang.lsp.FileURI$_nameParts$2.invoke(FileURI.kt:66)
at com.tang.lsp.FileURI$_nameParts$2.invoke(FileURI.kt:23)
at kotlin.SynchronizedLazyImpl.getValue(Lazy.kt:131)
at com.tang.lsp.FileURI.get_nameParts(FileURI.kt)
at com.tang.lsp.FileURI.getName(FileURI.kt:71)
at com.tang.vscode.WorkspaceRootFileScopeProvider.isInclude(WorkspaceRootFileScopeProvider.kt:33)
at com.tang.intellij.lua.fs.FileManager.isInclude(fileManager.kt:59)
at com.tang.intellij.lua.fs.FileManager.isInclude(fileManager.kt:55)
at com.tang.intellij.lua.fs.FileManager.collectFiles(fileManager.kt:82)
at com.tang.intellij.lua.fs.FileManager.collectFiles(fileManager.kt:85)
at com.tang.intellij.lua.fs.FileManager.collectFiles(fileManager.kt:85)
at com.tang.intellij.lua.fs.FileManager.collectFiles(fileManager.kt:85)
at com.tang.intellij.lua.fs.FileManager.collectFiles(fileManager.kt:85)
at com.tang.intellij.lua.fs.FileManager.collectFiles(fileManager.kt:85)
at com.tang.intellij.lua.fs.FileManager.collectFiles(fileManager.kt:85)
at com.tang.intellij.lua.fs.FileManager.collectFiles(fileManager.kt:85)
at com.tang.intellij.lua.fs.FileManager.collectFiles(fileManager.kt:85)
at com.tang.intellij.lua.fs.FileManager.collectFiles(fileManager.kt:85)
at com.tang.intellij.lua.fs.FileManager.collectFiles(fileManager.kt:85)
at com.tang.vscode.WorkspaceRootFileScopeProvider.findAllFiles(WorkspaceRootFileScopeProvider.kt:49)
at com.tang.intellij.lua.fs.FileManager.findAllFiles(fileManager.kt:69)
at com.tang.vscode.LuaWorkspaceService.loadWorkspace(LuaWorkspaceService.kt:229)
at com.tang.vscode.LuaWorkspaceService.loadWorkspace(LuaWorkspaceService.kt:214)
at com.tang.vscode.LuaLanguageServer.initialized(LuaLanguageServer.kt:118)
... 16 more
That seems to imply that the issue might be with EmmyLua after all? Is there any further debugging info I could provide to help track down the problem, if indeed it is in EmmyLua?
same issue, tested with many LSP plugins of vim/neovim, any way to resolve this?
It seems that the server print things not related to lsp on stdout (at least when a file is open)
In my case:
[+] file:/tmp/project/main.lua
between 2 messages
Maybe some implementations are able to ignore it until they found a Content-Length
The bug exists since the release 0.3.1
Can we release this fix?
When using the latest version of the server with https://github.com/neoclide/coc.nvim, I get the following error and no functionality works:
From the stack trace here, it seems like the server is not sending well-formed messages to the client. Should this server still work with standard LSP clients? I should note that running the server the same way
coc.nvim
is configured to run it appears to work (it does not produce errors and waits for input), andcoc.nvim
is working with other servers, so I don't think this is a misconfiguration.