mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SourceKit] Add a request to get the semantic tokens of a file
We need this request for semantic highlighting in LSP. Previously, we were getting the semantic tokens using a 0,0 edit after a document update notification but that will no longer be possible if we open the documents in syntactic only mode.
This commit is contained in:
@@ -397,6 +397,10 @@ UIdent SwiftLangSupport::getUIDForRefactoringKind(ide::RefactoringKind Kind){
|
||||
}
|
||||
}
|
||||
|
||||
UIdent SwiftSemanticToken::getUIdentForKind() {
|
||||
return SwiftLangSupport::getUIDForCodeCompletionDeclKind(Kind, IsRef);
|
||||
}
|
||||
|
||||
UIdent SwiftLangSupport::getUIDForCodeCompletionDeclKind(
|
||||
ide::CodeCompletionDeclKind Kind, bool IsRef) {
|
||||
if (IsRef) {
|
||||
|
||||
Reference in New Issue
Block a user