48 lines
60 KiB
JavaScript
48 lines
60 KiB
JavaScript
|
import tex from './tex.mjs';
|
||
|
import shellscript from './shellscript.mjs';
|
||
|
import css from './css.mjs';
|
||
|
import gnuplot from './gnuplot.mjs';
|
||
|
import haskell from './haskell.mjs';
|
||
|
import html from './html.mjs';
|
||
|
import java from './java.mjs';
|
||
|
import julia from './julia.mjs';
|
||
|
import javascript from './javascript.mjs';
|
||
|
import lua from './lua.mjs';
|
||
|
import python from './python.mjs';
|
||
|
import ruby from './ruby.mjs';
|
||
|
import rust from './rust.mjs';
|
||
|
import typescript from './typescript.mjs';
|
||
|
import xml from './xml.mjs';
|
||
|
import yaml from './yaml.mjs';
|
||
|
import scala from './scala.mjs';
|
||
|
import './r.mjs';
|
||
|
import './cpp.mjs';
|
||
|
import './cpp-macro.mjs';
|
||
|
import './glsl.mjs';
|
||
|
import './c.mjs';
|
||
|
import './sql.mjs';
|
||
|
|
||
|
const lang = Object.freeze({ "displayName": "LaTeX", "name": "latex", "patterns": [{ "comment": "This scope identifies partially typed commands such as `\\tab`. We use this to trigger \u201CCommand Completion\u201D only when it makes sense.", "match": "(?<=\\\\[\\w@]|\\\\[\\w@]{2}|\\\\[\\w@]{3}|\\\\[\\w@]{4}|\\\\[\\w@]{5}|\\\\[\\w@]{6})\\s", "name": "meta.space-after-command.latex" }, { "begin": "((\\\\)(?:usepackage|documentclass))\\b(?=\\[|\\{)", "beginCaptures": { "1": { "name": "keyword.control.preamble.latex" }, "2": { "name": "punctuation.definition.function.latex" } }, "end": "(?<=\\})", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.latex" } }, "name": "meta.preamble.latex", "patterns": [{ "include": "#multiline-optional-arg" }, { "begin": "((?:\\G|(?<=\\]))\\{)", "beginCaptures": { "0": { "name": "punctuation.definition.arguments.begin.latex" } }, "contentName": "support.class.latex", "end": "(\\})", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.latex" } }, "patterns": [{ "include": "$self" }] }] }, { "begin": "((\\\\)(?:include|input))(\\{)", "beginCaptures": { "1": { "name": "keyword.control.include.latex" }, "2": { "name": "punctuation.definition.function.latex" }, "3": { "name": "punctuation.definition.arguments.begin.latex" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.latex" } }, "name": "meta.include.latex", "patterns": [{ "include": "$self" }] }, { "begin": "((\\\\)((?:sub){0,2}section|(?:sub)?paragraph|chapter|part|addpart|addchap|addsec|minisec|frametitle)(?:\\*)?)((?:\\[[^\\[]*?\\]){0,2})(\\{)", "beginCaptures": { "1": { "name": "support.function.section.latex" }, "2": { "name": "punctuation.definition.function.latex" }, "4": { "patterns": [{ "include": "#optional-arg" }] }, "5": { "name": "punctuation.definition.arguments.begin.latex" } }, "comment": "this works OK with all kinds of crazy stuff as long as section is one line", "contentName": "entity.name.section.latex", "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.latex" } }, "name": "meta.function.section.$3.latex", "patterns": [{ "include": "text.tex#braces" }, { "include": "$self" }] }, { "begin": "((?:\\s*)\\\\begin\\{songs\\}\\{.*\\})", "captures": { "1": { "patterns": [{ "include": "#begin-env-tokenizer" }] } }, "contentName": "meta.data.environment.songs.latex", "end": "(\\\\end\\{songs\\}(?:\\s*\\n)?)", "name": "meta.function.environment.songs.latex", "patterns": [{ "begin": "\\\\\\[", "end": "\\]", "name": "meta.chord.block.latex support.class.chord.block.environment.latex", "patterns": [{ "include": "$self" }] }, { "match": "\\^", "name": "meta.chord.block.latex support.class.chord.block.environment.latex" }, { "include": "$self" }] }, { "begin": "(?:^\\s*)?\\\\begin\\{(lstlisting|minted|pyglist)\\}(?=\\[|\\{)", "captures": { "0": { "patterns": [{ "include": "#begin-env-tokenizer" }] } }, "end": "\\\\end\\{\\1\\}", "patterns": [{ "include": "#multiline-optional-arg-no-highlight" }, { "begin": "(?:\\G|(?<=\\]))(\\{)((?:asy|asymptote))(\\})", "beginCaptures": { "1": { "name": "punctuation.definition.arguments.begin.latex" }, "2": { "name": "variable.parameter.function.latex" }, "3": { "name": "punctuation.definition.arguments.end.latex" } }, "contentName": "source.asy", "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", "patterns": [{ "include": "source.asy" }] }, { "begin": "(?:\\G|(?<=\\]))(\\{)((?:bash))(\\})", "beginCaptures": { "1": { "name": "punctuation.definition.arguments.begin.latex" }, "2": { "name": "variable.parameter.function.latex" }, "3": { "name": "punctuation.definition.arguments.end.latex" } }, "contentName": "source.shell", "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", "patterns": [{ "include": "source.shell" }] }, { "begin": "(?:\\G|(?<=\\]))(\\{)((?:c|cpp))(\\})", "beginCaptures": { "1": { "name": "punctuation.definition.arguments.begin.latex" }, "2": { "name": "variable.parameter.function.latex" }, "3": { "name": "punctuation.definition.arguments.end.latex" } }, "co
|
||
|
var latex = [
|
||
|
...tex,
|
||
|
...shellscript,
|
||
|
...css,
|
||
|
...gnuplot,
|
||
|
...haskell,
|
||
|
...html,
|
||
|
...java,
|
||
|
...julia,
|
||
|
...javascript,
|
||
|
...lua,
|
||
|
...python,
|
||
|
...ruby,
|
||
|
...rust,
|
||
|
...typescript,
|
||
|
...xml,
|
||
|
...yaml,
|
||
|
...scala,
|
||
|
lang
|
||
|
];
|
||
|
|
||
|
export { latex as default };
|