ebullient / obsidian-show-whitespace-cm6

Show leading/trailing whitespace
GNU Affero General Public License v3.0
14 stars 2 forks source link

✨ Add highlighting of missing whitespace #202

Closed sigrunixia closed 6 hours ago

sigrunixia commented 9 hours ago

🔖 Feature description

𝘏𝘢𝘳𝘮𝘰𝘯𝘺 — Today at 5:46 PM i wish there was a source mode view that would highlight whitespace characters, i had to hack together a awful one in css that mostly work but is ugly. but its so nice to find stray characters

Eon — Today at 5:48 PM ah whitespace, the bane of every project i work on i think there was a plugin for showing whitespace, but ehhh

Sigrunixia — Today at 5:55 PM https://github.com/ebullient/obsidian-show-whitespace-cm6

𝘏𝘢𝘳𝘮𝘰𝘯𝘺 — Today at 5:57 PM i tried it, but it doesnt seem to actually do any processing to highlight whitespace, its just the same as what you can do with normal css

Sigrunixia — Today at 5:58 PM 🤔

Gutti — Today at 5:58 PM Image

Sigrunixia — Today at 5:58 PM Time for a FR to the repo then. :3

✔️ Solution

Optionally add a mode where plugin needs to be enabled, to process whitespace highlighting.

I know the goal is to make this plugin be disabled if needed, but there is also a missing gap right now for highlighting only whitespace and not other syntax highlighting.

❓ Alternatives

🤷🏼‍♀️

📝 Additional Context

https://discord.com/channels/686053708261228577/694233507500916796/1297330033752408076

ebullient commented 6 hours ago

Not sure what is wanted here.

No, this plugin doesn't "process" whitespace. It enables the CodeMirror extensions that decorate whitespace so that it can be styled.

If you want something that finds and cleans up extra whitespace, I would suggest a linter.