vscode-nim icon indicating copy to clipboard operation
vscode-nim copied to clipboard

In latest dev nim: func is valid keyword that should be highlighted in the same way as proc

Open cooldome opened this issue 8 years ago • 7 comments

The following code now compiles in the latest devel nim. func was always reserved keyword in Nim and now it is actually used. Time to highlight it


func price(a,b: float): float =
  max(0, a - b)


cooldome avatar Sep 24 '17 21:09 cooldome

If it was reserved it should have been highlighted from the beginning, can you add highlighting for all the keywords, even if they're unused?

dom96 avatar Sep 25 '17 09:09 dom96

https://github.com/pragmagic/vscode-nim/pull/60

Yardanico avatar Sep 25 '17 10:09 Yardanico

@cooldome close? my pr was merged and vscode-nim was updated

Yardanico avatar Sep 27 '17 17:09 Yardanico

What about:

can you add highlighting for all the keywords, even if they're unused?

?

dom96 avatar Sep 27 '17 17:09 dom96

Some tests I've done(the list is taken from the Nim manual): Dark(Visual Studio) grafik Light(Visual Studio) grafik Dark+(default dark) grafik

Light+(default light) grafik It seems like all keyworlds are highlit, except using and concept EDIT: one image accidentally shot with another theme, which doesn't support a certain group of keywords(but it's a thirdparty one)

RSDuck avatar Sep 27 '17 18:09 RSDuck

proc, ptr and asm shouldn't need something afterwards to be highlighted, they are keywords in all contexts.

dom96 avatar Sep 27 '17 18:09 dom96

Currently looks like that image image image

Yardanico avatar Jan 10 '20 23:01 Yardanico