You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "vscode-spring-boot.ls.start" command which starts the classpath
handshake between the editor and the Spring Boot LS is sent by the jdtls
extension, not by the Spring Boot LS itself. Where a client sends
"workspace/executeClientCommand", the handler resolves commands against
that same client's "commands" and the global table, so a per-client
registration on the "spring-boot" client is never consulted for it.
Move the command into the global vim.lsp.commands from a new
M.register_client_commands(), call it and M.init_lsp_commands() from
M.setup() so both exist before jdtls imports a Spring Boot project, and
drop the now-dead "commands" block from lsp/spring-boot.lua. Also expand
the comments explaining the split between per-client and global handlers.
--- Registers the commands a server asks the editor to run through
72
+
--- `workspace/executeClientCommand`.
73
+
---
74
+
--- These belong in the global |vim.lsp.commands| and not in the `spring-boot`
75
+
--- config's `commands`, because the one that matters here is sent by the *jdtls*
76
+
--- extension, once jdtls has imported a Spring Boot project — so it is
77
+
--- dispatched on the `jdtls` client, whose handler resolves commands against
78
+
--- that client and the global table only. A `commands` entry on the
79
+
--- `spring-boot` client is never consulted for it.
80
+
---
81
+
--- This is the start of the classpath handshake: the command makes the editor
82
+
--- ask the language server to listen for classpath changes
83
+
--- (`sts.vscode-spring-boot.enableClasspathListening`), and without it the
84
+
--- server never learns the project's classpath — no beans, no endpoints, no
85
+
--- `application.properties` / `.yml` properties.
86
+
--- see https://github.com/spring-projects/sts4/blob/cfd10f0b53be0bfe107ca91ae0ad3df3038b1af2/headless-services/jdt-ls-extension/org.springframework.tooling.jdt.ls.extension/src/org/springframework/tooling/jdt/ls/extension/JdtLsExtensionPlugin.java
0 commit comments