https://github.com/maelvls/madoko-vscode
Syntax support for the Madoko language
https://github.com/maelvls/madoko-vscode
koka language madoko
Last synced: 3 months ago
JSON representation
Syntax support for the Madoko language
- Host: GitHub
- URL: https://github.com/maelvls/madoko-vscode
- Owner: maelvls
- Created: 2017-07-01T09:10:58.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-01T14:46:53.000Z (over 7 years ago)
- Last Synced: 2025-01-24T19:44:16.160Z (4 months ago)
- Topics: koka, language, madoko
- Homepage: https://www.madoko.net
- Size: 39.1 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Madoko for VSCode
This extension brings syntax coloring support for the [Madoko] language
([Github]) designed by Daan Leijen as a showcase for his new [Koka] language.Madoko is a nice markdown dialect as well as a great editor "à la Sharelatex".
[Madoko]: https://www.madoko.net
[Github]: https://github.com/koka-lang/madoko
[Koka]: https://github.com/koka-lang/kokaThis extension is basically a copy-paste of the `.tmLanguage` files that
are available in the madoko repository. The file extensions are `.mdk` and
`.madoko`.Screenshot showing the syntax highlighting:

# Tips
If you want to "rewrap to 80 characters" manually (`⌥Q` in madoko.net), you
can install the extension **Rewrap** and map the `rewrap.rewrapComment`
command to `⌥Q`:
```json
{
"command": "rewrap.rewrapComment",
"key": "alt+q",
"when": "editorTextFocus"
}
```
For table re-wrapping and auto-arranging, I use **Table Formatter** and map
the table re-wrapping to `⇧⌥Q`:
```json
{
"command": "extension.table.formatCurrent",
"key": "shift+alt+q",
"when": "editorTextFocus"
}
```# If you want to improve the grammar
- clone the project into your `~/.vscode/extensions` (or
`~/.vscode-insiders/extensions`) folder:git clone [email protected]:maelvalais/madoko-vscode.git ~/.vscode/extensions/madoko-vscode
- open it in vscode
code ~/.vscode/extensions/madoko-vscode
In order to see the changes makde to `syntaxes/madoko.json` in your `.mdk`,
you must reload vscode with ⇧⌘P + `Reload Windows`.I also recommend to run ⇧⌘P + `Inspect TM scopes` in order to inspect in your
`.mdk` in what scope each character is. This will help you finding where
the faulty rule is in `syntaxes/madoko.json`.For example, take this wrong highlighting on `* __BOLD__`; I first open
`Inspect TM scopes` to inspect the tmLanguage scopes:
Then, I search inside the `syntaxes/madoko.json` and look for the scope
`keyword` and `markup.heading.madoko`:
Note that usually, tmLanguage scopes are specific to each rule so that we
can find the faulty rule easily. But here, the tmLanguage file (I did not
write it) has been written _à la CSS_ and the scopes are not really helping...# Change Log
## 0.0.4
- `$...$` can now span multiple lines
- `$$...$$` and `$...$` are now highlighted as in the LaTex Workshop extension
- the `~ Math` block wasn't highlighted as latex code## 0.0.3
- turn word wrap on by default for the Madoko language, similarly
to Markdown (contributed by kvn-s)## 0.0.2
- fixed coloring of bib citations. Example: `[@ref; @ref, p. 32]`.
Note that 'p. 32' is not colored yet.
- fixed coloring of entities (the madoko variables) containing
`-` or `_`. Example: `&my-variable;`## 0.0.1
- Initial release.