rougier / nano-theme

GNU Emacs / N Λ N O Theme
GNU General Public License v3.0
374 stars 36 forks source link

Spellchecking highlights. #15

Open artelse opened 2 years ago

artelse commented 2 years ago

Spellchecking now highlights the whole word, to me this is a bit too emphasized. Are there plans to make these less intrusive; i.e. underline or similar? (And no, no bright red crinkles ;) [via Emacsconf2021]

rougier commented 2 years ago

I get the same feeling actually. Maybe a simple underline in salient color would work. Do you want to make a PR?

artelse commented 2 years ago

I've experimented with underlining:

(custom-set-faces
   `(flyspell-incorrect ((t (:underline (:color ,nano-light-salient :style line)))))
   `(flyspell-duplicate ((t (:underline (:color ,nano-light-salient :style line))))))

which just puts an underline on the words. But am not that pleased with how emacs applies the underline. It is almost on the baseline of the font which is not adjustable as far as I can see. Another option might be to add a faint background or tune the color intensity of the font down, but that's quite non-standard.

artelse commented 2 years ago

It appears one can control the underline offset. Here is my current configuration for flyspell and highlighting. Note that I am not familiar yet with github pr's, but is on my todo list to learn about.

(custom-set-faces
   `(flyspell-incorrect ((t (:underline (:color ,nano-light-salient :style line) :foreground "default" ))))
   `(flyspell-duplicate ((t (:underline (:color ,nano-light-salient :style line) :foreground "default" )))))
(setq underline-minimum-offset 3)
rougier commented 2 years ago

Thanks. For the PR, you can do directly from GitHub by first forking the repository and edit the file onine. Then GitHub will propose you to make a PR automatically.

For the line offset, does it change the line spacing with a value of 3?

artelse commented 2 years ago

Yes, it does. Just saw that Emacs 29 enables a :position property on :underline. Regarding the PR, will do, but am severely short on time atm.

rougier commented 2 years ago

No problem, I can wait (but I won't be able to test, I'm still using emacs 27)

artelse commented 2 years ago

Ok, am still learning about Emacs and currently in the process of setting up with git and local editing of repos, etc.

rougier commented 2 years ago

I've uploaded a few changes to the theme including flyspell which is a bit lighter:

Screenshot 2022-01-31 at 17 40 58