Closed RRethy closed 2 years ago
nvim_autopairs
has support for this, although you'll have to add them manually (and maybe sent them a pull request :) - https://github.com/windwp/nvim-autopairs/blob/master/doc/endwise.md.
Further discussion - https://github.com/nvim-treesitter/nvim-treesitter/issues/703
This is still being tested but I wrote a vim-endwise replacement for tree-sitter, open to having people try it out and help find bugs.
https://github.com/RRethy/nvim-treesitter-endwise
FWIW nvim-autopairs endwise functionality was pretty bad.
What? https://github.com/tpope/vim-endwise
Why? vim-endwise relies on highlight groups used in syntax files which are language specific (https://github.com/tpope/vim-endwise/blob/4289889a2622f9bc7c594a6dd79763781f63dfb5/plugin/endwise.vim#L12-L87). Since nvim-treesitter doesn't use these highlight groups, vim-endwise no longer works (unless I turn on syntax which is redundant with nvim-treesitter).
Potential existing implementations: I don't know of one, but there may be an existing implementation I am unaware of.
*Potential pitfalls:* Not that I can think of.