Open gpaul opened 3 years ago
Something like:
customLanguages: [
["Thrift", "", ".thrift",
{ "sourceCode": [
{"type": "cLine"},
{"type": "line", args: ["#"]},
{"type": "cBlock"},
]}
}
]
Indeed, this also makes basic things difficult, such as my use of Flow (https://flow.org/) instead of JavaScript so /* */
comments do not get wrapped correctly.
Hack is another language that is not listed in https://github.com/stkb/Rewrap/blob/c62907ddb633e55a49b0df32a4a36381ac70ef02/core/Parsing.Documents.fs
The list of supported languages is specified in Parsing.Documents.fs and via a simple (and very elegant, I must say) "parser" DSL.
There is a small set of predefined combinators (cLine, cBlock, etc). It would be extremely useful to be able to define one's own language using the vscode extension settings for this extension. In particular, it makes playing around with new languages simpler, without having to install the toolchain, compiling the extension locally, verifying that it works, and then upstreaming language support in a pull request.
Please consider exposing the DSL as JSON in the extension settings.