-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ghost guide characters when changing indent size #70
Comments
Sorry for the late reply, I could have sworn I had already responded to this. Yeah, I can reproduce it, and it only seems to happen in web-mode. There must be some compatibility issue, though not one I was previously aware of. I'll take a closer look at web-mode to see if I can tell what the problem might be. |
this also happens to me in many lisp modes. Also when some indentation is corrected automatically, e.g. by parinfer or by indent-region |
Any progress on this issue? It's quite annoying when this happens. And this indeed happens in many different |
This is probably the single most annoying issue that I've personally encountered using this package. |
It might be easier if I had more examples to cross-reference. I've only seen this in |
@jcs090218 Hmm ... yeah neither of these things happen for me, can't reproduce. I'm definitely in |
also can't reproduce with this particular example, however this happens to me very often with Parinfer-rust-mode when the whole block of indentation is changed. |
here's a minimal repro that works for me with
Here's a GIF: This is Emacs version: 27.1, and freshly installed highlight-indent-guides without anything else. |
I have this issue as well. I see it most when I apply auto-formatting via lsp in haskell files. |
In my case this bug is fixed in a particular buffer when I toggle the
(use-package highlight-indent-guides
:ensure t
:after modus-themes
:custom
(highlight-indent-guides-method 'character)
(highlight-indent-guides-auto-character-face-perc 25)
:hook
((prog-mode text-mode conf-mode) . highlight-indent-guides-mode)) |
Here is my workaround based on @lapinskim's comment: (use-package
highlight-indent-guides
:init
(add-hook
'prog-mode-hook
(lambda ()
;; NOTE: Workaround to fix wired appearance after
;; reformatting. See
;; https://github.com/DarthFennec/highlight-indent-guides/issues/70#issuecomment-1342713343
;; for more information.
(highlight-indent-guides-mode +1)
(highlight-indent-guides-mode -1)
(highlight-indent-guides-mode +1)))) NOTE: Only tested on Emacs 30.0.50 |
Say I have this code nicely highlighted with gray guides:
When I edit a line (one with
<div class="page">
in this case), somehow the character guides get messed up and leave all those "ghost" guide characters (in black) that should not be there:These ghost characters are not real in a sense that they aren't actually edited into the code itself (killing the buffer and reopening the file renders properly with the new indent size).
This happens when I use highlight-indent-guides with the web-mode hook, but it doesn't happen with my Python code (python-mode). Is this some compatibility issue mentioned in README or actually a bug?
The text was updated successfully, but these errors were encountered: