File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,8 @@ export class CucumberLanguageServer {
170170 } )
171171 connection . languages . semanticTokens . on ( ( semanticTokenParams ) => {
172172 const doc = documents . get ( semanticTokenParams . textDocument . uri )
173- if ( ! doc ) return { data : [ ] }
173+ const isGherkin = doc ?. languageId === 'gherkin' || doc ?. languageId === 'cucumber'
174+ if ( ! doc || ! isGherkin ) return { data : [ ] }
174175 const gherkinSource = doc . getText ( )
175176 return getGherkinSemanticTokens (
176177 gherkinSource ,
@@ -186,7 +187,8 @@ export class CucumberLanguageServer {
186187 if ( ! this . searchIndex ) return [ ]
187188
188189 const doc = documents . get ( params . textDocument . uri )
189- if ( ! doc ) return [ ]
190+ const isGherkin = doc ?. languageId === 'gherkin' || doc ?. languageId === 'cucumber'
191+ if ( ! doc || ! isGherkin ) return [ ]
190192 const gherkinSource = doc . getText ( )
191193 return getGherkinCompletionItems ( gherkinSource , params . position , this . searchIndex ) . slice ( )
192194 } )
You can’t perform that action at this time.
0 commit comments