SOUL icon indicating copy to clipboard operation
SOUL copied to clipboard

Syntax highlighting for SOUL & HEART in VSCode & Atom

Open nicochatzi opened this issue 4 years ago • 0 comments

Changes

  • Improve SOUL highlighting in VSCode:
    • Add numeric literals (i32, _i64, ...) and a couple missing types (stream, value)
    • Improved constant.numeric.* and checked with soul errors (and added octal).
    • Add highlighting that detects module, functions, enum|struct and using patterns.
    • Add a couple operators and moved a few storage types to more specific categories, i.e. storage.class and storage.modifier.
    • processor.* is considered a constant.
  • Add highlighting for HEART, same as SOUL some diffs:
    • Less complex literal notation, e.g. only L for integers.
    • Highlighting for function.
    • Highlight core functions, e.g. read, write.
    • Highlight state variables and blocks
  • Add some snippets for SOUL in VSCode.
  • Add packages for Atom for SOUL & HEART.
  • A few typos.

Soulpatch

Also, might be worth mentioning in tools/editors/vs_code_extension/README.md that you can associate a .soulpatch file to JSON to get highlighting by adding this to the file association setting in VSCode:

"files.associations": {
    "*.soulpatch": "json"
},

Note for porting to Atom

Both editors use regex pattern matching with TextMate grammar so porting is trivial. Basically just json2cson. Some patterns regarding bracket and parentheses detection were removed because they were interfering with other rules.

nicochatzi avatar May 23 '20 12:05 nicochatzi