Skip to content

Fixed identifier highlighting#62

Merged
TimWhiting merged 2 commits into
UserNobody14:masterfrom
matthewnitschke:fixed_identifier_typing
Feb 11, 2024
Merged

Fixed identifier highlighting#62
TimWhiting merged 2 commits into
UserNobody14:masterfrom
matthewnitschke:fixed_identifier_typing

Conversation

@matthewnitschke

@matthewnitschke matthewnitschke commented Feb 11, 2024

Copy link
Copy Markdown
Contributor

I'm new to writing tree-sitter parsers, so please correct me if this is an incorrect change.

All identifiers were being tagged as @variable.builtin. Looking at some of the documentation provided by nvim, @variable.builtin should be reserved for variables provided by the language (so this. in dart)

Changes

  • All (identifier)s are now tagged with @variable instead of @variable.builtin
  • (this) is now tagged as @variable.builtin
  • added a basic CI file so tests are run on new changes, happy to revert this if you'd prefer not having it in the repo
  • re-ran tree-sitter generate and tree-sitter build-wasm with the tree-sitter cli v0.20.9. This resulted in changes on master, leading me to think these were outdated from previous PRs

Note

Running tree-sitter generate on v0.20.9, now results in the following output, these conflicts can probably be cleaned up in a later PR

out

Comment thread test/corpus/errors.txt
Comment on lines +11 to +17
(program
(ERROR
(final_builtin)
(identifier)
(type_identifier)
(type_arguments
(type_identifier)))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was a bit surprising, nothing in this area was actually updated

My current theory is that this is the cause of running tree-sitter generate on the latest version (older versions successfully passed this test)

@TimWhiting

Copy link
Copy Markdown
Collaborator

Looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants