Closed georgelemon closed 11 months ago
They are highlighted because they are builtins i.e available in the system module.
Also,
echo
used to be part ofkeyword.control
.
echo is not a keyword.
Alright. Then, find
in that context is a valid name for a package so it should not be highlighted. LSP can print info about std libs. Complicating the syntax with useless regex is too much (never used LSP).
They are highlighted because they are builtins i.e available in the system module.
That set keeps changing and depends on the used mode too, some things are not supported by nim js
, for example. Also, the highlighter never knows if the "builtin" symbol wasn't shadowed. "builtin" is not a useful category for Nim and should be abolished.
That set keeps changing and depends on the used mode too, some things are not supported by
nim js
, for example. Also, the highlighter never knows if the "builtin" symbol wasn't shadowed.
It doesn't matter, it's not meant to be an exhaustive list it's just to give a somewhat good idea about the builtin namespace. Many don't use IDEs (and LSP for that matter) removing builtin highlighting means a bad experience for them. I try to follow the norms of each tool, Sublime syntax definitions highlight builtins so I do, Github's don't so I don't.
Wrong highlighting that does not reflect reality does not help anybody. Highlighting in general is overdone with too many different colors that nobody understands anyway. The distinction between keywords and non-keywords is all that matters. Then you also highlight string literals and comments differently and you covered 100% of what is actually useful.
Turbo Pascal did that effectively and bugfree in 1988...
Words like
find
,contains
should not be highlighted. Maybe there are more like this.Also,
echo
used to be part ofkeyword.control
.