Skip to content

Commit

Permalink
Investigate potential rst grammar to include as a built-in extension (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
alexr00 authored Mar 10, 2022
1 parent ced1b62 commit c2b5174
Show file tree
Hide file tree
Showing 9 changed files with 2,228 additions and 0 deletions.
2 changes: 2 additions & 0 deletions extensions/restructuredtext/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test/**
cgmanifest.json
17 changes: 17 additions & 0 deletions extensions/restructuredtext/cgmanifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"registrations": [
{
"component": {
"type": "git",
"git": {
"name": "trond-snekvik/vscode-rst",
"repositoryUrl": "https://github.com/trond-snekvik/vscode-rst",
"commitHash": "f0fe19ffde6509be52ad9267a57e1b3df665f072"
}
},
"license": "MIT",
"version": "1.5.1"
}
],
"version": 1
}
34 changes: 34 additions & 0 deletions extensions/restructuredtext/language-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"comments": {
"lineComment": ".."
},
"brackets": [
["(", ")"],
["<", ">"],
["[", "]"]
],
"surroundingPairs": [
["(", ")"],
["<", ">"],
["`", "`"],
["*", "*"],
["|", "|"],
["[", "]"]
],
"autoClosingPairs": [
{ "open": "(", "close": ")" },
{ "open": "<", "close": ">" },
{ "open": "'", "close": "'"},
{ "open": "`", "close": "`", "notIn": ["string"]},
{ "open": "\"", "close": "\""},
{ "open": "[", "close": "]"}
],
"autoCloseBefore": ":})>`\\n ",
"onEnterRules": [
{
"beforeText": "^\\s*\\.\\. *$|(?<!:)::(\\s|$)",
"action": { "indent": "indent" }
}
],
"wordPattern": "[\\w-]*\\w[\\w-]*"
}
39 changes: 39 additions & 0 deletions extensions/restructuredtext/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "restructuredtext",
"displayName": "%displayName%",
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": {
"vscode": "*"
},
"scripts": {
"update-grammar": "node ../node_modules/vscode-grammar-updater/bin trond-snekvik/vscode-rst syntaxes/rst.tmLanguage.json ./syntaxes/rst.tmLanguage.json"
},
"contributes": {
"languages": [
{
"id": "restructuredtext",
"aliases": [
"reStructuredText"
],
"configuration": "./language-configuration.json",
"extensions": [
".rst"
]
}
],
"grammars": [
{
"language": "restructuredtext",
"scopeName": "source.rst",
"path": "./syntaxes/rst.tmLanguage.json"
}
]
},
"repository": {
"type": "git",
"url": "https://github.com/microsoft/vscode.git"
}
}
4 changes: 4 additions & 0 deletions extensions/restructuredtext/package.nls.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"displayName": "reStructuredText Language Basics",
"description": "Provides syntax highlighting in reStructuredText files."
}
Loading

0 comments on commit c2b5174

Please sign in to comment.