Replies: 1 comment 3 replies
-
Thanks for the suggestion! Although a neat idea, I don't think this will happen in 'mini.pairs'. Its main purpose is to be as simple and fast as possible. Having to check for tree-sitter context each time a pair character is typed (which is quite frequent), goes against this design decision. Right now there is an only mechanism to decide whether a typed character needs special treatment, and that is |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It would be awesome if we could easily integrate treesitter with
mini.pairs
!I think treesitter is ubiquitous enough where it would make sense, and could add some very useful functionality.
A usecase that I think is very common is people wanting to enable/disable certain pairs based on the current treesitter node.
For example, I think most people would want to disable the single quote pairing when writing a comment, or even perhaps when they are in a string.
I think providing a simple API that lets a user disable a pairing in specific nodes would be very very useful :)
nvim-autopairs has something similar: https://github.com/windwp/nvim-autopairs?tab=readme-ov-file#treesitter
Beta Was this translation helpful? Give feedback.
All reactions