pragmagic / vscode-nim

An extension for VS Code which provides support for the Nim language.
Other
237 stars 37 forks source link

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

Open cooldome opened 6 years ago

cooldome commented 6 years ago

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)
dom96 commented 6 years ago

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?

ghost commented 6 years ago

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

ghost commented 6 years ago

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

dom96 commented 6 years ago

What about:

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

?

RSDuck commented 6 years ago

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)

dom96 commented 6 years ago

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

ghost commented 4 years ago

Currently looks like that image image image