From 479e4bfc3a62c1573105601496c54f3342000718 Mon Sep 17 00:00:00 2001 From: Yudai NAKATA Date: Sat, 3 Feb 2018 12:13:53 +0900 Subject: [PATCH] Fix disabled snippet autocompletions in math mode --- grammars/latex.cson | 16 ++++++++-------- grammars/tex.cson | 12 ++++++------ snippets/language-latex.cson | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/grammars/latex.cson b/grammars/latex.cson index 16123f0..a0f93a7 100644 --- a/grammars/latex.cson +++ b/grammars/latex.cson @@ -1430,7 +1430,7 @@ 'name': 'variable.parameter.function.latex' '5': 'name': 'punctuation.definition.arguments.end.latex' - 'contentName': 'string.other.math.block.environment.latex' + 'contentName': 'markup.other.math.block.environment.latex' 'end': '''(?x) (?:\\s*) ((\\\\)end) @@ -1465,7 +1465,7 @@ 'name': 'variable.parameter.function.latex' '8': 'name': 'punctuation.definition.arguments.end.latex' - 'contentName': 'string.other.math.block.environment.latex' + 'contentName': 'markup.other.math.block.environment.latex' 'end': '(?:\\s*)((\\\\)end)(\\{)(\\4)(\\})' 'name': 'meta.function.environment.math.latex' 'patterns': [ @@ -1493,7 +1493,7 @@ 'name': 'variable.parameter.latex' '8': 'name': 'punctuation.definition.arguments.optional.end.latex' - 'contentName': 'string.other.math.block.environment.latex' + 'contentName': 'markup.other.math.block.environment.latex' 'end': '(?:\\s*)((\\\\)end)(\\{)(\\4)(\\})' 'name': 'meta.function.environment.math.latex' 'patterns': [ @@ -1515,7 +1515,7 @@ 'name': 'invalid.deprecated.environment.eqnarray.latex' '5': 'name': 'punctuation.definition.arguments.end.latex' - 'contentName': 'string.other.math.block.environment.latex' + 'contentName': 'markup.other.math.block.environment.latex' 'end': '(?:\\s*)((\\\\)end)(\\{)(\\4)(\\})' 'name': 'meta.function.environment.math.latex' 'patterns': [ @@ -1958,12 +1958,12 @@ 'begin': '\\\\\\(' 'beginCaptures': '0': - 'name': 'punctuation.definition.string.begin.latex' + 'name': 'punctuation.definition.markup.begin.latex' 'end': '\\\\\\)' 'endCaptures': '0': 'name': 'punctuation.definition.string.end.latex' - 'name': 'string.other.math.latex' + 'name': 'markup.other.math.inline.latex' 'patterns': [ { 'include': '$base' @@ -1974,12 +1974,12 @@ 'begin': '\\\\\\[' 'beginCaptures': '0': - 'name': 'punctuation.definition.string.begin.latex' + 'name': 'punctuation.definition.markup.begin.latex' 'end': '\\\\\\]' 'endCaptures': '0': 'name': 'punctuation.definition.string.end.latex' - 'name': 'string.other.math.latex' + 'name': 'markup.other.math.display.latex' 'patterns': [ { 'include': '$base' diff --git a/grammars/tex.cson b/grammars/tex.cson index 6c5feeb..b9a539e 100644 --- a/grammars/tex.cson +++ b/grammars/tex.cson @@ -91,12 +91,12 @@ 'begin': '\\$\\$' 'beginCaptures': '0': - 'name': 'punctuation.definition.string.begin.tex' + 'name': 'punctuation.definition.markup.begin.tex' 'end': '\\$\\$' 'endCaptures': '0': - 'name': 'punctuation.definition.string.end.tex' - 'name': 'string.other.math.block.tex' + 'name': 'punctuation.definition.markup.end.tex' + 'name': 'markup.other.math.display.tex' 'patterns': [ { 'include': '#math' @@ -114,12 +114,12 @@ 'begin': '\\$' 'beginCaptures': '0': - 'name': 'punctuation.definition.string.begin.tex' + 'name': 'punctuation.definition.markup.begin.tex' 'end': '\\$' 'endCaptures': '0': - 'name': 'punctuation.definition.string.end.tex' - 'name': 'string.other.math.tex' + 'name': 'punctuation.definition.markup.end.tex' + 'name': 'markup.other.math.inline.tex' 'patterns': [ { 'match': '\\\\\\$' diff --git a/snippets/language-latex.cson b/snippets/language-latex.cson index e463941..9e509b2 100644 --- a/snippets/language-latex.cson +++ b/snippets/language-latex.cson @@ -68,7 +68,7 @@ 'body': '$$1$$0' # math, taken from https://github.com/SublimeText/LaTeXTools/blob/master/LaTeX%20math.sublime-completions -'.text.tex.latex .string.other.math': +'.text.tex.latex .markup.other.math': 'math italic': 'prefix': 'it' 'body': '\\\\mathit{$1}$0'