File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
packages/language-server/src/plugins/typescript/features Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import { LSAndTSDocResolver } from '../LSAndTSDocResolver';
1212import { convertToTextSpan } from '../utils' ;
1313import { isInGeneratedCode } from './utils' ;
1414import { internalHelpers } from 'svelte2tsx' ;
15+ import { TokenType } from '../../../lib/semanticToken/semanticTokenLegend' ;
1516
1617const CONTENT_LENGTH_LIMIT = 50000 ;
1718
@@ -133,10 +134,11 @@ export class SemanticTokensProviderImpl implements SemanticTokensProvider {
133134
134135 // Ensure components in the template get no semantic highlighting
135136 if (
136- ( classificationType === 0 ||
137- classificationType === 5 ||
138- classificationType === 7 ||
139- classificationType === 10 ) &&
137+ ( classificationType === TokenType . class ||
138+ classificationType === TokenType . type ||
139+ classificationType === TokenType . parameter ||
140+ classificationType === TokenType . variable ||
141+ classificationType === TokenType . function ) &&
140142 snapshot . svelteNodeAt ( startOffset ) ?. type === 'InlineComponent' &&
141143 ( document . getText ( ) . charCodeAt ( startOffset - 1 ) === /* < */ 60 ||
142144 document . getText ( ) . charCodeAt ( startOffset - 1 ) === /* / */ 47 )
You can’t perform that action at this time.
0 commit comments