File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 156
156
outStream* : FileStream
157
157
stdinContext* : ptr ReadStdinContext
158
158
projectErrors* : seq [ProjectError]
159
+ lastStatusSent: JsonNode
159
160
# List of errors (crashes) nimsuggest has had since the lsp session started
160
161
161
162
Certainty* = enum
@@ -362,9 +363,11 @@ proc getLspStatus*(ls: LanguageServer): NimLangServerStatus {.raises: [].} =
362
363
result .projectErrors = ls.projectErrors
363
364
364
365
proc sendStatusChanged* (ls: LanguageServer) {.raises: [].} =
365
- let status: NimLangServerStatus = ls.getLspStatus()
366
- ls.notify(" extension/statusUpdate" , %* status)
367
-
366
+ let status = %* ls.getLspStatus()
367
+ if status != ls.lastStatusSent:
368
+ ls.notify(" extension/statusUpdate" , status)
369
+ ls.lastStatusSent = status
370
+
368
371
proc addProjectFileToPendingRequest* (
369
372
ls: LanguageServer, id: uint , uri: string
370
373
) {.async.} =
You can’t perform that action at this time.
0 commit comments