Closed sheerun closed 3 years ago
Please see how vim-styled-components solved this: https://github.com/styled-components/vim-styled-components/blob/main/after/indent/javascript.vim#L138-L166
Thanks for the pointer! It looks like supporting the full "stack" of JS-adjacent plugins will be pretty involved so it will take me some time to put together a good test suite. Please add any important examples and test cases to this issue so I can include them.
I'll try to pick this up over the weekend.
let l:result = cindent(v:lnum)
+ recursion safeguard should be enough, no need to support stack of them
This plugin breaks (disables) indentation for jsx code if vim-jsx-pretty is used. To reproduce please use following
~/.vimrc.test
:And then open .js file with jsx with
vim -N -u ~/.vimrc.test component.js