-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
spacemacs/toggle-whitespace-cleanup cannot locally disable whitespace cleanup #8221
Comments
Well - it is expected behaviour based on value of What you can do currently is: set May be we can improve this by having default local/global value specified in case the value is |
My desire is for it to be on by default and off for specific buffers. It seems wrong that I can't toggle it off per-buffer when I set it to |
This looks like an issue then. I might look into it if I find some time later this weekend. |
Hello, I can reproduce this issue. I have Then, when I try to locally disable the whitespace cleanup for a buffer by Cheers, |
I have a similar issue on develop. I have the variable After doing |
I've been struggling to figure out how to stop suppressing trailing whitespace in markdown in spacemacs. Turns out that I had set up editorconfig to do this before I found the option in the spacemacs config. I set
|
I am still having this issue. Is there any update on it being fixed? |
I'm observing this issue as well. Toggling any of |
can confirm this issue is still present. |
same issue here, have to switch to vim for whitespace changes 😢 |
Came here to say this - It was editorconfig for me as well. 😆 |
syl20bnr/spacemacs#8221 toggle-whitespace-cleanup cannot locally disable whitespace cleanup When I had `dotspacemacs-whitespace-cleanup` set to `trailing`, it would add the `delete-trailing-whitespace` to the **global** hook `before-save-hook`. For example, my Spacemacs has `before-save-hook`: `(delet-trailing-whitespace spacemacs//python-sort-imports)`. Then, when I try to **locally** disable the whitespace cleanup for a buffer by `SPC t W` (i.e., `spacemacs/toggle-whitespace-cleanup`), which basically executes `(remove-hook 'before-save-hook 'delete-trailing-whitespace t)`. However, this fails because there is NO **local** hook `before-save-hook` from which to remove the function `delete-trailing-whitespace`.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid! |
I don't see any reason to think this issue has been fixed. |
@GiovanH |
I can confirm this issue on the latest commit of Spacemacs (as of today - I add a whitespace at the end of a line in a yasnippet file I created. The following seems to have no effect, as whitespace was still deleted
Spacemacs configuration
|
How does this go unresolved for 5 years? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid! |
nope still want this!
…On Wed, May 1, 2024 at 12:36 PM github-actions[bot] < ***@***.***> wrote:
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Please
let us know if this issue is still valid!
—
Reply to this email directly, view it on GitHub
<#8221 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADSJX7DCXDVRXOYCADL4SP3ZAEKYLAVCNFSM4C5G6AXKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBYHA3TGNZRGA3Q>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Just did bump into this as well I think. Did want to switch off the removal of trailing whitespace for a specific butter, but without success. My In my case I've not found a way (yet) to disable the whitespace removal at all. Both |
I will fix this. |
Fixes syl20bnr#8221. The previous implementation had a non-standard structure that made it difficult to correctly implement toggling the minor mode locally and globally. Hence this commit rewrites the enabling/disabling mechanisms of the minor mode. Both local and global toggling with `SPC t W` and `SPC t C-S-w` should now work correctly. As `ws-butler-global-mode` is not used anymore, users that customized `ws-butler-global-exempt-modes` need to customize `global-spacemacs-whitespace-cleanup-modes` instead. The default values are equivalent: `markdown-mode` is excluded.
Description
spacemacs/toggle-whitespace-cleanup cannot locally disable whitespace cleanup
Reproduction guide 🪲
dotspacemacs-whitespace-cleanup
toall
and reload.spacemacs/toggle-whitespace-cleanup-off
save-buffer
Observed behaviour: 👀 💔
The trailing whitespace is removed.
Expected behaviour: ❤️ 😄
The trailing whitespace is not removed.
System Info 💻
The text was updated successfully, but these errors were encountered: