I'm seeing it just now after deleting a few lines higher up in the buffer. Like the text content has moved, but it's being painted with the syntax highlighting prior to deletion, sort of thing.
I'm seeing it just now after deleting a few lines higher up in the buffer. Like the text content has moved, but it's being painted with the syntax highlighting prior to deletion, sort of thing.
yes, sounds like what I experience too.
I've also just nuked my config and started from scratch though, so it's far down the list of my worries 🙂
I've had this before and "fixed" it by not using clojure-ts-mode. Now I get it in both clojure-mode and clojure-ts-mode...
can it be eglot's semantic highlighting?
Just verified that I don't see the same issue in a c-mode buffer. In a clojure buffer if I delete lines, semantic highlighting goes weird, but remains (differently) weird if I just undo and reinstate them 🙂
what's weird is that when I clean out my emacs state, I don't get this "rich" highlighting and I also don't get the bug. Then when I i use my installation "for a while", it'll flip one day to this rich style, and the bug will be present. I don't know what causes this change; it might be editing some other file types that use other buffer modes.
it doesn't look like clojure-mode or clojure-ts-mode issue. Probably one of the minor modes, either CIDER or LSP. In CIDER it can be disabled by setting (setopt cider-font-lock-dynamically nil), in eglot it's enabled automatically and can be disabled by executing M-x eglot-semantic-tokens-mode.
I use cider; I'm actually not sure what of eglot (if anything) is in use
you can try M-x describe-mode or C-h m, but it's a long buffer which describes every minor mode that is being used in the buffer
ok cool, I'll know to check this next time it triggers again
maybe disabling them one by one to track down the main suspect 🙂
I have actually seen that even pre-31.1 - with cider and that semantic highlighting feature IIRC. So 31.1 might not be the culprit itself.