tpope / vim-surround

surround.vim: Delete/change/add parentheses/quotes/XML-tags/much more with ease
https://www.vim.org/scripts/script.php?script_id=1697
13.38k stars 444 forks source link

Not compatible with nvim-treesitter indentation #328

Open moinmoti opened 3 years ago

moinmoti commented 3 years ago

Surround does not re-indent the text when nvim-treesitter indentation is enabled. Steps to reproduce:

  1. Install nvim-treesitter.
  2. Enable indent

Used config:

require'nvim-treesitter.configs'.setup {
    ensure_installed = 'maintained',
    highlight        = {enable = true},
    indent           = {enable = true}
}
MuhammadSawalhy commented 3 years ago

Same for me, but I removed treesitter and the issue is still happening. It seems that something else is the reason behind this issue, or vim-surround itself.