Ale: Create better default signs

Created on 5 Oct 2016  Â·  7Comments  Â·  Source: dense-analysis/ale

I wrote this plugin with some signs which are easy to differentiate, but which don't look the best. I think the plugin could use some better default signs and colours, etc. If anyone has found some better characters and colours to use for errors and warnings, let me know.

Additionally, if anyone can think of a nicer looking GIF to put in the README file with some nicer looking signs, I'll take that.

enhancement help wanted

Most helpful comment

@w0rp How does one use unicode characters for the warnings and errors? I've looked through the docs but can't find anything.

I've tried this, but I get an error that its an invalid sign text:

let g:ale_sign_error = '\u2718'

EDIT: I figured it out. I just needed to copy+paste the actual symbol. I also set the colors to be reversed.

let g:ale_sign_error = '✘'
let g:ale_sign_warning = 'âš '
highlight ALEErrorSign ctermbg=NONE ctermfg=red
highlight ALEWarningSign ctermbg=NONE ctermfg=yellow

All 7 comments

Keep them by default, there are easy to differentiate as you said and work everywhere (No fancy unicode characters).

If the user wants to change them, there are global variables for that.

I could keep them as they are. I'll leave this issue open for a little while longer to see if anyone else has any suggestions. If someone can suggest some characters which are more aesthetically pleasing which will work pretty much everywhere, let me know.

We'll stick with the signs as they are, and explain how to use nicer looking signs in the documentation later on.

@w0rp How does one use unicode characters for the warnings and errors? I've looked through the docs but can't find anything.

I've tried this, but I get an error that its an invalid sign text:

let g:ale_sign_error = '\u2718'

EDIT: I figured it out. I just needed to copy+paste the actual symbol. I also set the colors to be reversed.

let g:ale_sign_error = '✘'
let g:ale_sign_warning = 'âš '
highlight ALEErrorSign ctermbg=NONE ctermfg=red
highlight ALEWarningSign ctermbg=NONE ctermfg=yellow

Yeah, you use the actual symbol. If you were doing it in a Vim script for a project, you also probably need a script encoding line, which happens a few times in this project.

I have actually been thinking about this issue again. I do wonder if there's some way I could reliably detect which symbols will be rendered decently for 90% of people, and fall back on something else. I suppose I could make ALE detect which font you are using in combination with the encoding.

I might try to change the default symbols some day.

Personally, I would love it if it looked a bit more like validator. I just find it a bit easier on the eye. However it doesn't work with nvim, and I'm not giving it up for anything now that I've made the switch :)

I think it was mentioned that there is a way to customize the aesthetics of Ale? How would I do that? For instance, using the dots instead of the arrows.

Otherwise, this is amazing, btw!

Have a read through :help ale for extensive documentation, and look at the options above.

If there's an easy way to detect something like font support, or something like that, safely and quickly, then we could use some better default signs. What we have to avoid is using a sign that doesn't render properly in some cases by default. -- and >> are pretty much guaranteed to work in even the most primitive of terminals. Unicode symbols we can't trust too well.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

plexigras picture plexigras  Â·  3Comments

ilyakopy picture ilyakopy  Â·  4Comments

amerov picture amerov  Â·  4Comments

catbaron0 picture catbaron0  Â·  3Comments

janhellmich picture janhellmich  Â·  3Comments