Add “Tree-sitter” badge

This commit is contained in:
simurai 2019-02-13 14:16:35 +09:00
parent cb27305550
commit 4c617cb9c8
2 changed files with 10 additions and 2 deletions

View File

@ -22,12 +22,16 @@ class GrammarListView {
if (grammar.constructor.name === "TreeSitterGrammar") {
console.log("TS", grammar)
// style here
const parser = document.createElement('span')
parser.classList.add('grammar-selector-parser', 'badge', 'badge-success')
parser.textContent = 'Tree-sitter'
div.appendChild(parser)
}
if (grammar.scopeName) {
const scopeName = document.createElement('scopeName')
scopeName.classList.add('key-binding') // It will be styled the same as the keybindings in the command palette
scopeName.classList.add('badge', 'badge-info')
scopeName.textContent = grammar.scopeName
div.appendChild(scopeName)
element.appendChild(div)

View File

@ -4,3 +4,7 @@
.grammar-status a:hover {
color: @text-color;
}
.grammar-selector-parser {
margin-right: @component-padding;
}