Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: initial Intelij plugin #2564

Merged
merged 2 commits into from
Sep 2, 2024
Merged

feat: initial Intelij plugin #2564

merged 2 commits into from
Sep 2, 2024

Conversation

stuartwdouglas
Copy link
Collaborator

@stuartwdouglas stuartwdouglas commented Aug 30, 2024

Thanks to @bradleydwyer

I have tested it out and added Hermit support so we run FTL with the right env.

It's not perfect but I think we should just get this in an iterate.

#2549

@stuartwdouglas stuartwdouglas requested review from a team and jonathanj-square and removed request for a team August 30, 2024 15:55
This was referenced Aug 30, 2024
Copy link
Member

@wesbillman wesbillman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's go!!! Nice work @bradleydwyer 🥳

@stuartwdouglas stuartwdouglas force-pushed the brad/intellij branch 2 times, most recently from 6b3733d to 2d14a80 Compare August 30, 2024 21:25
@alecthomas
Copy link
Collaborator

This is awesome!

Though why do we want Hermit support in this plugin when there's already a Hermit plugin? Does it not interact well or something?

- name: Install Java
run: java -version
- name: Build Intellij Plugin
run: just build-intellij-plugin
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How long does this take? Copy pasta the if statement from other jobs if this is going to take more than a minute or two, so we can keep the main PR loop fast.

@stuartwdouglas
Copy link
Collaborator Author

This is awesome!

Though why do we want Hermit support in this plugin when there's already a Hermit plugin? Does it not interact well or something?

The Hermit plugin adds Hermit support to a couple of different IDE actions, but if you just run a process directly it won't pick up the correct Hermit environment.

By running the command like through the ToolCustomizer (which the Hermit plugin provides an instance of) it picks up the hermit environment so things work as expected. It would also work with any other plugin that is doing similar things.

@stuartwdouglas
Copy link
Collaborator Author

Something I still need to figure out is that if you have multiple projects open only the first one will succeed, as ftl dev can only be run once. We likely need to be able to run the server standalone.

@stuartwdouglas stuartwdouglas force-pushed the brad/intellij branch 2 times, most recently from 0fa915d to 4aba6c7 Compare August 31, 2024 17:43
@stuartwdouglas
Copy link
Collaborator Author

Looks like LSP support is paid only: https://plugins.jetbrains.com/docs/intellij/language-server-protocol.html#supported-ides

Longer term LSP might not be the way to go for intellij support

@stuartwdouglas stuartwdouglas added the run-all A PR with this label will run the full set of CI jobs in the PR rather than in the merge queue label Sep 1, 2024
@angelozerr
Copy link

If you need a free LSP support for IntelliJ please try https://github.com/redhat-developer/lsp4ij

You can read an article about LSP4IJ at https://idetools.dev/blog/lsp4ij-announcement/

More and more plygins are using LSP4IJ plese see https://github.com/redhat-developer/lsp4ij?tab=readme-ov-file#requirements

Hope you could be interested with LSP4IJ and don't hesitate to answer me if you have any questions.

@stuartwdouglas
Copy link
Collaborator Author

@angelozerr thanks for the tip, I will check it out

@alecthomas
Copy link
Collaborator

Thanks @angelozerr, appreciate the heads up!

bradleydwyer and others added 2 commits September 2, 2024 20:50
…a plugin.

- Basic completion of go directives
- start/stop/restart of the LSP
- lsp terminal output (auto scroll/clear buffer/soft wrap)
- settings panel for LSP server command configuration and project working directory
This piggy backs on the Hermit plugin to get the correct FTL version.
@stuartwdouglas stuartwdouglas added this pull request to the merge queue Sep 2, 2024
Merged via the queue into main with commit eb2bd33 Sep 2, 2024
88 checks passed
@stuartwdouglas stuartwdouglas deleted the brad/intellij branch September 2, 2024 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-all A PR with this label will run the full set of CI jobs in the PR rather than in the merge queue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants