-
Notifications
You must be signed in to change notification settings - Fork 67
Colour is messed up/lost after formatting #112
Comments
When I manually run So naturally: augroup FormatGroup
autocmd!
autocmd BufWritePost *.java,*.ts,*.lua,*.py FormatWrite
autocmd User FormatterPost TSDisable rainbow | TSEnable rainbow
augroup end should solve the problem. However, this doesn't work on java. Therefore I added my current setup to further investigate. But no luck so far. Maybe someone here is smarter than I am? Edit: this solves it for my setup: augroup FormatGroup
autocmd!
autocmd BufWritePost *.java,*.ts,*.lua,*.py FormatWrite
autocmd FocusGained * TSDisable rainbow | TSEnable rainbow
augroup end Edit 2: |
Editing in general seems to confuse We can also sometimes get typescript to screw up: Interestingly, the behavior alters between autocmd BufNewFile,BufReadPost * TSDisable rainbow | TSEnable rainbow | TSDisable rainbow | TSEnable rainbow | TSDisable rainbow | TSEnable rainbow I also cycle after every write in case the above isn't enough: autocmd BufWritePost * TSDisable rainbow | TSEnable rainbow These both seem to be quick enough that I don't notice, and while they do nothing to illuminate the underlying cause of the issue, they do seem to do a pretty good job of patching it over. |
The same in Rust as well. I think it's very easy to trigger this bug. For example, I delete a left bracket and retype it and color will mass up. |
Same for me in LaTeX |
Describe the bug
c code when use clang-format, then rainbow become gray
Steps to reproduce
use clang-format, rainbow->gray
Expected behavior
rainbow do not change
Screenshots
before clang-format
after clang-format
The text was updated successfully, but these errors were encountered: