meraymond2 / idris-vscode

Idris front-end for VS Code
MIT License
59 stars 10 forks source link

RFC: borrow TM grammars to layer under semantic highlighting #5

Closed dustypomerleau closed 4 years ago

dustypomerleau commented 4 years ago

Thanks so much for working on this extension.

I am currently using your extension with the syntaxes from vscode-idris, which is working well. I know you have plans for semantic highlighting, but my experience with semantic highlighting has been that it often still needs a regex-based grammar to rely on for operators, punctuation, etc.

Perhaps you are planning to re-implement the regex-based grammars from scratch, but if you're interested in borrowing, the diff can be seen in this commit: https://github.com/dustypomerleau/idris-vscode/commit/02ff35d6d22dc91173dcfe6bb21e548ef0daedc5

dustypomerleau commented 4 years ago

Apologies, I should not have changed the path to the config file. Fixed with commit https://github.com/dustypomerleau/idris-vscode/commit/f7d6526dc0b123a9dcebba44e968fcd7a5dbcf13.

meraymond2 commented 4 years ago

Hey, thanks for the issue :slightly_smiling_face:.

I agree that semantic highlighting will only be a supplement to regex-based highlighting. I doubt there's much benefit in trying to recreate those rules from scratch — that time would be better spent trying to get the semantic highlighting to work.

I had a quick look at the Atom grammar rules for comparison, and it turns out the vscode-idris rules are ported from the Atom plugin anyway, so I'm happy to borrow them too. I'll try to get a PR and a new version out with the improved grammar this week.

dustypomerleau commented 4 years ago

Thanks for spinning up the PR so quickly. I'm really looking forward to this hitting Marketplace. I've tweaked my Yarra Valley theme to work with these scopes.

meraymond2 commented 4 years ago

It should be up now :+1:

dustypomerleau commented 4 years ago

Fantastic, thanks!