Skip to content
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

Using space in g:ale_sign_* variables causes error #2351

Closed
nkakouros opened this issue Mar 11, 2019 · 7 comments
Closed

Using space in g:ale_sign_* variables causes error #2351

nkakouros opened this issue Mar 11, 2019 · 7 comments
Labels

Comments

@nkakouros
Copy link

nkakouros commented Mar 11, 2019

Information

NVIM v0.4.0-370-gc0a29c365
Build type: RelWithDebInfo

Operating System: Arch Linux latest

What went wrong

I am not sure this is an error with ale or with vim itself.

I want to use a single character as error, warning, etc symbol, for instance > instead of `>>. But this fails.

Reproducing the bug

  1. `let g:ale_sign_error = ' >'
  2. e file/with/errors

The following error pops up:

Error detected while processing /home/me/.local/share/nvim/plugged/ale/autoload/ale/sign.vim:
line   71:
E239: Invalid sign text: 

As a workaround I used a non-breaking space.

@nkakouros
Copy link
Author

I also found that \ > works. Probably this is a vim limitation.

@w0rp w0rp added the bug label Mar 11, 2019
@w0rp
Copy link
Member

w0rp commented Mar 11, 2019

I think it's just a bug. I'll fix it by escaping the spaces.

@w0rp w0rp closed this as completed in 365ffae Mar 11, 2019
@w0rp
Copy link
Member

w0rp commented Mar 11, 2019

That should work now.

@nkakouros
Copy link
Author

Indeed it works. Thank you for covering my use case!

@kiooss
Copy link

kiooss commented Mar 12, 2019

@w0rp
This commit has some side effort which make char like not useable.

E239: Invalid sign text: ✖\

To reproduce:

:let g:ale_sign_error='✖'
:echo substitute(g:ale_sign_error, '\\\| ', '\\\0', 'g')
✖\

@w0rp
Copy link
Member

w0rp commented Mar 12, 2019

That works for me. Try adding this to the top of your vimrc file.

set encoding=utf-8
scriptencoding utf-8

@kiooss
Copy link

kiooss commented Mar 13, 2019

Thanks, it works now. My mistake.

smkent added a commit to smkent/dotfiles that referenced this issue Apr 3, 2019
- Set scriptencoding to utf-8
- Replace the ALE sign unicode escape sequences with the corresponding
  unicode value, and remove the trailing space from each of the sign
  variables.

These updates resolve sign configuration errors that began following
dense-analysis/ale@365ffae,
using information from dense-analysis/ale#2351.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants