Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting for SOUL & HEART in VSCode & Atom #28

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

nicochatzi
Copy link

@nicochatzi nicochatzi commented May 23, 2020

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 nicochatzi changed the title Add VSCode HEART syntax highlighting Syntax highlighting for SOUL & HEART in VSCode and Atom May 28, 2020
@nicochatzi nicochatzi changed the title Syntax highlighting for SOUL & HEART in VSCode and Atom Syntax highlighting for SOUL & HEART in VSCode & Atom May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant