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';
12
12
import { convertToTextSpan } from '../utils' ;
13
13
import { isInGeneratedCode } from './utils' ;
14
14
import { internalHelpers } from 'svelte2tsx' ;
15
+ import { TokenType } from '../../../lib/semanticToken/semanticTokenLegend' ;
15
16
16
17
const CONTENT_LENGTH_LIMIT = 50000 ;
17
18
@@ -133,10 +134,11 @@ export class SemanticTokensProviderImpl implements SemanticTokensProvider {
133
134
134
135
// Ensure components in the template get no semantic highlighting
135
136
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 ) &&
140
142
snapshot . svelteNodeAt ( startOffset ) ?. type === 'InlineComponent' &&
141
143
( document . getText ( ) . charCodeAt ( startOffset - 1 ) === /* < */ 60 ||
142
144
document . getText ( ) . charCodeAt ( startOffset - 1 ) === /* / */ 47 )
You can’t perform that action at this time.
0 commit comments