coc-pairs
coc-pairs copied to clipboard
What are the differences between this and jiangmiao/auto-pairs?
I think it would be a good idea to have in the README some text explaining what's the difference between this plugin and other that are already well-known, like https://github.com/jiangmiao/auto-pairs. I'm currently using jiangmiao/auto-pairs since it correctly indents code when <CR>
is pressed, so I don't see any real benefits of using this plugin over the one I cited (because I can't really see a difference).
My advice is stick to the auto pair plugin you like, it's designed to works like VSCode, but not featured like some of others.
For improvement of <CR>
it's implemented in coc.nvim to make it works with formatOnType feature of LSP, checkout :h coc#on_enter()
Thanks, I'll definitely try it out with formatOnType
, I'm loving how powerful Neovim has become thanks to coc.nvim... thanks again, mate!
@gbrlsnchs IMO auto-pairs has a few flaws:
- Auto indent didn't work for me sometimes when I was using auto-pairs. So I have to write vimscript by myself to meet demand.
- auto-pairs inserts pairs always, which is a little noisy. coc-pairs just insert the first pair if the next character behind the cursor position is not a whitespace.
Maybe I didn't explain that clearly... Anyway, auto-pairs is a great plugin. :smile: Its fly-mode is fantastic, which, however, I use seldom. So after weighting and balance, I chose coc-pairs.
Thanks, I'll definitely try it out with
formatOnType
, I'm loving how powerful Neovim has become thanks to coc.nvim... thanks again, mate!
Did you find a solution? Can you post it?.
Thanks, I'll definitely try it out with
formatOnType
, I'm loving how powerful Neovim has become thanks to coc.nvim... thanks again, mate!Did you find a solution? Can you post it?.
See https://github.com/neoclide/coc-pairs/issues/13#issuecomment-478998416 where I comment about the issue I had and how I solved it.
So is it possible to get proper indentation without formatOnType
? Since I'm using prettier in some places, and other formatters in others, and they may not be controlled from coc, it would be nice to get proper indentation without having to resort to cocs formatting.
So is it possible to get proper indentation without formatOnType?
Checkout :h indentexpr
, formatOnType
reformat current line on <CR>
which means not only indentation.