qsharp-compiler icon indicating copy to clipboard operation
qsharp-compiler copied to clipboard

Highlight "size" as a keyword in array literal context

Open tcNickolas opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. Q# Jupyter Notebooks don't highlight "size" as a keyword.

Describe the solution you'd like Highlight "size" as a keyword in the context of array literals: something like "a comma, optional whitespace, size, optional whitespace, equality sign" should highlight "size" as a keyword, but other contexts shouldn't.

let size = 123;
let xs = [size, size = 2]; // first size is a variable, second size is a "keyword"

tcNickolas avatar Apr 26 '22 19:04 tcNickolas

This is handled in our community project for developing the TextMate grammar.

Still work in progress but it already offers a lot of improvements over the basic grammar.

Bildschirmfoto 2022-07-01 um 16 38 23

filipw avatar Jul 01 '22 14:07 filipw