getSemanticTokensFull method
Gets all semantic tokens for the document.
Returns a list of LspSemanticToken objects representing syntax tokens for highlighting.
Implementation
Future<List<LspSemanticToken>> getSemanticTokensFull(String filePath) async {
if (!capabilities.semanticHighlighting) {
return [];
}
final response = await _sendRequest(
method: 'textDocument/semanticTokens/full',
params: {
'textDocument': {'uri': _toFileUri(filePath)},
},
);
final tokens = response['result']?['data'];
if (tokens is! List) {
return [];
}
return _decodeSemanticTokens(tokens);
}