gtache / intellij-lsp

Plugin adding Language Server Protocol support for IntelliJ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fails to connect to dummy server

n-hutton opened this issue · comments

Hi.

I was interested in playing around with language servers, in particular developing my own for a custom language. To this end I created an executable which basically does nothing and pointed this plugin at it using the 'executable' option.

However, the executable is never run, that I can tell. I understand that it should be expecting stdio communications using the LSP protocol to/from this executable. Clion reports an error:

java.lang.NullPointerException
	at java.io.File.<init>(File.java:277)
	at com.github.gtache.lsp.utils.FileUtils$.editorToProjectFolderPath(FileUtils.scala:153)
	at com.github.gtache.lsp.utils.FileUtils$.editorToProjectFolderUri(FileUtils.scala:149)
	at com.github.gtache.lsp.PluginMain$.$anonfun$editorOpened$1(PluginMain.scala:128)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

CLion 2018.3.4
Build #CL-183.5429.37, built on January 31, 2019
JRE: 1.8.0_152-release-1343-b26 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.3

Tell me if it still happens with 1.5.3
You can also now see the error log of the server as well as the output log if you check it in the settings, that could help you see if the server is behaving as expected.