|
41 | 41 |
|
42 | 42 | (defvar lsp-java-boot--callback nil) |
43 | 43 |
|
| 44 | +(eval-when-compile |
| 45 | + (lsp-interface |
| 46 | + (boot:Lenses (:doc :codeLenses)))) |
| 47 | + |
44 | 48 | (defun lsp-java-boot--find-tools-jar () |
45 | 49 | "Calculate the path to tools.jar." |
46 | 50 | (let ((tools-jar (or lsp-java-boot-java-tools-jar |
|
54 | 58 | (with-lsp-workspace (lsp-find-workspace 'jdtls nil) |
55 | 59 | (lsp-request "workspace/executeCommand" |
56 | 60 | (list :command "sts.java.addClasspathListener" |
57 | | - :arguments (gethash "callbackCommandId" params)) |
| 61 | + :arguments (lsp-get params :callbackCommandId)) |
58 | 62 | :no-wait t))) |
59 | 63 |
|
60 | 64 | (defun lsp-java-boot--sts-add-classpath-listener (_workspace params) |
|
63 | 67 | (with-lsp-workspace (lsp-find-workspace 'jdtls nil) |
64 | 68 | (lsp-request "workspace/executeCommand" |
65 | 69 | (list :command "sts.java.addClasspathListener" |
66 | | - :arguments (gethash "callbackCommandId" params)) |
| 70 | + :arguments (lsp-get params :callbackCommandId)) |
67 | 71 | :no-wait t)))) |
68 | 72 |
|
69 | 73 | (defun lsp-java-boot--lens-backend (_ callback) |
@@ -99,19 +103,19 @@ Store CALLBACK to use it `sts/highlight'." |
99 | 103 | (defun lsp-java-boot--sts-hightlight (workspace params) |
100 | 104 | "WORKSPACE PARAMS." |
101 | 105 | (with-lsp-workspace workspace |
102 | | - (-let (((&hash "doc" (&hash "uri" "version") "codeLenses" code-lenses) params)) |
| 106 | + (-let (((&boot:Lenses :doc (&VersionedTextDocumentIdentifier :uri :version?) :code-lenses) params)) |
103 | 107 | (when-let (buf (find-buffer-visiting (lsp--uri-to-path uri))) |
104 | 108 | (with-current-buffer buf |
105 | 109 | (when (and lsp-java-boot--callback lsp-java-boot-lens-mode) |
106 | | - (funcall lsp-java-boot--callback code-lenses version))))))) |
| 110 | + (funcall lsp-java-boot--callback code-lenses version?))))))) |
107 | 111 |
|
108 | 112 | (defun lsp-java-boot--server-jar () |
109 | 113 | "Return the spring boot jar." |
110 | 114 | (or (-> lsp-java-server-install-dir |
111 | 115 | (expand-file-name) |
112 | 116 | (f-join "boot-server") |
113 | | - f-files |
114 | | - cl-first) |
| 117 | + (f-files) |
| 118 | + (cl-first)) |
115 | 119 | (lsp-log "Unable to find spring boot server jar."))) |
116 | 120 |
|
117 | 121 | (defun lsp-java-boot--ls-command (port) |
@@ -140,11 +144,6 @@ Store CALLBACK to use it `sts/highlight'." |
140 | 144 | ("sts/javadocHoverLink" #'lsp-java-boot--sts-javadoc-hover-link)) |
141 | 145 | :notification-handlers (ht ("sts/highlight" #'lsp-java-boot--sts-hightlight) |
142 | 146 | ("sts/progress" #'ignore)) |
143 | | - :initialized-fn (lambda (workspace) |
144 | | - (puthash |
145 | | - "triggerCharacters" |
146 | | - '("." "@" "#" "*") |
147 | | - (gethash "completionProvider" (lsp--workspace-server-capabilities workspace)))) |
148 | 147 | :multi-root t |
149 | 148 | :add-on? t |
150 | 149 | :server-id 'boot-ls |
|
0 commit comments