Closed EricCrosson closed 2 years ago
@EricCrosson Could you tell me which language you are using. Not all languages will have all the text objects available. The table below the list of items should tell you if you language supports that specific text object.
parameter.outer
won't work until custom predicate #make-range!
is implemented. See https://github.com/emacs-tree-sitter/elisp-tree-sitter/issues/180
@meain I was using TypeScript, which does appear to support parameter.outer
. Good idea to double-check :slightly_smiling_face:
@dvzubarev that would explain it! Thank you for the pointer
@dvzubarev thanks for letting me know. I was not aware of this issue.
I think I will keep the issue open as this is technically still an issue. Plus this could be used to track any updates here or upstream towards this.
I was really hoping to just piggyback off of the work that the nvim-treesitter
team has done. I was initially thinking to maybe giving a shot at implementing it in elisp-tree-sitter
, but I have not been able to dedicate much time to it.
I am not sure what the simplest way forward is. A simple revert to an old version would mean that we will be going back quite a lot. I have seen instances of #make-range!
which are more than an year old. We will have to go through the queries and revert things selectively.
That said, maybe we could probably revert back to a version where it was still not completely useless. I see that you had reverted to an older commit. I could revert it back here as well if you think that is a good enough commit.
The way forward is definitely to implement #make-range!
. there is little point in duplicating the work, though I don't really have the time to learn enough rust to do it myself :sweat_smile:.
what I was thinking is less to revert the entire project but to use older versions of the queries, that way new languages can be supported / updated while also removing the breaking nature of #make-range!
. though it may be that instead of "rolling back" the queries we would have to rewrite some to avoid #make-range!
, This would happen in the cases where new text object queries were written with #make-range!
, this is something I would probably be able to help with. The problem being is that we lose sync with nvim and your CI may not be usable in the interum.
as for rolling back your packages, thats not needed, I rolled it back because there are a sizable amount of ruby users (FD: including myself) and making the text objects useless for them is not fun. That being said doom pins packages for this reason, I would not worry about it especially since there were some text objects that have been updated / added since.
It would be great if you could help out with fixing the queries. About the CI, I can switch to to manually pulling in queries in the future for the languages that use #make-range!
until we have it implemented on the Emacs side.
Sounds good!
I have reverted the ruby textobjects alone to the one you have pinned in doom as the current one is completely unusable anyways. ref: https://github.com/meain/evil-textobj-tree-sitter/commit/607b71f38a1b2d7fa464814d968427435d31dd7c
Hi sorry that I have not been able to PR changes, Ill bump the package in doom
Ah awesome! ill have a play and add that to the module!
I am working on something which should take care of this. There is some cleanup to be done, but as of now make-range
branch fixes all that was broken due to make-range
and is fully working.
Ref: #38
This should now be fixed, not more make-range
issues. :D
Fantastic! Thank you very much for doing this.
Hi there,
this is an awesome project! Thanks so much for your work on this.
Using the following configuration
I expect commands like
via
andvaa
to visually select inner and outer parameters, respectively.The inner parameter works as expected, but the outer parameter provides me the error
This text object is included in the
nvim-treesitter-textobjects
repository^1 so I figured it would be a part of this package too. Am I missing some reason it's not included, or have I bungled my configuration somehow?