-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable a tree-sitter playground inside Emacs #15
Conversation
Hope this doesn't come as unnecessary. This PR is also helping me grasp the available bindings to tackle #4 |
I think this is basically the start of a major mode for the query language, so it can be named |
was working on this, doing some testing, and the query I was passing made the bindings to panic:
maybe I should rebase and try again. |
okay, did that and the error is almost the same except that I can see what query I was using:
I don't really understand why the bindings fail that critically 🤔 |
That means the query has a syntax error. ;; [] are just the container for the patterns.
[(call_expression function: (identifier) @function)
(impl_item type: (*) @type)]
;; They themselves should not be in the string representation.
"(call_expression function: (identifier) @function)
(impl_item type: (*) @type)" The error reporting is bad, as described in #22. |
so avoiding the square brackets as container for the query should suffice to workaround this issue, interesting. |
Just a heads-up: I reorganized the directory structure a bit, moving all Lisp code to I also reworked the types in #26. |
@ubolonton good mornin' Can you review my
|
so following value to be set before calling `tree-sitter-query--get-next-match-highlight-color` is 0
Okay I was able to fix this #15 (comment) now, I'm struggling with font-lock face property additions for the matches, I asked on StackExchange for help https://emacs.stackexchange.com/q/56143/690 after this is solved and you do a review, this thing can be merged. |
@shackra You have for a review on reddit, here's my 2c. |
saw my post today but no comments, maybe you mispoke... I will address your feedback |
I missed a word. I meant to say you asked for a review on reddit, so here's mine. |
@Alexander-Miller made changes, you can re-review if you want (not sure why the button for requesting this does not work) |
Done.
Probably because I didn't start a review. (Why am I even able to start one? This is not my repo.) |
Typo fixed. |
@ubolonton this PR is ready to be reviewed by you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty cool. I added some comments for improvement.
I have further suggestions to improve usability, but let's focus on getting a basic version merged first, and discuss those later.
the only thing left out was a comment on using a different hook for when changes happen. - emacs-tree-sitter#15 (comment)
This PR enables developers to execute tree-sitter queries and see what parts of source code they identify in a target buffer by highlighting. This extends the available code for debugging
tree-sitter-query
and friends.