-
Notifications
You must be signed in to change notification settings - Fork 47
Support offset! query directive #58
Comments
I don't think that the playground should manifest this temporary solution even further (why was offset! even documented?). I think implementing range modifications in core so that all plugins understand them would be a better solution. If your PR is just about a request to show all metadata in playground, this would be perfectly feasible. |
You seem like you knew a lot about this. Do you think this can be improved? |
Certainly not here; the only reason this repo is not archived is that the README may have to be updated (again) before the 0.10 release. (This comment is two years old, and |
Is playground also in neovim core? Answer seems to be yes: This plugin is deprecated since the functionality is included in Neovim: Use :Inspect to show the highlight groups under the cursor |
The offset directive (see
:h offset!
) is very useful for adjust a captures range however it does not change the range directly but instead adds a adjusted range to thecontent
field to themetadata
of the capture. Example query:This will adjust the range in the metadata to start one column later and end one column earlier. In python this gets the range of the string without the
"
Currently the playground does not support this (probably because it uses
node:range()
). I think this could trivially be supported using:I do not have the time right now but if you point me to where the query highlighting range is called I will drop in the change tomorrow and test it
The text was updated successfully, but these errors were encountered: