Skip to content

Commit

Permalink
don't semantic-highlight components at all
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm committed Sep 26, 2024
1 parent 1ad1e40 commit 6174dd6
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,17 @@ export class SemanticTokensProviderImpl implements SemanticTokensProvider {
const startOffset = document.offsetAt(startPosition);
const endOffset = document.offsetAt(endPosition);

// Ensure components are highlighted consistently as types
// Ensure components in the template get no semantic highlighting
if (
(encodedClassification === /* const variant 1 */ 2056 ||
encodedClassification === /* const variant 2 */ 2088 ||
encodedClassification === /* function */ 2848) &&
(classificationType === 0 ||
classificationType === 5 ||
classificationType === 7 ||
classificationType === 10) &&
snapshot.svelteNodeAt(startOffset)?.type === 'InlineComponent' &&
(document.getText().charCodeAt(startOffset - 1) === /* < */ 60 ||
document.getText().charCodeAt(startOffset - 1) === /* / */ 47)
) {
classificationType = 5;
return;
}

return [
Expand Down

0 comments on commit 6174dd6

Please sign in to comment.