Skip to content

Conversation

pditommaso
Copy link
Member

Summary

This PR implements a complete IntelliJ IDEA plugin for Nextflow language support using LSP4IJ integration, addressing issue #14.

Features Implemented

  • Complete LSP4IJ Integration: Proper language server factory and connection provider
  • File Type Support: Recognition for .nf, .nf.test, nextflow.config, and *.config files
  • Automatic Discovery: Language server JAR detection from common installation paths
  • Full Language Features: Code completion, diagnostics, hover, go-to-definition, find references, etc.
  • Professional Structure: Follows IntelliJ plugin development best practices

Plugin Architecture

intellij-plugin/ contains the complete plugin implementation with proper LSP4IJ integration.

Requirements

  • IntelliJ IDEA 2023.3+
  • LSP4IJ plugin installed
  • Nextflow Language Server JAR

Installation & Testing

  1. Install LSP4IJ plugin in IntelliJ IDEA
  2. Download and place language-server-all.jar at ~/.local/share/nextflow/language-server/
  3. Build plugin: cd intellij-plugin && ./gradlew jar prepareSandbox
  4. Install from build/idea-sandbox/plugins/nextflow-intellij-plugin/

Implementation Notes

  • Uses LSP4IJ extension points for proper integration
  • Manages language server process lifecycle automatically
  • Compiles successfully with correct API usage
  • Provides seamless integration with IntelliJ language infrastructure

Closes #14

- Implement complete IntelliJ IDEA plugin for Nextflow language support
- Use LSP4IJ for seamless integration with Nextflow Language Server
- Support .nf, .nf.test, nextflow.config, and *.config files
- Automatic language server discovery from common installation paths
- Full LSP features: completion, diagnostics, hover, go-to-definition, etc.
- Professional plugin structure following IntelliJ development best practices

Resolves #14

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@angelozerr
Copy link

angelozerr commented Aug 15, 2025

I suggest that you implement a server installer https://github.com/redhat-developer/lsp4ij/blob/main/docs/LSPApi.md#language-server-installer to install the server when it is started.

And as your language server can be downloaded from github asset, I suggest that you try to use declarative installer https://github.com/redhat-developer/lsp4ij/blob/main/docs/UserDefinedLanguageServerTemplate.md#github-asset-download

I am using this declarative installer with user defined ls if you need help to load declarative installer please ask me.

@ewels
Copy link
Member

ewels commented Aug 16, 2025

Should this be its own repo? The VSCode plugin is for example. Then it can just load the language server and the two are kept separate..

@pditommaso
Copy link
Member Author

Should this be its own repo?

Possibly, still very experimental

I suggest that you implement a server installer

Interesting !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IntelliJ IDEA plugin
3 participants