getSemanticTokensFull method

Future<List<LspSemanticToken>> getSemanticTokensFull()

Gets all semantic tokens for the document.

Returns a list of LspSemanticToken objects representing syntax tokens for highlighting.

Implementation

Future<List<LspSemanticToken>> getSemanticTokensFull() async {
  final response = await _sendRequest(
    method: 'textDocument/semanticTokens/full',
    params: {
      'textDocument': {'uri': Uri.file(filePath).toString()},
    },
  );

  final tokens = response['result']?['data'];
  if (tokens is! List) return [];
  return _decodeSemanticTokens(tokens);
}