crystal-lang-tools / vscode-crystal-lang

Yet another VSCode extension for Crystal Programming Language
https://marketplace.visualstudio.com/items?itemName=crystal-lang-tools.crystal-lang
MIT License
276 stars 58 forks source link

Wrong syntax highlighting when symbol name is equal to a keyword #133

Closed MatheusRich closed 3 years ago

MatheusRich commented 3 years ago

image

Code:

KEYWORDS = {
  and:    :AND,
  else:   :ELSE,
  false:  :FALSE,
  fn:     :FN,
  if:     :IF,
  let:    :LET,
  nil:    :NIL,
  or:     :OR,
  print:  :PRINT,
  puts:   :PUTS,
  return: :RETURN,
  true:   :TRUE,
  while:  :WHILE,
}

def something(**args)
  puts args
end

something(if: 1, else: 2, nil: 3, other: 4)
grantspeelman commented 3 years ago

not sure if this is related as well

Screenshot_20210102_122828

max-bertinetti commented 3 years ago

carbon(1)

carbon

This is some syntax highlighting coming from carbon.sh. Can you confirm @MatheusRich @grantspeelman that is the desired behaviour?

I'm studying the grammar it uses for Crystal. The format is completely different.

If someone can help on this would be great!

grantspeelman commented 3 years ago

That looks Good to me 👍🏽