-
Hello, Sorry if that has already been asked, but I was wondering how to retrieve the text object under the cursor (from the ones defined as built-in in the README). I am trying to make a dynamic swap which swaps with previous or next node which is the same as the one under the cursor. At the moment, I do a mapping as such (only works for python): local mapping = {
...
if_statement = "conditional",
for_statement = "loop",
class_definition = "class",
argument_list = "parameter",
parameters = "parameter",
...
} I get the Is there a way to retrieve the "mapping list" for each language? I saw in "queries" that there seems to be what I'm looking for, but I don't know how to use it. Do you have a hint of what to do or where to look? Thanks again! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, I saw |
Beta Was this translation helpful? Give feedback.
Hi, I saw
siblings-swap.nvim
andiswap.nvim
which presumably do this thing. You can have a look at their implementation