|
7 | 7 | [clojure.string :as string]
|
8 | 8 | [com.github.clojure-lsp.intellij.client :as lsp-client]
|
9 | 9 | [com.github.clojure-lsp.intellij.config :as config]
|
| 10 | + [com.github.clojure-lsp.intellij.db :as db] |
10 | 11 | [com.github.clojure-lsp.intellij.editor :as editor]
|
11 | 12 | [com.github.clojure-lsp.intellij.server :as server]
|
12 | 13 | [com.github.clojure-lsp.intellij.settings :as settings]
|
|
16 | 17 | [com.intellij.openapi.progress ProgressIndicator]
|
17 | 18 | [com.intellij.openapi.project Project]
|
18 | 19 | [com.intellij.openapi.vfs LocalFileSystem VirtualFile]
|
19 |
| - [com.redhat.devtools.lsp4ij LSPIJUtils] |
| 20 | + [com.redhat.devtools.lsp4ij LSPIJUtils ServerStatus] |
20 | 21 | [com.redhat.devtools.lsp4ij.client LanguageClientImpl]
|
21 | 22 | [com.redhat.devtools.lsp4ij.client.features LSPClientFeatures LSPProgressFeature]
|
22 | 23 | [com.redhat.devtools.lsp4ij.server OSProcessStreamConnectionProvider]
|
|
111 | 112 | (.setInitializationOptions params {"dependency-scheme" "jar"
|
112 | 113 | "hover" {"arity-on-same-line?" true}}))
|
113 | 114 | (findFileByUri ^VirtualFile [_ ^String uri]
|
114 |
| - (find-file-by-uri uri))) |
| 115 | + (find-file-by-uri uri)) |
| 116 | + (keepServerAlive [_] true) |
| 117 | + (handleServerStatusChanged [^LSPClientFeatures this ^ServerStatus server-status] |
| 118 | + (let [status (keyword (.toString server-status))] |
| 119 | + (db/assoc-in (.getProject this) [:status] status) |
| 120 | + (run! #(% status) (db/get-in (.getProject this) [:on-status-changed-fns]))))) |
115 | 121 | (.setProgressFeature (proxy+ [] LSPProgressFeature
|
116 | 122 | (updateMessage [_ ^String message ^ProgressIndicator indicator]
|
117 | 123 | (.setText indicator (str "LSP: " message)))))))
|
0 commit comments