Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Undefined words are highlighted as keywords #308

Open
tree-sitter/tree-sitter-c
#16
@wesinator

Description

@wesinator

Edit by @rsese: from Max in #308 (comment):

It sounds like you want built-in types (like int) to have a different color than user-defined types (like MyLibraryInteger in the example above). I think that makes sense, but I'd like to keep it as a subtly different color (as opposed to a completely different color), because I think there's a lot of value in coloring types consistently for visual understanding of structure.

Prerequisites

Description

any word following a preceding keyword is highlighted as a keyword, even if it is not valid

Steps to Reproduce

Consider the following code:

unsigned int y; // correct

// wrong:
unsigned integer x;
inline integer z;

Expected behavior: 'integer' is not highlighted, as it is not a valid keyword
Words following preceding keyword are only highlighted if they are also actual keywords.

Github and VS Code C highlighting does this correctly.

Actual behavior: any word following a preceding keyword is highlighted as a keyword, even if it is not valid
image

Reproduces how often: Always

Versions

0.60.13
atom 1.32.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions