sveltejs / language-tools

The Svelte Language Server, and official extensions which use it
MIT License
1.25k stars 200 forks source link

Jetbrains support #361

Closed maraisr closed 3 years ago

maraisr commented 4 years ago

Is your feature request related to a problem? Please describe. I can see there is an official plugin for vscode, but not the Jetbrains?

Describe the solution you'd like I can see that https://github.com/tomblachut/svelte-intellij already has a plugin, but this doesnt work. The plugin has been marked as broken, so when you install it—it specifically asks to opt into beta code. That and, if i do there is no TypeScript support.

Describe alternatives you've considered Moving to vscode... But that is a much bigger ask.

How important is this feature to you? Extremely. So much so that I'd try find some Java developers to help me with this.

Additional context na

daarxwalker commented 4 years ago

@maraisr I share your mindset with this. I contacted JB plugin author and he promised, he will work on that, it was maybe 3-4 weeks before, offering him help too with tests, no response since that time. Btw. nowadays Kotlin is better option for JB plugins.

dummdidumm commented 4 years ago

Collaborator from the language tools repo here: Sadly intellij does not support the language server protocol which the extension for VSCode is based on. So this is out of scope for us right now. As you said, your best chance right now is helping the author of the intellij plugin.

orta commented 4 years ago

Yeah, it may be easier for all folks involved to look into making a new plugin which explicitly uses the LSP from svelte-language-server - I imagine there must be existing patterns for this in the jet brains ecosystem

dummdidumm commented 4 years ago

Related #74

lingster commented 4 years ago

Hi, Sorry please ignore the below, it was not quite working as expected..will post an update once I have it working...

hope this will help, but you can get intellij support by installing the intellij-lsp from here: https://plugins.jetbrains.com/plugin/10209-lsp-support then in command line run: npm install -g svelte-language-server then in intellij preferences for the language server add the settings as follows: note, you can run which sveltesever to find the full path of the server and replace, screenshot shows path on my mac, you milage may vary depending on your OS version:

Screenshot 2020-08-11 at 10 45 22

g5becks commented 3 years ago

@lingster This solution actually works on my end, I didn't use raw command though, I used the executable option and added --stdio as an arg.

vatro commented 3 years ago

@lingster @g5becks @dummdidumm

can confirm @lingster's solution works on Windows10 + WebStorm 2020.3.3 + LSP Support Plugin ! 👍

image

Autocomplete / typechecking behavior is (almost?) the same as with "Svelte for VSCode", but without syntax highlighting and some other features ( auto-import, component JSX attributes autocomplete ... etc. )