onivim / oni

Oni: Modern Modal Editing - powered by Neovim
https://www.onivim.io
MIT License
11.34k stars 299 forks source link

TextMate Highlighting: Weird artifacts #1272

Open hoschi opened 6 years ago

hoschi commented 6 years ago

I got them not to rarely but can't identify a root case, yet: 2018-01-11-151513_466x91_scrot

bryphe commented 6 years ago

Thanks for reporting this, @hoschi! I've seen this too - characters will be seemingly randomly highlighted.

If anyone stumbles upon a consistent repro for it, that would be helpful! I need to narrow down whether it is a problem where the syntax highlight store gets out of sync (highlighting the wrong lines), or if it has to do with how we synchronize the highlights back to neovim via nvim_buf_add_highlights.

I do think there may be cases where insert mode causes a problem, especially if the insert operations spans multiple lines (ie, pressing enter while in insert mode).

Marked it as 'blocker' because this should be fixed before we enable-by-defaujlt.

bryphe commented 6 years ago

I found one repro (which may or may not be a separate issue):

messed up highlighting

hoschi commented 6 years ago

I believe comments have other problems too, but need also find repos for that one. Still, good catch 👍

hoschi commented 6 years ago

@bryphe have by chance a highlight for the cursor column active? Thought that could probably make problem in other lines than the current one. I have a vim plugin enabled for that.

akinsho commented 6 years ago

Things are much improved since #1272 was merged although another scenario I've noticed can mess up the highlighting is having the contents of a buffer changed for example when I run prettier on save using ale.vim the contents of the buffer are essentially replaced. I've noticed that this causes highlighiting to go out of wack, another example is changing branch if the file itself is very different from one branch to another this also really messes with highlighting.

CrossR commented 6 years ago

This feels much better now, I'm not sure if any updates for this were added when we brought prettier into Oni?

hoschi commented 6 years ago

Still happens when you change the file from outside