bungcip / better-toml

toml extension for vs code editor
75 stars 13 forks source link

Added support for TOML frontmatter syntax highlighting in markdown files #10

Closed marcobeltempo closed 6 years ago

marcobeltempo commented 6 years ago

Refrences: VSCode Issue#41650

I've added support for TOML frontmatter in Markdown files. A feature originally requested in vscode.

Steps to reproduce:

  1. Create a .md file
  2. add to the top line
    
    +++

+++

3. Insert TOML syntax
```toml
title = "TOML Example"

@bungcip I would like your feedback on this feature. You can test it out here https://github.com/marcobeltempo/vscode-fenced-toml

image

bungcip commented 6 years ago

Hi @marcobeltempo, I already test your https://github.com/marcobeltempo/vscode-fenced-toml. I think this is a good feature to add. In order to integrate this feature, I think you need to remove #illegal pattern in TOML.tmLanguage because those pattern will eat +++ token.

See my pull request for your example: https://github.com/marcobeltempo/vscode-fenced-toml/pull/1.

If you want to create PR to add this feature please clone it from 0.3 branch (https://github.com/bungcip/better-toml/tree/0.3). Current master branch is broken because i am still not finishing my toml parser library :(

Just remove #illegal in TOML.tmLanguage .YAML, then convert it to TOML.tmLanguage using tmLanguage extension (https://github.com/Togusa09/vscode-tmlanguage)

image

I happy to waiting your PR :)

marcobeltempo commented 6 years ago

@bungcip Thank you for taking the time to review it and submit a pr! I will be submitting a pull request to 0.3 branch shortly

marcobeltempo commented 6 years ago

@bungcip do you suggest keeping the code block rule separate in a codeblock.tmLanguage file or integrate it within the existing TOML.tmLanguage file?

bungcip commented 6 years ago

I think its better to separate it.

bungcip commented 6 years ago

new version of better-toml released with this feature.