Define language configurations as extensions of others

This commit is contained in:
Jerome Lelong 2021-12-24 12:37:39 +01:00
parent 00db24e00d
commit 0872946ac8
4 changed files with 42 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# Grammars and language configurations # Grammars and language configuration Files
The following grammar files are retrieved from https://github.com/jlelong/vscode-latex-basics and are updated by the script `../dev/update-grammar.js` The following grammar files are retrieved from https://github.com/jlelong/vscode-latex-basics and are updated by the script `../dev/update-grammar.js`
@ -7,3 +7,10 @@ The following grammar files are retrieved from https://github.com/jlelong/vscode
- `TeX.tmLanguage.json` - `TeX.tmLanguage.json`
- `cpp-grammar-bailout.tmLanguage.json` - `cpp-grammar-bailout.tmLanguage.json`
- `markdown-latex-combined.tmLanguage.json` - `markdown-latex-combined.tmLanguage.json`
The following language configuration files are built from the corresponding file in `data/` using the script `../dev/update-language.js``
- `latex-cpp-embedded-language-configuration.json`
- `latex-language-configuration.json`
- `latex3-language-configuration.json`
- `markdown-latex-combined-language-configuration.json`

View File

@ -29,6 +29,7 @@
["[", "]"], ["[", "]"],
["(", ")"], ["(", ")"],
["`", "'"] ["`", "'"]
] ],
"wordPattern": "(__)|(\\*\\*)|(\\.\\.\\.)|([^\\s`'\"~_!?|$#@%^&*\\-=+;:,.<>(){}[\\]\\\\\\/]{2,})"
} }
} }

View File

@ -1,5 +1,5 @@
{ {
"extends": "https://raw.githubusercontent.com/jlelong/vscode-latex-basics/main/languages/latex-language-configuration.json", "extends": "../latex-language-configuration.json",
"overrides": { "overrides": {
"wordPattern": "(__)|(\\*\\*)|(\\.\\.\\.)|([^\\s`'\"~_!?|$#@%^&*\\-=+;:,.<>(){}[\\]\\\\\\/]{2,})" "wordPattern": "(__)|(\\*\\*)|(\\.\\.\\.)|([^\\s`'\"~_!?|$#@%^&*\\-=+;:,.<>(){}[\\]\\\\\\/]{2,})"

View File

@ -1,3 +1,33 @@
{ {
"extends": "https://github.com/jlelong/vscode-latex-basics/blob/main/languages/markdown-latex-combined-language-configuration.json" "extends": "https://raw.githubusercontent.com/jlelong/vscode-latex-basics/main/languages/markdown-latex-combined-language-configuration.json",
"overrides": {
"autoClosingPairs": [
["\\begin{", ""],
["\\left(", ""],
["\\left[", ""],
["\\left{", ""],
["\\bigl(", ""],
["\\bigl[", ""],
["\\bigl{", ""],
["\\Bigl(", ""],
["\\Bigl[", ""],
["\\Bigl{", ""],
["\\biggl(", ""],
["\\biggl[", ""],
["\\biggl{", ""],
["\\Biggl(", ""],
["\\Biggl[", ""],
["\\Biggl{", ""],
["\\(", ""],
["\\[", ""],
["\\{", ""],
["@(", ""],
["@[", ""],
["@{", ""],
["{", "}"],
["[", "]"],
["(", ")"]
]
}
} }