Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions lsp-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -832,8 +832,12 @@ directory")
("textDocument/semanticTokensFull"
:check-command (lambda (workspace)
(with-lsp-workspace workspace
(lsp-get (lsp--capability :semanticTokensProvider)
:full))))
(lsp-get (lsp--capability :semanticTokensProvider) :full))))
("textDocument/semanticTokensFull/Delta"
:check-command (lambda (workspace)
(with-lsp-workspace workspace
(let ((capFull (lsp-get (lsp--capability :semanticTokensProvider) :full)))
(and (not (booleanp capFull)) (lsp-get capFull :delta))))))
("textDocument/semanticTokensRangeProvider"
:check-command (lambda (workspace)
(with-lsp-workspace workspace
Expand Down Expand Up @@ -3335,7 +3339,7 @@ disappearing, unset all the variables related to it."
,@(when lsp-enable-file-watchers '((didChangeWatchedFiles . ((dynamicRegistration . t)))))
(workspaceFolders . t)
(configuration . t)
,@(when lsp-semantic-tokens-enable '((semanticTokens . ((refreshSupport . :json-false)))))
,@(when lsp-semantic-tokens-enable '((semanticTokens . ((refreshSupport . t)))))
,@(when lsp-lens-enable '((codeLens . ((refreshSupport . :json-false)))))
(fileOperations . ((didCreate . :json-false)
(willCreate . :json-false)
Expand Down Expand Up @@ -6033,7 +6037,6 @@ textDocument/didOpen for the new file."
(defconst lsp--default-notification-handlers
(ht ("window/showMessage" #'lsp--window-show-message)
("window/logMessage" #'lsp--window-log-message)
("workspace/semanticTokens/refresh" #'ignore)
("textDocument/publishDiagnostics" #'lsp--on-diagnostics)
("textDocument/diagnosticsEnd" #'ignore)
("textDocument/diagnosticsBegin" #'ignore)
Expand Down Expand Up @@ -6157,6 +6160,11 @@ WORKSPACE is the active workspace."
((equal method "window/workDoneProgress/create")
nil ;; no specific reply, no processing required
)
((equal method "workspace/semanticTokens/refresh")
(when (and lsp-semantic-tokens-enable
(fboundp 'lsp--semantic-tokens-on-refresh))
(lsp--semantic-tokens-on-refresh))
nil)
(t (lsp-warn "Unknown request method: %s" method) nil))))
;; Send response to the server.
(unless (eq response 'delay-response)
Expand Down
6 changes: 5 additions & 1 deletion lsp-protocol.el
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,11 @@ See `-let' for a description of the destructuring mechanism."
(WorkDoneProgressOptions nil (:workDoneProgress))
(SemanticTokensOptions (:legend) (:rangeProvider :documentProvider))
(SemanticTokensLegend (:tokenTypes :tokenModifiers))
(SematicTokensPartialResult (:data) nil))
(SemanticTokensResult (:resultId) (:data))
(SemanticTokensPartialResult nil (:data))
(SemanticTokensEdit (:start :deleteCount) (:data))
(SemanticTokensDelta (:resultId) (:edits))
(SemanticTokensDeltaPartialResult nil (:edits)))

(lsp-interface (v1:ProgressParams (:id :title) (:message :percentage :done)))

Expand Down
Loading