mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-11 11:15:24 +03:00
Add “Tree-sitter” badge
This commit is contained in:
parent
cb27305550
commit
4c617cb9c8
@ -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)
|
||||
|
@ -4,3 +4,7 @@
|
||||
.grammar-status a:hover {
|
||||
color: @text-color;
|
||||
}
|
||||
|
||||
.grammar-selector-parser {
|
||||
margin-right: @component-padding;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user