gtache / intellij-lsp Goto Github PK
View Code? Open in Web Editor NEWPlugin adding Language Server Protocol support for IntelliJ
License: Apache License 2.0
Plugin adding Language Server Protocol support for IntelliJ
License: Apache License 2.0
There is an LSP that works fine for doc edits sync with VSCode, Atom and Eclipse (LSP4E), but not working with IntelliJ client.
After a couple of simple edits i could see with the debugger the document on the server having content different from whats in the IntelliJ editor on the client.
After a bit of investigation i think problematic piece is:
https://github.com/gtache/intellij-lsp/blob/master/intellij-lsp/src/com/github/gtache/lsp/editor/EditorEventManager.scala#L484
It should be the length of the text being replaced, i.e should be event.getOldLength
See https://microsoft.github.io/language-server-protocol/specification#textDocument_didChange
I think this change should help with my use case. (To confirm later)
I used the plugin in a project where language server is not used at all (PHP project). After some time I got the following error:
java.lang.NullPointerException
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.client.languageserver.wrapper.LanguageServerWrapperImpl$.forEditor(LanguageServerWrapperImpl.scala:48)
at com.github.gtache.lsp.PluginMain$.$anonfun$editorClosed$1(PluginMain.scala:275)
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)
It would be better to add the build steps to the ReadMe so that someone new to scala and sbt (like me) can quickly build the plugin without going through much trouble ๐ .
Hi!
I attempted to use https://github.com/freebroccolo/ocaml-language-server
This is what I have in logs
INFO - rocessStreamConnectionProvider - Starting server process with commands WrappedArray(/usr/local/lib/node_modules/ocaml-language-server/bin/server/index.js, --stdio) and workingDir ~/Projects/reason-example
WARN - pper.LanguageServerWrapperImpl - Capabilities are null for exe : path /usr/local/lib/node_modules/ocaml-language-server/bin/server/index.js args : --stdio
if the messages publish diagnostics have a end line > linelength the plugin is crashing. would be nice to limit the error position to the end of the line in this case
java.lang.StringIndexOutOfBoundsException: String index out of range: 7
at java.lang.String.substring(String.java:1963)
at com.github.gtache.lsp.utils.DocumentUtils$.LSPPosToOffset(DocumentUtils.scala:73)
at com.github.gtache.lsp.editor.EditorEventManager.$anonfun$diagnostics$5(EditorEventManager.scala:527)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:945)
at com.github.gtache.lsp.utils.ApplicationUtils$.computableReadAction(ApplicationUtils.scala:26)
at com.github.gtache.lsp.editor.EditorEventManager.$anonfun$diagnostics$4(EditorEventManager.scala:527)
at com.github.gtache.lsp.editor.EditorEventManager.$anonfun$diagnostics$4$adapted(EditorEventManager.scala:520)
at scala.collection.Iterator.foreach(Iterator.scala:929)
at scala.collection.Iterator.foreach$(Iterator.scala:929)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1417)
at scala.collection.IterableLike.foreach(IterableLike.scala:71)
at scala.collection.IterableLike.foreach$(IterableLike.scala:70)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at com.github.gtache.lsp.editor.EditorEventManager.$anonfun$diagnostics$1(EditorEventManager.scala:520)
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)
I got the plugin from IntelliJ plugin repo, and I'm having difficulty getting it to work with my server, perhaps you could help.
I have a Node LSP-based VSCode extension (https://github.com/wix/stylable-intelligence/). It works in VSCode format, which means a client runs the server when its activate() function is called.
Should I use the 'raw command' or 'executable' options?
Should I point the script at the client or the server?
I tried several ways, and couldn't get it to work, any tips on debugging?
Thanks
With recent update 1.5.1 this plugin stopped to work:
java.lang.IllegalStateException: Duplicate RPC method textDocument/semanticHighlighting.
at org.eclipse.lsp4j.jsonrpc.services.ServiceEndpoints.lambda$getSupportedMethods$0(ServiceEndpoints.java:113)
at org.eclipse.lsp4j.jsonrpc.services.AnnotationUtil.findRpcMethods(AnnotationUtil.java:66)
at org.eclipse.lsp4j.jsonrpc.services.ServiceEndpoints.getSupportedMethods(ServiceEndpoints.java:90)
at org.eclipse.lsp4j.jsonrpc.services.ServiceEndpoints.getSupportedMethods(ServiceEndpoints.java:82)
at org.eclipse.lsp4j.jsonrpc.Launcher$Builder.getSupportedMethods(Launcher.java:370)
at org.eclipse.lsp4j.jsonrpc.Launcher$Builder.createJsonHandler(Launcher.java:381)
at org.eclipse.lsp4j.jsonrpc.Launcher$Builder.create(Launcher.java:305)
at org.eclipse.lsp4j.launch.LSPLauncher.createClientLauncher(LSPLauncher.java:106)
at com.github.gtache.lsp.client.languageserver.wrapper.LanguageServerWrapperImpl.start(LanguageServerWrapperImpl.scala:291)
at com.github.gtache.lsp.client.languageserver.wrapper.LanguageServerWrapperImpl.connect(LanguageServerWrapperImpl.scala:169)
at com.github.gtache.lsp.PluginMain$.$anonfun$editorOpened$2(PluginMain.scala:135)
at com.github.gtache.lsp.PluginMain$.$anonfun$editorOpened$2$adapted(PluginMain.scala:132)
at scala.Option.foreach(Option.scala:257)
at com.github.gtache.lsp.PluginMain$.$anonfun$editorOpened$1(PluginMain.scala:132)
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)
I use this language protocol: https://github.com/d-language-server/dls
and have also plugin Intellij D Language installed.
This combination worked with previous version of intellij-lsp
I am trying to launch hie
(haskell-ide-engine, https://github.com/haskell/haskell-ide-engine) from intelliJ.
The raw command looks like this for "*.hs" files: /path/to/home/.local/bin/stack exec -- hie-wrapper --lsp -d
On startup I get errors "error=2" and "file not found", even if this command works well from cli.
The documentation hovers (not diagnostic marker hovers) see to only work for TEXT files?
https://github.com/gtache/intellij-lsp/blob/master/intellij-lsp/resources/META-INF/plugin.xml#L69
I've tried making these hovers for java
files. Contributed the LSPDocumentationProvider
for JAVA
language. This seem to trigger breakpoints in LSPDocumentationProvider
, but I still never see a single hover request sent to the LS.
Can you please provide more details on how to get documentation hovers working and what are the limitations with hovers?
When trying to go to definition, below issue was encountered.
com.intellij.openapi.editor.Editor.offsetToXY(I)Ljava/awt/Point;
java.lang.NoSuchMethodError: com.intellij.openapi.editor.Editor.offsetToXY(I)Ljava/awt/Point;
at com.github.gtache.lsp.editor.EditorEventManager.mouseMoved(EditorEventManager.scala:975)
at com.github.gtache.lsp.editor.listeners.EditorMouseMotionListenerImpl.mouseMoved(EditorMouseMotionListenerImpl.scala:15)
at com.intellij.openapi.editor.impl.EditorImpl$MyMouseMotionListener.mouseMoved(EditorImpl.java:3925)
at java.awt.Component.processMouseMotionEvent(Component.java:6586)
at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3342)
at java.awt.Component.processEvent(Component.java:6310)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4897)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4719)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4538)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4719)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.awt.EventQueue$4.run(EventQueue.java:735)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:827)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:651)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
java.lang.NoSuchMethodError: com.intellij.openapi.editor.Editor.offsetToXY(I)Ljava/awt/Point;
at com.github.gtache.lsp.editor.EditorEventManager.mouseMoved(EditorEventManager.scala:975)
at com.github.gtache.lsp.editor.listeners.EditorMouseMotionListenerImpl.mouseMoved(EditorMouseMotionListenerImpl.scala:15)
at com.intellij.openapi.editor.impl.EditorImpl$MyMouseMotionListener.mouseMoved(EditorImpl.java:3925)
at java.awt.Component.processMouseMotionEvent(Component.java:6586)
at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3342)
at java.awt.Component.processEvent(Component.java:6310)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4897)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4719)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4538)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4719)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.awt.EventQueue$4.run(EventQueue.java:735)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:827)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:651)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
java.lang.NoSuchMethodError: com.intellij.openapi.editor.Editor.offsetToXY(I)Ljava/awt/Point;
at com.github.gtache.lsp.editor.EditorEventManager.mouseMoved(EditorEventManager.scala:975)
at com.github.gtache.lsp.editor.listeners.EditorMouseMotionListenerImpl.mouseMoved(EditorMouseMotionListenerImpl.scala:15)
at com.intellij.openapi.editor.impl.EditorImpl$MyMouseMotionListener.mouseMoved(EditorImpl.java:3925)
at java.awt.Component.processMouseMotionEvent(Component.java:6586)
at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3342)
at java.awt.Component.processEvent(Component.java:6310)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4897)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4719)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4538)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4719)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.awt.EventQueue$4.run(EventQueue.java:735)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:827)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:651)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
java.lang.NoSuchMethodError: com.intellij.openapi.editor.Editor.offsetToXY(I)Ljava/awt/Point;
at com.github.gtache.lsp.editor.EditorEventManager.mouseMoved(EditorEventManager.scala:975)
at com.github.gtache.lsp.editor.listeners.EditorMouseMotionListenerImpl.mouseMoved(EditorMouseMotionListenerImpl.scala:15)
at com.intellij.openapi.editor.impl.EditorImpl$MyMouseMotionListener.mouseMoved(EditorImpl.java:3925)
at java.awt.Component.processMouseMotionEvent(Component.java:6586)
at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3342)
at java.awt.Component.processEvent(Component.java:6310)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4897)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4719)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4538)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4719)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.awt.EventQueue$4.run(EventQueue.java:735)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:827)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:651)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
java.lang.NoSuchMethodError: com.intellij.openapi.editor.Editor.offsetToXY(I)Ljava/awt/Point;
at com.github.gtache.lsp.editor.EditorEventManager.mouseMoved(EditorEventManager.scala:975)
at com.github.gtache.lsp.editor.listeners.EditorMouseMotionListenerImpl.mouseMoved(EditorMouseMotionListenerImpl.scala:15)
at com.intellij.openapi.editor.impl.EditorImpl$MyMouseMotionListener.mouseMoved(EditorImpl.java:3925)
at java.awt.Component.processMouseMotionEvent(Component.java:6586)
at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3342)
at java.awt.Component.processEvent(Component.java:6310)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4897)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4719)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4538)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4719)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.awt.EventQueue$4.run(EventQueue.java:735)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:827)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:651)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
java.lang.NoSuchMethodError: com.intellij.openapi.editor.Editor.offsetToXY(I)Ljava/awt/Point;
at com.github.gtache.lsp.editor.EditorEventManager.mouseMoved(EditorEventManager.scala:975)
at com.github.gtache.lsp.editor.listeners.EditorMouseMotionListenerImpl.mouseMoved(EditorMouseMotionListenerImpl.scala:15)
at com.intellij.openapi.editor.impl.EditorImpl$MyMouseMotionListener.mouseMoved(EditorImpl.java:3925)
at java.awt.Component.processMouseMotionEvent(Component.java:6586)
at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3342)
at java.awt.Component.processEvent(Component.java:6310)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4897)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4719)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4538)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4719)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.awt.EventQueue$4.run(EventQueue.java:735)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:827)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:651)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
java.util.concurrent.ExecutionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: import "/home/shan/Documents/WSO2/Sources/ScalaTest": cannot import absolute path
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915)
at com.github.gtache.lsp.editor.EditorEventManager.$anonfun$showReferences$3(EditorEventManager.scala:727)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:334)
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)
Caused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: import "/home/shan/Documents/WSO2/Sources/ScalaTest": cannot import absolute path
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.lambda$request$1(RemoteEndpoint.java:121)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:162)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:149)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:149)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:77)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:84)
... 5 more
I'm trying to use a lsp for F# in Rider.
It appears not to be working, however I was wondering if there are logs or output in Rider I could check to see if it is at least trying to reach the lsp?
Since it's missing, I thought I'd suggest adding support for the Python language server.
This will complement PyCharm very well.
Iโm tried to take this plugin for a spin today but ran into a small snag, the library I was trying to use depends on another library that is not published to one of coursierโs default resolvers. An additional configuration column to add coursier arguments would be enough for me to pass the additional resolver to coursier and get working.
I've been unable to pinpoint when this is happening.
java.lang.NullPointerException
at com.github.gtache.lsp.editor.EditorEventManager.createCtrlRange(EditorEventManager.scala:952)
at com.github.gtache.lsp.editor.EditorEventManager.mouseClicked(EditorEventManager.scala:701)
at com.github.gtache.lsp.editor.listeners.EditorMouseListenerImpl.mouseClicked(EditorMouseListenerImpl.scala:25)
at com.intellij.openapi.editor.impl.EditorImpl$MyMouseAdapter.runMouseClickedCommand(EditorImpl.java:3712)
at com.intellij.openapi.editor.impl.EditorImpl$MyMouseAdapter.mouseReleased(EditorImpl.java:3641)
at java.awt.Component.processMouseEvent(Component.java:6548)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3325)
at java.awt.Component.processEvent(Component.java:6313)
at java.awt.Container.processEvent(Container.java:2237)
at java.awt.Component.dispatchEventImpl(Component.java:4903)
at java.awt.Container.dispatchEventImpl(Container.java:2295)
at java.awt.Component.dispatchEvent(Component.java:4725)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
at java.awt.Container.dispatchEventImpl(Container.java:2281)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4725)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.awt.EventQueue$4.run(EventQueue.java:735)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:719)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:664)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:363)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
We haven developed a DSL with xtext and store the artifact in our artifactory. To download the artifact, we need do configure credentials for this repository. I din't found a way to configure this in Coursier. Is there a possibility to do that?
LSP Support plugin is giving an exception if there are spaces in the name of any directory in the path to the current project.
I would really like to use the dotty plugin; it looks like it isn't currently published to a plugin repository for intellij. Is the recommendation to build it from source oneself currently? What advantages would this have, if any, over just using the standard intellij-scala plugin with intellij-lsp configured to talk to dotty's language server?
Used version 1.5.2. Got the following exception:
java.lang.IndexOutOfBoundsException: Wrong line: 360. Available lines count: 15
at com.intellij.openapi.editor.impl.LineSet.checkLineIndex(LineSet.java:202)
at com.intellij.openapi.editor.impl.LineSet.getLineStart(LineSet.java:187)
at com.intellij.openapi.editor.impl.DocumentImpl.getLineStartOffset(DocumentImpl.java:1020)
at com.intellij.util.DocumentUtil.getLineTextRange(DocumentUtil.java:104)
at com.github.gtache.lsp.utils.DocumentUtils$.$anonfun$LSPPosToOffset$1(DocumentUtils.scala:81)
at com.github.gtache.lsp.utils.DocumentUtils$.$anonfun$LSPPosToOffset$1$adapted(DocumentUtils.scala:78)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:963)
at com.github.gtache.lsp.utils.ApplicationUtils$.computableReadAction(ApplicationUtils.scala:26)
at com.github.gtache.lsp.utils.DocumentUtils$.LSPPosToOffset(DocumentUtils.scala:78)
at com.github.gtache.lsp.editor.EditorEventManager.createCtrlRange(EditorEventManager.scala:952)
at com.github.gtache.lsp.editor.EditorEventManager.com$github$gtache$lsp$editor$EditorEventManager$$requestAndShowDoc(EditorEventManager.scala:1080)
at com.github.gtache.lsp.editor.EditorEventManager.$anonfun$mouseMoved$1(EditorEventManager.scala:1023)
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)
I have checked 'Always send requests'. Used with D Language Plugin.
For keyword completion items, lookupElementBuilder is null - obviously:
var lookupElementBuilder: LookupElementBuilder = null
/*.withRenderer((element: LookupElement, presentation: LookupElementPresentation) => { //TODO later
presentation match {
case realPresentation: RealLookupElementPresentation =>
if (!realPresentation.hasEnoughSpaceFor(presentation.getItemText, presentation.isItemTextBold)) {
}
}
})*/
if (kind == CompletionItemKind.Keyword) lookupElementBuilder.withBoldness(true)
In a Typescript project, the language server handles .d.ts
, .ts
, and .js
files. So a single language server instance will need to be launched for all 3. I'm not sure if that can be configured; it looks like we are limited to one extension per server.
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
This is somehow related to #58 but goes in another direction.
In case a language server dies (e.g. the executable crashes) this should not cause lsp to stop working, but lsp should be resilient. It should catch the issue and restartet the language server automatically.
Also there should be no modal info box shown but the crash should be logged.
(if needed I can attach a screenshot of this crash info boxes, next time it occurs)
I have been working on adding Language server support for Ballerina Language in IntelliJ IDEA and since currently the LSP Plugin does not provide the above capability ( although our Ballerina Language Server is currently providing the snippet support ), I thought I'd suggest adding this feature to the LSP client.
Note:
According to the current IntelliJ specifications, variables(tab stops) within templates should be defined according to the $<variable_name>$
format and language server protocol specification allows that with the format ${incremental_number:variable_name}
. Therefore IMO, a simple protocol-to-client conversion might be enough to get this capability working.
While trying to run the spring boot idea extension it was found out by the developer that the initialized message is not supported by this extension. More technical details are mentioned in spring-projects/sts4#63 and https://microsoft.github.io/language-server-protocol/specification#initialized
I'm getting this exception when PHPStorm tries to use auto-completion with psalm-language-server. Let me know if there's anything I can add to help determine why this isn't working as intended.
2019-02-25 17:28:36,894 [1067849] ERROR - plication.impl.ApplicationImpl - String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1967)
at com.github.gtache.lsp.utils.DocumentUtils$.$anonfun$LSPPosToOffset$1(DocumentUtils.scala:82)
at com.github.gtache.lsp.utils.DocumentUtils$.$anonfun$LSPPosToOffset$1$adapted(DocumentUtils.scala:78)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:963)
at com.github.gtache.lsp.utils.ApplicationUtils$.computableReadAction(ApplicationUtils.scala:26)
at com.github.gtache.lsp.utils.DocumentUtils$.LSPPosToOffset(DocumentUtils.scala:78)
at com.github.gtache.lsp.editor.EditorEventManager.$anonfun$diagnostics$4(EditorEventManager.scala:443)
at com.github.gtache.lsp.editor.EditorEventManager.$anonfun$diagnostics$4$adapted(EditorEventManager.scala:437)
at scala.collection.Iterator.foreach(Iterator.scala:937)
at scala.collection.Iterator.foreach$(Iterator.scala:937)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1425)
at scala.collection.IterableLike.foreach(IterableLike.scala:70)
at scala.collection.IterableLike.foreach$(IterableLike.scala:69)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at com.github.gtache.lsp.editor.EditorEventManager.$anonfun$diagnostics$1(EditorEventManager.scala:437)
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)
2019-02-25 17:28:36,894 [1067849] ERROR - plication.impl.ApplicationImpl - PhpStorm 2018.3.4 Build #PS-183.5429.47
2019-02-25 17:28:36,894 [1067849] ERROR - plication.impl.ApplicationImpl - JDK: 1.8.0_152-release; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o
2019-02-25 17:28:36,894 [1067849] ERROR - plication.impl.ApplicationImpl - OS: Linux
2019-02-25 17:28:36,894 [1067849] ERROR - plication.impl.ApplicationImpl - Plugin to blame: LSP Support version: 1.5.2
2019-02-25 17:28:36,894 [1067849] ERROR - plication.impl.ApplicationImpl - Last Action: EditorChooseLookupItemReplace
When I press Alt+Shift+F7 to "find references" and the server returns an empty set of references, I get this error:
next on empty iterator
...
at com.github.gtache.lsp.actions.LSPReferencesAction.actionPerformed(LSPReferencesAction.scala:33)
Illegal character in path at index 59: file://C:/git/camel-language-server/clients/IntelliJ/Apache Camel LSP Client/.idea/workspace.xml
java.net.URISyntaxException: Illegal character in path at index 59: file://C:/git/camel-language-server/clients/IntelliJ/Apache Camel LSP Client/.idea/workspace.xml
at java.net.URI$Parser.fail(URI.java:2848)
at java.net.URI$Parser.checkChars(URI.java:3021)
at java.net.URI$Parser.parseHierarchical(URI.java:3105)
at java.net.URI$Parser.parse(URI.java:3053)
at java.net.URI.(URI.java:588)
at java.net.URL.toURI(URL.java:946)
at com.github.gtache.lsp.utils.FileUtils$.VFSToURI(FileUtils.scala:76)
at com.github.gtache.lsp.requests.FileEventManager$.fileChanged(FileEventManager.scala:41)
at com.github.gtache.lsp.editor.listeners.VFSListener$.contentsChanged(VFSListener.scala:26)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.util.EventDispatcher.dispatch(EventDispatcher.java:99)
at com.intellij.util.EventDispatcher.access$200(EventDispatcher.java:35)
at com.intellij.util.EventDispatcher$2.invoke(EventDispatcher.java:79)
at com.sun.proxy.$Proxy18.contentsChanged(Unknown Source)
at com.intellij.openapi.vfs.impl.BulkVirtualFileListenerAdapter.fireAfter(BulkVirtualFileListenerAdapter.java:65)
at com.intellij.openapi.vfs.impl.BulkVirtualFileListenerAdapter.after(BulkVirtualFileListenerAdapter.java:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:117)
at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:449)
at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:410)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:399)
at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:380)
at com.intellij.util.messages.impl.MessageBusImpl.access$200(MessageBusImpl.java:45)
at com.intellij.util.messages.impl.MessageBusImpl$2.invoke(MessageBusImpl.java:231)
at com.sun.proxy.$Proxy16.after(Unknown Source)
at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl$2.close(PersistentFSImpl.java:651)
at sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:320)
at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:149)
at java.io.OutputStreamWriter.close(OutputStreamWriter.java:233)
at com.intellij.openapi.util.JDOMUtil.write(JDOMUtil.java:384)
at com.intellij.configurationStore.FileBasedStorageKt$doWrite$$inlined$runUndoTransparentWriteAction$1$1.compute(actions.kt:76)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1015)
at com.intellij.configurationStore.FileBasedStorageKt$doWrite$$inlined$runUndoTransparentWriteAction$1.run(actions.kt:29)
at com.intellij.openapi.command.impl.CoreCommandProcessor.runUndoTransparentAction(CoreCommandProcessor.java:323)
at com.intellij.configurationStore.FileBasedStorageKt.doWrite(FileBasedStorage.kt:295)
at com.intellij.configurationStore.FileBasedStorageKt.writeFile(FileBasedStorage.kt:202)
at com.intellij.configurationStore.FileBasedStorage$FileSaveSession.saveLocally(FileBasedStorage.kt:100)
at com.intellij.configurationStore.XmlElementStorage$XmlElementStorageSaveSession.save(XmlElementStorage.kt:151)
at com.intellij.configurationStore.FileBasedStorage$FileSaveSession.save(FileBasedStorage.kt:85)
at com.intellij.configurationStore.ComponentStoreImplKt.executeSave(ComponentStoreImpl.kt:486)
at com.intellij.configurationStore.ComponentStoreImpl.doSave(ComponentStoreImpl.kt:239)
at com.intellij.configurationStore.ProjectStoreImpl.doSave(ProjectStoreImpl.kt:335)
at com.intellij.configurationStore.ComponentStoreImpl.save(ComponentStoreImpl.kt:196)
at com.intellij.openapi.components.impl.stores.StoreUtil.save(StoreUtil.java:49)
at com.intellij.openapi.project.impl.ProjectImpl.save(ProjectImpl.java:349)
at com.intellij.openapi.components.impl.stores.StoreUtil.saveDocumentsAndProjectsAndApp(StoreUtil.java:126)
at com.intellij.openapi.application.impl.ApplicationImpl.saveAll(ApplicationImpl.java:1413)
at com.intellij.ide.SaveAndSyncHandlerImpl.saveProjectsAndDocuments(SaveAndSyncHandlerImpl.java:126)
at com.intellij.ide.SaveAndSyncHandlerImpl$2.lambda$onFrameDeactivated$0(SaveAndSyncHandlerImpl.java:94)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.java:111)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:120)
at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:122)
at com.intellij.ide.SaveAndSyncHandlerImpl$2.onFrameDeactivated(SaveAndSyncHandlerImpl.java:92)
at com.intellij.ide.FrameStateManagerImpl.fireDeactivationEvent(FrameStateManagerImpl.java:84)
at com.intellij.ide.FrameStateManagerImpl.access$500(FrameStateManagerImpl.java:32)
at com.intellij.ide.FrameStateManagerImpl$2.lambda$applicationDeactivated$0(FrameStateManagerImpl.java:70)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:246)
at com.intellij.util.Alarm$Request.runSafely(Alarm.java:417)
at com.intellij.util.Alarm$Request.access$700(Alarm.java:344)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:384)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:424)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:407)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:822)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:650)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:366)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Hi,
i try to include https://github.com/vuejs/vetur/tree/master/server
i did npm install vue-language-server -g
added a "raw" plugin config vue -> /path/to/vls.cmd
StackTrace:
java.lang.Throwable: No workspace path found. Vetur initialization failed
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:134)
at com.github.gtache.lsp.client.LanguageClientImpl.logMessage(LanguageClientImpl.scala:99)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
...
Solution:
Add Raw Command with /path/to/vls. rootPath:'file:///C:/Path/to/Workspace/'
Newer Implementations use rootUri (deprecated as well) or workspaceFolders
https://github.com/Microsoft/vscode-languageserver-node/blob/73180893cae36ef34d3b188b8293fefc1c2bc6f9/protocol/src/protocol.ts#L817
Now its Green but it doesnt seem to work
Edit: After a Restart i needed to remove the rootPath
option to make it work. ๐
I tried to test the client using Go language server. When I restart the IDEA, I got following error. Before restarting the IDEA, client worked without any issue.
I also encountered same issue when trying to use Ballerina language server as well.
java.io.IOException: Stream closed
java.lang.RuntimeException: java.io.IOException: Stream closed
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:68)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.request(RemoteEndpoint.java:129)
at org.eclipse.lsp4j.jsonrpc.services.EndpointProxy.invoke(EndpointProxy.java:77)
at com.sun.proxy.$Proxy115.initialize(Unknown Source)
at com.github.gtache.lsp.client.languageserver.wrapper.LanguageServerWrapperImpl.start(LanguageServerWrapperImpl.scala:276)
at com.github.gtache.lsp.client.languageserver.wrapper.LanguageServerWrapperImpl.connect(LanguageServerWrapperImpl.scala:163)
at com.github.gtache.lsp.PluginMain$.$anonfun$editorOpened$4(PluginMain.scala:127)
at com.github.gtache.lsp.PluginMain$.$anonfun$editorOpened$4$adapted(PluginMain.scala:109)
at scala.Option.foreach(Option.scala:257)
at com.github.gtache.lsp.PluginMain$.$anonfun$editorOpened$3(PluginMain.scala:109)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:334)
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)
Caused by: java.io.IOException: Stream closed
at java.lang.ProcessBuilder$NullOutputStream.write(ProcessBuilder.java:433)
at java.io.OutputStream.write(OutputStream.java:116)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:65)
... 15 more
First of all, thanks so much for making this plugin! :)
I have noticed this lsp client plugin activates when the files matches certain extention is opened in the IDE, I'm just wondering if there is a way to configure the plugin so it would be able to recognise files without extension, for example Dockerfile
?
I'm currently writing my own language server, and the files don't usually have an extension.
Thanks again! :)
I'm trying out intellij-lsp
with my language server. It works well with vscode, atom, and sublime text's LSP plugin, and intellij support is a very common request from our users.
I downloaded IntelliJ IDEA CE 2017.3
, installed intellij-lsp
, and configured my LSP server as a raw command, with a file extension of html
, and the command polymer-editor-service
. From my logs I can see that polymer-editor-service
is started and initialized, and I get onDidChangeWatchedFiles
requests, but that's pretty much it. I don't get notifications when files are opened, closed, changed in memory, or any requests for features like hover or completions.
Reproducing this is pretty straightforward if you have NodeJS v6 or higher installed. npm install -g polymer-editor-service
will get you the LSP server, and the simplest way to check if it's working is to put something like this in an HTML file:
<link rel="import" href="./does-not-exist.html">
It should report an error diagnostic on the url.
After installing the plugin, the menu items for
are blank (not greyed out). They still work though, as do the related short cuts.
When uninstalling the plugin the menu is shown again and disappears if the plugin is reinstalled.
Not a big deal, but strange and a bit annoying to find the plugin that is responsible for it.
Illegal character in path at index 97: file://C:/Users/Andrey/IdeaProjects/incoming/powershell/build/idea-sandbox/config/keymaps/Default copy.xml
java.net.URISyntaxException: Illegal character in path at index 97: file://C:/Users/Andrey/IdeaProjects/incoming/powershell/build/idea-sandbox/config/keymaps/Default copy.xml
at java.net.URI$Parser.fail(URI.java:2848)
at java.net.URI$Parser.checkChars(URI.java:3021)
at java.net.URI$Parser.parseHierarchical(URI.java:3105)
at java.net.URI$Parser.parse(URI.java:3053)
at java.net.URI.(URI.java:588)
at java.net.URL.toURI(URL.java:946)
at com.github.gtache.lsp.utils.FileUtils$.VFSToURI(FileUtils.scala:76)
at com.github.gtache.lsp.requests.FileEventManager$.fileCreated(FileEventManager.scala:88)
at com.github.gtache.lsp.editor.listeners.VFSListener$.fileCreated(VFSListener.scala:62)
at sun.reflect.GeneratedMethodAccessor94.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.util.EventDispatcher.dispatch(EventDispatcher.java:99)
at com.intellij.util.EventDispatcher.access$200(EventDispatcher.java:35)
at com.intellij.util.EventDispatcher$2.invoke(EventDispatcher.java:79)
at com.sun.proxy.$Proxy17.fileCreated(Unknown Source)
at com.intellij.openapi.vfs.impl.BulkVirtualFileListenerAdapter.fireAfter(BulkVirtualFileListenerAdapter.java:80)
at com.intellij.openapi.vfs.impl.BulkVirtualFileListenerAdapter.after(BulkVirtualFileListenerAdapter.java:56)
at sun.reflect.GeneratedMethodAccessor66.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:117)
at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:448)
at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:409)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:398)
at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:379)
at com.intellij.util.messages.impl.MessageBusImpl.access$200(MessageBusImpl.java:45)
at com.intellij.util.messages.impl.MessageBusImpl$2.invoke(MessageBusImpl.java:231)
at com.sun.proxy.$Proxy15.after(Unknown Source)
at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.processEvent(PersistentFSImpl.java:688)
at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.createChildFile(PersistentFSImpl.java:441)
at com.intellij.openapi.vfs.newvfs.impl.VirtualFileSystemEntry.createChildData(VirtualFileSystemEntry.java:216)
at com.intellij.configurationStore.schemeManager.SchemeLoaderKt$getOrCreateChild$$inlined$runUndoTransparentWriteAction$1$1.compute(actions.kt:70)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1015)
at com.intellij.configurationStore.schemeManager.SchemeLoaderKt$getOrCreateChild$$inlined$runUndoTransparentWriteAction$1.run(actions.kt:29)
at com.intellij.openapi.command.impl.CoreCommandProcessor.runUndoTransparentAction(CoreCommandProcessor.java:323)
at com.intellij.configurationStore.schemeManager.SchemeLoaderKt.getOrCreateChild(schemeLoader.kt:98)
at com.intellij.configurationStore.SchemeManagerImpl.saveScheme(SchemeManagerImpl.kt:693)
at com.intellij.configurationStore.SchemeManagerImpl.save(SchemeManagerImpl.kt:570)
at com.intellij.configurationStore.SchemeManagerFactoryBase.save(SchemeManagerFactoryImpl.kt:101)
at com.intellij.configurationStore.ComponentStoreImpl.save(ComponentStoreImpl.kt:184)
at com.intellij.openapi.components.impl.stores.StoreUtil.save(StoreUtil.java:49)
at com.intellij.openapi.application.impl.ApplicationImpl.saveSettings(ApplicationImpl.java:1401)
at com.intellij.openapi.components.impl.stores.StoreUtil.saveDocumentsAndProjectsAndApp(StoreUtil.java:129)
at com.intellij.openapi.application.impl.ApplicationImpl.saveAll(ApplicationImpl.java:1413)
at com.intellij.openapi.options.newEditor.SettingsDialog.doOKAction(SettingsDialog.java:174)
at com.intellij.openapi.ui.DialogWrapper$OkAction.doAction(DialogWrapper.java:1877)
at com.intellij.openapi.ui.DialogWrapper$DialogWrapperAction.actionPerformed(DialogWrapper.java:1838)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:822)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:646)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:366)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:734)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:456)
at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1696)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1645)
at com.intellij.openapi.options.newEditor.SettingsDialog.lambda$show$0(SettingsDialog.java:83)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransactionAndWait(TransactionGuardImpl.java:153)
at com.intellij.openapi.options.newEditor.SettingsDialog.show(SettingsDialog.java:83)
at com.intellij.ide.actions.ShowSettingsUtilImpl.showSettingsDialog(ShowSettingsUtilImpl.java:97)
at com.intellij.ide.actions.ShowSettingsAction.perform(ShowSettingsAction.java:63)
at com.intellij.ide.actions.ShowSettingsAction.actionPerformed(ShowSettingsAction.java:52)
at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:220)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:237)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$0(ActionMenuItem.java:321)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:911)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:136)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:311)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:130)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.java:111)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:120)
at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:122)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:130)
at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:521)
at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:48)
at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:541)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:822)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:646)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:366)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
I use IntelliJ 2018.3.4 (PyCharme Professional but issue is also reproducible with Communtiy Editon).
I installed the language server for the D Programming Language
https://github.com/d-language-server/dls/releases
It works fine as long as I do not install the specific IntelliJ plugin for the D Programming Language.
https://plugins.jetbrains.com/plugin/8115-d-language
If I install this plugin I have following behavior:
Issue is reproducible. I am not sure where to open this issue, on this repository, dls or the dlang intellij plugin repository.
Hi, I just tried to get this plugin running using this guide: https://getpsalm.org/docs/language_server/#phpstorm
But somehow the PhpStorm Event Log only shows an exception :(
PhpStorm 2018.3.4
Build #PS-183.5429.47, built on February 8, 2019
JRE: 1.8.0_152-release-1343-b26 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
java.lang.IllegalStateException: Duplicate RPC method textDocument/semanticHighlighting.
at org.eclipse.lsp4j.jsonrpc.services.ServiceEndpoints.lambda$getSupportedMethods$0(ServiceEndpoints.java:113)
at org.eclipse.lsp4j.jsonrpc.services.AnnotationUtil.findRpcMethods(AnnotationUtil.java:66)
at org.eclipse.lsp4j.jsonrpc.services.ServiceEndpoints.getSupportedMethods(ServiceEndpoints.java:90)
at org.eclipse.lsp4j.jsonrpc.services.ServiceEndpoints.getSupportedMethods(ServiceEndpoints.java:82)
at org.eclipse.lsp4j.jsonrpc.Launcher$Builder.getSupportedMethods(Launcher.java:370)
at org.eclipse.lsp4j.jsonrpc.Launcher$Builder.createJsonHandler(Launcher.java:381)
at org.eclipse.lsp4j.jsonrpc.Launcher$Builder.create(Launcher.java:305)
at org.eclipse.lsp4j.launch.LSPLauncher.createClientLauncher(LSPLauncher.java:106)
at com.github.gtache.lsp.client.languageserver.wrapper.LanguageServerWrapperImpl.start(LanguageServerWrapperImpl.scala:291)
at com.github.gtache.lsp.client.languageserver.wrapper.LanguageServerWrapperImpl.connect(LanguageServerWrapperImpl.scala:169)
at com.github.gtache.lsp.PluginMain$.$anonfun$editorOpened$2(PluginMain.scala:135)
at com.github.gtache.lsp.PluginMain$.$anonfun$editorOpened$2$adapted(PluginMain.scala:132)
at scala.Option.foreach(Option.scala:257)
at com.github.gtache.lsp.PluginMain$.$anonfun$editorOpened$1(PluginMain.scala:132)
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)
At first I opened this issue for the D Language Server (d-language-server/dls#29) but the assumption is, the issue is related to intellij-lsp.
In the code completion there is some space missing between the method name and the full method signature:
That makes it quite hard to read the method name.
Could you have a look?
In case the lsp executable fails there is no possibility to restart the server.
Currently IntelliJ IDEA has to be restarted. Could you add a server action "restart"?
I am trying to use LSP with YAML language server but I can't see how to point the server to schema definitions (see appropriate issue). When trying to debug the connection I've set raw command to
bash -c "node /home/rvansa/workspace/yaml-language-server/out/server/src/server.js --stdio | tee /tmp/lsp.log"
and I've got this stack trace:
null
java.lang.NullPointerException
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.client.languageserver.wrapper.LanguageServerWrapperImpl$.forEditor(LanguageServerWrapperImpl.scala:48)
at com.github.gtache.lsp.PluginMain$.$anonfun$editorClosed$1(PluginMain.scala:260)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:305)
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:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Hi, trying to use this project to connect IntelliJ to my LSP server (https://github.com/wix/stylable-intelligence/), and having issues building the project.
Getting this error, from wither command line or IntelliJ 'open Project' wizard:
~/p/intellij-lsp *master> sbt build.sbt
[info] Loading project definition from /home/wix/projects/intellij-lsp/project
[error] [/home/wix/projects/intellij-lsp/build.sbt]:19: illegal start of simple expression
[error] [/home/wix/projects/intellij-lsp/build.sbt]:70: ')' expected but eof found.
Throwing the sbt file in an online Scala REPL (like https://scastie.scala-lang.org/) also throws the same errors.
Can you help please?
Here's the stack trace:
java.lang.NullPointerException
at com.github.gtache.lsp.utils.FileUtils$.editorToProjectFolderPath(FileUtils.scala:99)
at com.github.gtache.lsp.PluginMain$.$anonfun$editorOpened$3(PluginMain.scala:117)
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)
It appears that this exception only occurs if an editor containing .gitignore
is open initially.
Hey, I got #42, that's nice ;-)
Please support implementation. Thanks.
Hi! I tried to use D Language Server, it is new and yet not pulled feature of https://github.com/intellij-dlanguage (RR is here: intellij-dlanguage/intellij-dlanguage.github.io#3).
I got this error when I try to use autocompete:
Details: Current thread: Thread[ApplicationImpl pooled thread 18,4,Idea Thread Group] 1654340627
; dispatch thread: false; isDispatchThread(): false
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,Idea Thread Group] 1585037025
java.lang.Throwable: Read access is allowed from event dispatch thread or inside read-action only (see com.intellij.openapi.application.Application.runReadAction())
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:156)
at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:1090)
at com.intellij.openapi.editor.impl.view.EditorView.assertIsReadAccess(EditorView.java:599)
at com.intellij.openapi.editor.impl.view.EditorView.logicalPositionToOffset(EditorView.java:160)
at com.intellij.openapi.editor.impl.EditorImpl.logicalPositionToOffset(EditorImpl.java:2137)
at com.github.gtache.lsp.utils.DocumentUtils$.logicalToLSPPos(DocumentUtils.scala:49)
at com.github.gtache.lsp.editor.EditorEventManager.$anonfun$onTypeFormatting$1(EditorEventManager.scala:1426)
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)
Settings was: executable
is path to 'dls.exe' ("D:\Dlang\dls\dls.exe"), extension is 'd' (also tried with dot '.d'), no args.
UPD. Version 1.5.0
Using LSP Support 1.5.0, I get the following stacktrace:
scala.MatchError: GoToAction (of class java.lang.String)
at com.github.gtache.lsp.actions.LSPLinkToServerAction.actionPerformed(LSPLinkToServerAction.scala:22)
at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:258)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:275)
at com.intellij.ide.actions.GotoActionAction.lambda$performAction$7(GotoActionAction.java:351)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.java:111)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:120)
at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransactionLater$4(TransactionGuardImpl.java:271)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:435)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:419)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:403)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:719)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:668)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:363)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
After installing the latest plugin version (1.5.0) and restarting the IDEA, the following error is shown and the plugin is disabled.
Plugin 'com.github.gtache.lsp' failed to initialize and will be disabled. Please restart IntelliJ IDEA.
com.intellij.diagnostic.PluginException: While loading class com.github.gtache.lsp.settings.LSPState: com/github/gtache/lsp/settings/LSPState has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 [Plugin: com.github.gtache.lsp]
at com.intellij.ide.plugins.cl.PluginClassLoader.a(PluginClassLoader.java:145)
at com.intellij.ide.plugins.cl.PluginClassLoader.a(PluginClassLoader.java:74)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.github.gtache.lsp.PluginMain.initComponent(PluginMain.scala:343)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:497)
at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponents(ComponentManagerImpl.java:119)
at com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:447)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:157)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:543)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:488)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
at com.intellij.openapi.application.impl.ApplicationImpl.createComponents(ApplicationImpl.java:454)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:103)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:406)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:392)
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.idea.MainImpl$1$1.a(MainImpl.java:65)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:346)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.UnsupportedClassVersionError: com/github/gtache/lsp/settings/LSPState has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.lang.ClassLoader.defineClass(ClassLoader.java:642)
at com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java:276)
at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:272)
at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:241)
at com.intellij.ide.plugins.cl.PluginClassLoader.a(PluginClassLoader.java:142)
... 37 more
Hello.
after pressing "format selection" and recieving result IDEA sends several textDocument/didChange events (instead of only one).
catched by printwriter tracer:
File logFile = new File("./lsp-trace.log");
PrintWriter printWriter = new PrintWriter(logFile, StandardCharsets.UTF_8.name());
launcher = LSPLauncher.createServerLauncher(server, in, out, false, printWriter);
The new DocumentUtils.LSPPosToOffset does not handle positions with a line index equal to the number of lines correctly and instead results in an out of bounds exception. This can happen if, say, the range of the entire document with n lines is described: [(0, 0), (n, 0)) is that range.
Stacktrace (for n = 5):
Wrong line: 5. Available lines count: 5
java.lang.IndexOutOfBoundsException: Wrong line: 5. Available lines count: 5
at com.intellij.openapi.editor.impl.LineSet.checkLineIndex(LineSet.java:202)
at com.intellij.openapi.editor.impl.LineSet.getLineStart(LineSet.java:187)
at com.intellij.openapi.editor.impl.DocumentImpl.getLineStartOffset(DocumentImpl.java:922)
at com.intellij.util.DocumentUtil.getLineTextRange(DocumentUtil.java:104)
at com.github.gtache.lsp.utils.DocumentUtils$.LSPPosToOffset(DocumentUtils.scala:73)
[...]
I am trying to use LSP with YAML language server - okay, already mentioned in #55 - and checking on vscode-yaml sources I found that I need to send some notifications with schema mapping to the server. I haven't found a way to do that from LSP plugin configuration, can you provide any hints?
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.