Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Match builtins as keywords and highlight with the Identifier group.
This was changed from keywords to the regexp in #605, but I think that was a mistake. If you do `new := "foo"` then this is perfectly valid Go, but I don't think it's a bad thing to add a reminder that you're actually overriding a global built-in by highlighting the `new`, just as it's not a bad idea to highlight the `new()` in `func new()` to serve as a similar reminder. This is a common-ish mistake that most of us have probably made at least once or twice. The only case where this fails is in method declaration and calls: func () x new() { other.new() } But this is the case with the current highlight as well, so it doesn't make that worse.
- Loading branch information