What happened?
Spring Boot property completions in .properties files are re-ranked against only the text after the last dot. For example, at server.p, Zed uses p as its local fuzzy query because the Properties language configuration does not declare . as a completion_query_character.
This can override the language server's deliberate sortText ranking. In a captured Spring Tools 5.2.0 completion response for server.p:
server.port was response item 0 with sortText: "00000".
server.ssl.key-password was item 6 with sortText: "00006".
- deprecated
server.max-http-post-size was item 119 with sortText: "00119" and tags: [1].
The visible Zed menu instead began with server.ssl.key-password, deprecated server.max-http-post-size, and several Tomcat max-part properties. server.port was not in the visible beginning.
Reproduction
- Open a Spring Boot project's
application.properties with Spring Tools completion available.
- Type
server.p and trigger completion.
- Compare the visible ordering with the
textDocument/completion response's sortText values.
Source-backed cause
The current Properties config has no completion query characters:
name = "Properties"
grammar = "properties"
path_suffixes = ["properties"]
line_comments = ["# "]
brackets = [{ start = "[", end = "]", close = true, newline = true }]
Zed's completion query is the surrounding word under this language configuration, so . is punctuation and the query at server.p becomes p. Zed then ranks fuzzy score and match positions before LSP sortText.
I reproduced the sorter behavior on current zed-industries/zed main (2118a7c53a843b791adff6c21b0a4ca0de8478b9) using the captured labels/filter text/sort text:
p: ["server.ssl.key-password", "server.max-http-post-size", "server.tomcat.max-part-count", "server.tomcat.max-parameter-count", "server.tomcat.max-part-header-size", "server.port"]
server.p: ["server.port", "server.ssl.key-password", "server.max-http-post-size", "server.tomcat.max-part-count", "server.tomcat.max-parameter-count", "server.tomcat.max-part-header-size"]
This shows that including the dot in the query restores server.port to first place for this captured subset without changing Zed's global sorter.
Expected behavior / candidate fix
Properties completion should retain the qualified key prefix while filtering. The narrow candidate is:
completion_query_characters = [".", "-"]
. is directly verified by the sorter reproduction above. - should be covered as part of the same change because Spring property segments commonly use kebab case, but it still needs runtime coverage for relaxed binding aliases before merge.
Environment
- Zed 1.11.3 (
952d712dac48a4af2c54fb22c82d82a9d69b72d4)
- Java extension 6.8.23 (
ddc13dafaf9ddc44ab46c9ff9768832aa98dfe11)
- Spring Tools 5.2.0.RELEASE (
18d1a975dbea4f9314fd736d0237bd9e23f243f9)
- macOS 26.5.2 arm64
- Temurin JDK 25.0.3
Full source attribution and bounded runtime observations are recorded in R015.
What happened?
Spring Boot property completions in
.propertiesfiles are re-ranked against only the text after the last dot. For example, atserver.p, Zed usespas its local fuzzy query because the Properties language configuration does not declare.as acompletion_query_character.This can override the language server's deliberate
sortTextranking. In a captured Spring Tools 5.2.0 completion response forserver.p:server.portwas response item 0 withsortText: "00000".server.ssl.key-passwordwas item 6 withsortText: "00006".server.max-http-post-sizewas item 119 withsortText: "00119"andtags: [1].The visible Zed menu instead began with
server.ssl.key-password, deprecatedserver.max-http-post-size, and several Tomcatmax-partproperties.server.portwas not in the visible beginning.Reproduction
application.propertieswith Spring Tools completion available.server.pand trigger completion.textDocument/completionresponse'ssortTextvalues.Source-backed cause
The current Properties config has no completion query characters:
Zed's completion query is the surrounding word under this language configuration, so
.is punctuation and the query atserver.pbecomesp. Zed then ranks fuzzy score and match positions before LSPsortText.I reproduced the sorter behavior on current
zed-industries/zedmain (2118a7c53a843b791adff6c21b0a4ca0de8478b9) using the captured labels/filter text/sort text:This shows that including the dot in the query restores
server.portto first place for this captured subset without changing Zed's global sorter.Expected behavior / candidate fix
Properties completion should retain the qualified key prefix while filtering. The narrow candidate is:
.is directly verified by the sorter reproduction above.-should be covered as part of the same change because Spring property segments commonly use kebab case, but it still needs runtime coverage for relaxed binding aliases before merge.Environment
952d712dac48a4af2c54fb22c82d82a9d69b72d4)ddc13dafaf9ddc44ab46c9ff9768832aa98dfe11)18d1a975dbea4f9314fd736d0237bd9e23f243f9)Full source attribution and bounded runtime observations are recorded in R015.