Skip to content

Add Java support #88

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

Merged
merged 1 commit into from
Jul 7, 2025
Merged

Add Java support #88

merged 1 commit into from
Jul 7, 2025

Conversation

lukejans
Copy link
Contributor

@lukejans lukejans commented Jul 5, 2025

This PR adds support for Java spell checking :)

The tree-sitter queries created in ./crates/codebook/src/queries/java.scm were built using the resources below:

I also created some tests which should cover most scenarios where spell checking is desirable and undesirable. Here are the paths to the files created from the project root:

  • ./crates/codebook/tests/test_java.rs
  • ./crates/codebook/tests/examples/example.java

I didn't test the example.java file because I didn't update the extension with the changes I made but I did test test_java.rs by running the following command:

$ cargo test -p codebook queries::tests::test_all_queries_are_valid

The test passed! If anyone sees any issues with the tests please go ahead and update them or leave a comment and I can change it!

@blopker
Copy link
Owner

blopker commented Jul 7, 2025

This is fantastic! Great query and excellent test cases. Thank you for doing this. I'll merge this once CI runs. I'll need to make an update to the Zed extension to add Java, but I'll get that out once this lands.

@blopker blopker merged commit 5b451a3 into blopker:main Jul 7, 2025
9 checks passed
@lukejans
Copy link
Contributor Author

lukejans commented Jul 7, 2025

Sure thing! Thanks a bunch for making it super easy for beginners to contribute!

@blopker
Copy link
Owner

blopker commented Jul 7, 2025

Great, I just released the new Language Server with Java support. It's going to be a little wonky until the Zed extension is updated as well, but waiting on Zed to merge: zed-industries/extensions#2975

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.

2 participants