LSP integration only working with diagnostics, not completions or jumping

Answered

Hi. I am developing a TypeScript plugin which adds custom element handling inside of tagged template literals, using the language server protocol. It is currently still in development, but is working well in NeoVim and VSCode.

Since 2023.2 it looks like JetBrains IDEs support LSP too. I have just setup IntelliJ IDEA Ultimate for testing, and out of the box the diagnostics functionality of the LSP is working.

The above image shows that the property binding `:curry` doesn't exist on the custom element `person-avatar`, which is correct. The diagnostics functionality is matching what I am seeing in the other two editors that I am working with.

However, the completions and jump to definitions functionality is not working correctly. When I attempt to create a completion I don't get some of the values from the LSP, and when I checked the logs it seems that IntelliJ isn't requesting the completions function of the plugin (I am not seeing a log which I am for the other two editors). It also seems that the jump to definition, and quick-info functionality I have implemented is not working whatsoever in IntelliJ. 

I did wonder if IntelliJ wasn't using the LSP at all and just has the diagnostics functionality anyway, though it does look in my logs like it is saying IntelliJ is the LSP client and that the diagnostics functions I have written are being called. 

Does anyone have any ideas what the issue could be? Do I need to add some more configuration options to be able to get it working properly? Do I need to follow the plugin configuration steps as explained here even though this is just a typescript project, and is not using gradle/java/scala etc?

0
2 comments

Hello, Matt Walker. Could you please create a similar post on the Plugin Development forum? It could be more suitable to address your case there, our developers and community could help with it. 

0

Please sign in to leave a comment.