Skip to content

Commit

Permalink
feat(semanticTokens): rm modifiers in checkCurrent
Browse files Browse the repository at this point in the history
modifiers are added to one token type, we can't list them directly
  • Loading branch information
fannheyward committed Mar 20, 2024
1 parent 097508c commit 429e89b
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/handler/semanticTokens/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,26 +207,15 @@ export default class SemanticTokens {
let legend = languages.getLegend(doc.textDocument) ?? languages.getLegend(doc.textDocument, true)
if (legend.tokenTypes.length) {
for (const t of [...new Set(legend.tokenTypes)]) {
let text = HLGROUP_PREFIX + toHighlightPart(t)
let text = HLGROUP_PREFIX + 'Type' + toHighlightPart(t)
hl.addTexts([{ text: '-', hlGroup: 'Comment' }, { text: ' ' }, { text, hlGroup: text }])
}
hl.addLine('')
} else {
hl.addLine('No token types supported', 'Comment')
hl.addLine('')
}
hl.addLine('Tokens modifiers that current Language Server supported:', headGroup)
hl.addLine('')
if (legend.tokenModifiers.length) {
for (const t of [...new Set(legend.tokenModifiers)]) {
let text = HLGROUP_PREFIX + toHighlightPart(t)
hl.addTexts([{ text: '-', hlGroup: 'Comment' }, { text: ' ' }, { text, hlGroup: text }])
}
hl.addLine('')
} else {
hl.addLine('No token modifiers exist', 'Comment')
hl.addLine('')
}
// modifiers are added to one token type, we can't list them directly
} catch (e) {
hl.addLine(toErrorText(e))
}
Expand Down

0 comments on commit 429e89b

Please sign in to comment.