-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fix HurlRunnterToEntry using treesitter #116
Fix HurlRunnterToEntry using treesitter #116
Conversation
|
for more information, see https://pre-commit.ci
Apply Sweep Rules to your PR?
This is an automated message generated by Sweep AI. |
Thanks. I will take a try tonight. |
FYI - Just synced your change to https://github.com/jellydn/hurl.nvim/tree/canary and the PR is not working properly yet. |
Please let me know what issues you are experiencing and if possible a sample hurl file to reproduce them. I have tested it on my hurl files and seems to work properly. |
Sure, I will push my test file to repository so you could try as well. |
Just FYI - I've reverted to using the find verb instead of treesitter parser. Reproduce:
The |
@jellydn sorry for the issue... please test if this fixes it for you: |
* Fix HurlRunnterToEntry using treesitter (#116) * chore(doc): auto generate docs * chore(test): add API tests for dog breeds * Fix find entry via treesitter (#124) * Fix HurlRunnterToEntry using treesitter * chore(doc): auto generate docs * Fix find entry method returing two nodes range. Lua index starts on 1 so we were accidentally returing the line range of the current node plus one line of the next node. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * refactor(http_utils): make find_hurl_entry_positions_in_buffer a module function --------- Co-authored-by: Horacio Sanson <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
For now, this is my solution :) 4d4e4ff |
@jellydn simple solution and seems to work as far as I can see... thanks. Better than trying to fix the treesitter parser that does not seem to properly parse the comments and treat them as errors. Specially the top most comment. You can see how the treesitter sees the file using |
Great. Thanks, @hsanson Also, the |
FYI c10a905 |
WHAT
Modify HurlRunnerToEntry to work using treesitter parser. This allows to run to a specific entry without having to be exactly located at the start of the entry where the verb is located.
WHY
HOW
Screenshots (if appropriate):
Types of changes
Checklist: