Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions extension.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ authors = [
"Valentine Briese <valentinegb@icloud.com>",
"Samuser107 L.Longheval <samuser107@gmail.com>",
"Yury Abykhodau <abehodau@gmail.com>",
"Keys <70819367+keys-i@users.noreply.github.com>"
Copy link
Collaborator

Choose a reason for hiding this comment

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

We are not actually updating this field. We should consider to change it into a more inclusive Java repo contributors, especially because by now, if everyone who has ever contributed added their name this list would be very long.

Copy link
Author

@keys-i keys-i Dec 22, 2025

Choose a reason for hiding this comment

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

Agreed, since we’re not maintaining this field and an exhaustive list would grow indefinitely, I think we should make it inclusive and low-maintenance. Something like authors = ["The <Repo/Project> contributors"] (e.g., “The Deno authors”) works well and still gives credit broadly, while GitHub’s contributor history remains the source of truth for the full list.

]
description = "Java support."
repository = "https://github.com/zed-extensions/java"
snippets = "./snippets/java.json"
Copy link
Collaborator

Choose a reason for hiding this comment

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

How are other snippets (groovy, kotlin, xml) linked?

Copy link
Author

@keys-i keys-i Dec 22, 2025

Choose a reason for hiding this comment

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

They aren’t linked via the snippets field, I can only point snippets at a single JSON file because it doesn’t accept a list of paths. So it’s effectively snippets = "path" (one file only), not something like multiple snippet files.

Copy link
Contributor

Choose a reason for hiding this comment

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

Would that help here? I was bothered by that also a bit and could look into making this accept multiple paths finally

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, I think that would help here.

If we can accept multiple snippet paths (or multiple packs) instead of forcing everything through a single JSON, it becomes much easier to keep “typed” vs “untyped / vendor” sources separated and avoid Unknown poisoning everything. I was bothered by that too.

I’d genuinely love to help you make it multi-path and get it working end to end. If you can point me at where the config gets parsed and where the snippet loader resolves snippets = "path", I can take a look and put up a PR to support something like:

  • snippets = ["path1", "path2", ...] (or)
  • snippets_paths = [...]

and then merge the loaded snippets deterministically (with clear precedence rules). Happy to do the legwork and iterate with you on the design.


[grammars.java]
repository = "https://github.com/tree-sitter/tree-sitter-java"
Expand Down
53 changes: 53 additions & 0 deletions snippets/groovy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"Gradle (Groovy): Java library skeleton": {
"prefix": "gjava",
"body": [
"plugins {",
" id 'java-library'",
"}",
"",
"group = '${1:com.example}'",
"version = '${2:0.1.0}'",
"",
"repositories {",
" mavenCentral()",
"}",
"",
"dependencies {",
" testImplementation 'org.junit.jupiter:junit-jupiter:${3:5.10.2}'",
" testImplementation 'org.mockito:mockito-core:${4:5.12.0}'",
" testImplementation 'org.assertj:assertj-core:${5:3.26.3}'",
"}",
"",
"test {",
" useJUnitPlatform()",
"}",
""
],
"description": "Gradle Groovy Java project template with JUnit/Mockito/AssertJ."
},
"Gradle (Groovy): Spring Boot skeleton": {
"prefix": "gspring",
"body": [
"plugins {",
" id 'java'",
" id 'org.springframework.boot' version '${1:3.3.5}'",
" id 'io.spring.dependency-management' version '${2:1.1.6}'",
"}",
"",
"group = '${3:com.example}'",
"version = '${4:0.1.0}'",
"",
"repositories {",
" mavenCentral()",
"}",
"",
"dependencies {",
" implementation 'org.springframework.boot:spring-boot-starter-web'",
" testImplementation 'org.springframework.boot:spring-boot-starter-test'",
"}",
""
],
"description": "Gradle Groovy Spring Boot template."
}
}
Loading