Skip to content

CAMEL-21945 camel-jbang: add edit plugin #17704

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

johnpoth
Copy link
Member

@johnpoth johnpoth commented Apr 9, 2025

Description

https://issues.apache.org/jira/browse/CAMEL-21945

Adds camel-lsp to the Camel JBang text editor. This is largely based on JLine's Nano editor. Users could then benefit from suggestions and diagnostics while writing Camel routes. This should help users to write routes faster.

Needs camel-tooling/camel-language-server#1266

output

Thanks!

Target

  • I checked that the commit is targeting the correct branch (Camel 4 uses the main branch)

Tracking

  • If this is a large change, bug fix, or code improvement, I checked there is a JIRA issue filed for the change (usually before you start working on it).

Apache Camel coding standards and style

  • I checked that each commit in the pull request has a meaningful subject line and body.
  • I have run mvn clean install -DskipTests locally from root folder and I have committed all auto-generated changes.

Copy link
Contributor

github-actions bot commented Apr 9, 2025

🌟 Thank you for your contribution to the Apache Camel project! 🌟

🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run

  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot.

  • You can label PRs using build-all, build-dependents, skip-tests and test-dependents to fine-tune the checks executed by this PR.

  • Build and test logs are available in the Summary page. Only Apache Camel committers have access to the summary.

  • ⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@apupier
Copy link
Contributor

apupier commented Apr 10, 2025

@davsclaus
Copy link
Contributor

It would be a bit heavy to have all these dependencies in the core camel-jbang command. So I think it may be a good idea to move this into a new seperate plugin like we have for kubernetes etc.

@davsclaus
Copy link
Contributor

This looks cool, can you try to see if you can get this to work for yaml DSL also.
And it would be good to work for application.properties as configuring those many camel options is more common to do in such a quick editor and having code assistance would be great.

@johnpoth
Copy link
Member Author

Yeah yaml and properties file should work:

camel

For YAML the file has to end in camel.yaml or camel.yml though (camel-language-server).

Let's add it as a plugin. We can then later trim the dependencies as the server stuff isn't needed. Thanks!

@johnpoth
Copy link
Member Author

Ok so I added it as a plugin called edit. I've renamed the old editor to nano to not conflict. Let me know what you think

Thanks !

@johnpoth johnpoth marked this pull request as ready for review April 15, 2025 15:56
@johnpoth johnpoth force-pushed the CAMEL-21945 branch 2 times, most recently from 45281b6 to af7ad7e Compare April 16, 2025 07:49
@johnpoth johnpoth changed the title CAMEL-21945 camel-jbang: add LSP to Nano editor CAMEL-21945 camel-jbang: add edit plugin Apr 16, 2025
@johnpoth
Copy link
Member Author

@davsclaus thanks for the review! All good on my side

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

Successfully merging this pull request may close these issues.

3 participants