stimulus-lsp icon indicating copy to clipboard operation
stimulus-lsp copied to clipboard

RubyMine support

Open marcoroth opened this issue 2 years ago • 10 comments

https://blog.jetbrains.com/platform/2023/07/lsp-for-plugin-developers/

marcoroth avatar Oct 11 '23 14:10 marcoroth

@marcoroth I'm going to see if I can figure this out

kcdragon avatar May 10 '24 19:05 kcdragon

Screenshot 2024-05-10 at 4 28 28 PM

@marcoroth I've got this somewhat working locally. It seems like Intellij allows you to either bundle the language server inside the plugin or have users configure where the language server is installed on their computer. Would you recommend a particular approach?

kcdragon avatar May 10 '24 20:05 kcdragon

Oh sweet, thanks for giving this a shot @kcdragon! This is exciting!

I guess bundling it with the plugin would be easier to setup and get started, but it depends if that actually works with a language server that's written in Node.js.

marcoroth avatar May 12 '24 18:05 marcoroth

I use RubyMine, and would very much appreciate help getting this great tooling into my editor!

gap777 avatar May 12 '24 23:05 gap777

I wanted to bundle the language server in the plugin to make it easier to setup but I couldn't figure out how to do that. I've got a version of the plugin that depends on the stimulus-language-server executable being on your PATH. That should be good enough for a first version.

This is the repository. I submitted the plugin to JetBrains for review. Assuming they approve it, it should appear in the Plugin Marketplace soon.

kcdragon avatar May 13 '24 00:05 kcdragon

@marcoroth Is it intended that installing stimulus-language-server globally will add an executable that can be ran? When I run yarn global add stimulus-language-server, it mentions that it installed an executable but I don't see one in my bin directory.

$ yarn global add stimulus-language-server
...
success Installed "[email protected]" with binaries:
      - stimulus-language-server

$ yarn global bin stimulus-language-server
/opt/homebrew/bin

$ ls /opt/homebrew/bin/stim*
zsh: no matches found: /opt/homebrew/bin/stim*

I was able to work around this and test the plugin by cloning this repo, running yarn build in server/ and then sym-linking out/stimulus-language-server to a directory on my PATH.

kcdragon avatar May 13 '24 02:05 kcdragon

Thanks for exploring this! @kcdragon!

This is the repository. I submitted the plugin to JetBrains for review. Assuming they approve it, it should appear in the Plugin Marketplace soon.

Would it make sense to host the code for that here in this repo too? Given we bundle the executable with the plugin I think we'd want to also have the same release cycle.

Is it intended that installing stimulus-language-server globally will add an executable that can be ran?

Yes! At least that's how it works for me. But I also see that nodenv is shimming it:

❯ which stimulus-language-server
/Users/marcoroth/.anyenv/envs/nodenv/shims/stimulus-language-server

Might be worth to check how other plugins for JetBrains IDEs do it.

marcoroth avatar May 13 '24 05:05 marcoroth

Would it make sense to host the code for that here in this repo too?

Sure I'm fine with having it in this repo. Once I get a good enough version of it, I'll open a PR here

kcdragon avatar May 14 '24 17:05 kcdragon

Awesome, thank you Mike. Let me know if I can help somehow 🙌🏼

marcoroth avatar May 14 '24 18:05 marcoroth

@kcdragon if you wish to provide a free plugin please try https://github.com/redhat-developer/lsp4ij

angelozerr avatar May 18 '24 15:05 angelozerr