This commit is contained in:
Mitsuhiro Tanda
2017-09-12 09:31:05 +09:00
parent 56c0d91ee5
commit 1a5e786467
2 changed files with 8 additions and 8 deletions

View File

@@ -65,13 +65,13 @@ var PrometheusHighlightRules = function() {
regex : "\\s+"
} ],
"start-label-matcher" : [ {
token : "keyword",
token : "entity.name.tag",
regex : '[a-zA-Z_][a-zA-Z0-9_]*'
}, {
token : "keyword.operator",
regex : '=~|=|!~|!='
}, {
token : "string",
token : "string.quoted",
regex : '"[^"]*"|\'[^\']*\''
}, {
token : "punctuation.operator",
@@ -401,7 +401,7 @@ var PrometheusCompletions = function() {};
(function() {
this.getCompletions = function(state, session, pos, prefix, callback) {
var token = session.getTokenAt(pos.row, pos.column);
if (token.type === 'label.name' || token.type === 'label.value') {
if (token.type === 'entity.name.tag' || token.type === 'string.quoted') {
return callback(null, []);
}