meraymond2 / idris-vscode

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

Stop matching sooner in function signatures #48

Closed meraymond2 closed 3 years ago

meraymond2 commented 3 years ago

The function_signature regex captures too much, resulting in keywords being incorrectly scoped within a signature. I've simplified the end statement, so that this rule only affects the function name, which is I think the only necessary part of the rule.

See https://github.com/meraymond2/idris-vscode/issues/46 for screenshots. You can see that removing the scope "meta.function.type-signature.idris" from most of the elements on that line results in more tokens being highlighted, not fewer.