Skip to content

Commit

Permalink
Merge pull request #9 from Release-Candidate/add_markdown_syntax_high…
Browse files Browse the repository at this point in the history
…lighting

Add markdown syntax highlighting
  • Loading branch information
Release-Candidate authored Sep 13, 2023
2 parents 5d52dc9 + ad60b4f commit 5898cd3
Show file tree
Hide file tree
Showing 5 changed files with 381 additions and 344 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Chez Scheme REPL for Visual Studio Code Changelog

## Version 0.5.0 (2023-09-13)

Add support for syntax highlighting in Markdown code fences using the `scheme` language id.

### Internal Changes

- Update dependencies to new versions

## Version 0.4.2 (2023-07-22)

Version bump for the Open VSX registry only, a bug in the registry broke the publishing of updates.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

## Features and drawbacks

- Syntax highlighting.
- Syntax highlighting in source files and Markdown code blocks (using language identifier `scheme`).
- Hover with documentation of all Chez Scheme identifiers (works in comments too).
![Video of Documentation on Hover](./images/hover_documentation.gif)
- Autocompletion with documentation of all Chez Scheme and local identifiers (works in comments too).
Expand Down
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vscode-scheme-repl",
"displayName": "Chez Scheme REPL",
"version": "0.4.2",
"version": "0.5.0",
"preview": false,
"publisher": "release-candidate",
"description": "Support for Chez Scheme: Highlighting, autocompletion, documentation on hover and syntax checks.",
Expand Down Expand Up @@ -77,7 +77,7 @@
}
},
{
"scopeName": "markdown.scheme.codeblock",
"scopeName": "source.markdown.codeblock.scheme",
"path": "./package_files/scheme.markdown.tmGrammar.json",
"injectTo": [
"text.html.markdown"
Expand Down Expand Up @@ -258,31 +258,31 @@
]
},
"devDependencies": {
"@types/chai": "^4.3.5",
"@types/chai": "^4.3.6",
"@types/glob": "^8.1.0",
"@types/jsdom": "^21.1.1",
"@types/jsdom": "^21.1.2",
"@types/mocha": "^10.0.1",
"@types/node": "^20.4.2",
"@types/node": "^20.6.0",
"@types/vscode": "1.65.0",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vscode/test-electron": "^2.3.3",
"@vscode/vsce": "^2.19.0",
"chai": "^4.3.7",
"del-cli": "^5.0.0",
"esbuild": "^0.18.13",
"eslint": "^8.45.0",
"@typescript-eslint/eslint-plugin": "^6.7.0",
"@typescript-eslint/parser": "^6.7.0",
"@vscode/test-electron": "^2.3.4",
"@vscode/vsce": "^2.21.0",
"chai": "^4.3.8",
"del-cli": "^5.1.0",
"esbuild": "^0.19.2",
"eslint": "^8.49.0",
"eslint-plugin-chai-friendly": "^0.7.2",
"eslint-plugin-jsdoc": "^46.4.4",
"eslint-plugin-jsdoc": "^46.6.0",
"eslint-plugin-mocha": "^10.1.0",
"glob": "^8.1.0",
"jsdom": "^22.1.0",
"mocha": "^10.2.0",
"ovsx": "^0.8.2",
"ovsx": "^0.8.3",
"source-map-support": "^0.5.21",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.1.6"
"typescript": "^5.2.2"
},
"vsce": {
"dependencies": true,
Expand Down
38 changes: 30 additions & 8 deletions package_files/scheme.markdown.tmGrammar.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,45 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"scopeName": "source.markdown.codeblock.scheme",
"fileTypes": [],
"injectionSelector": "L:text.html.markdown",
"patterns": [
{
"include": "#fenced_code_block_scheme"
"include": "#scheme-code-block"
}
],
"repository": {
"fenced_code_block_scheme": {
"begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(scheme)(\\s+[^`~]*)?$)",
"scheme-code-block": {
"begin": "(^|\\G)(\\s*)(\\`{3,}|~{3,})\\s*(?i:(scheme)(\\s+[^`~]*)?$)",
"name": "markup.fenced_code.block.markdown",
"end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
"contentName": "meta.embedded.block.scheme",
"beginCaptures": {
"3": {
"name": "punctuation.definition.markdown"
},
"4": {
"name": "fenced_code.block.language.markdown"
},
"5": {
"name": "fenced_code.block.language.attributes.markdown"
}
},
"endCaptures": {
"3": {
"name": "punctuation.definition.markdown"
}
},
"patterns": [
{
"include": "#source.scheme"
"begin": "(^|\\G)(\\s*)(.*)",
"while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)",
"contentName": "meta.embedded.block.scheme",
"patterns": [
{
"include": "source.scheme"
}
]
}
]
}
}
},
"scopeName": "source.markdown.codeblock.scheme"
}
Loading

0 comments on commit 5898cd3

Please sign in to comment.