-
The readme states that the treesitter-textobjects addon can be used for the surroundings. However, I didn't find anything in the docs that describes how to use them. Did I miss anything? |
Beta Was this translation helpful? Give feedback.
Answered by
kylechui
Apr 23, 2025
Replies: 1 comment 4 replies
-
That plugin provides additional motions you can use to surround delimiters around, e.g. add parentheses around a loop |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Another use case is to define the
find
key in a surround to customize what delimiters you are modifying. For example, the default configuration forf
surround uses the@call.outer
query defined by the treesitter text objects plugin when available.https://github.com/kylechui/nvim-surround/blob/main/lua%2Fnvim-surround%2Fconfig.lua#L181-L191