feat: register range semantic tokens provider
This commit is contained in:
parent
4b662b57e4
commit
61578a5074
1 changed files with 7 additions and 2 deletions
|
@ -109,10 +109,15 @@ export default class LanguageProvider {
|
||||||
if (this.client.apiVersion.gte(API.v380) && typeof languages['registerCallHierarchyProvider'] === 'function') {
|
if (this.client.apiVersion.gte(API.v380) && typeof languages['registerCallHierarchyProvider'] === 'function') {
|
||||||
this._register(languages.registerCallHierarchyProvider(languageIds, new CallHierarchyProvider(client)))
|
this._register(languages.registerCallHierarchyProvider(languageIds, new CallHierarchyProvider(client)))
|
||||||
}
|
}
|
||||||
if (this.client.apiVersion.gte(API.v370) && typeof languages['registerDocumentSemanticTokensProvider'] === 'function') {
|
if (this.client.apiVersion.gte(API.v370)) {
|
||||||
const provider = new SemanticTokensProvider(client)
|
const provider = new SemanticTokensProvider(client)
|
||||||
|
if (typeof languages['registerDocumentSemanticTokensProvider'] === 'function') {
|
||||||
this._register(languages.registerDocumentSemanticTokensProvider(languageIds, provider, provider.getLegend()))
|
this._register(languages.registerDocumentSemanticTokensProvider(languageIds, provider, provider.getLegend()))
|
||||||
}
|
}
|
||||||
|
if (typeof languages['registerDocumentRangeSemanticTokensProvider'] === 'function') {
|
||||||
|
this._register(languages.registerDocumentRangeSemanticTokensProvider(languageIds, provider, provider.getLegend()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let { fileConfigurationManager } = this
|
let { fileConfigurationManager } = this
|
||||||
let conf = fileConfigurationManager.getLanguageConfiguration(this.id)
|
let conf = fileConfigurationManager.getLanguageConfiguration(this.id)
|
||||||
|
|
Loading…
Reference in a new issue