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

Disable line highlights for only specific error codes/messages #2982

Closed
w0rp opened this issue Jan 23, 2020 · 3 comments
Closed

Disable line highlights for only specific error codes/messages #2982

w0rp opened this issue Jan 23, 2020 · 3 comments
Assignees

Comments

@w0rp
Copy link
Member

w0rp commented Jan 23, 2020

Often during testing or debugging code you want to make changes to code that will trigger errors that span multiple lines, slow down editing, and make your code look ugly. If you are displaying errors in a file in some other way, such as with the gutter/sign icons, you don't need to see the ugly line highlights to know that you have to fix something.

I think it would a good idea to add a setting for disabling line highlights for very specific error codes, and also with support for matching errors to ignore for highlighting based on the message with regex. This is only an issue for highlights, so we wouldn't need to consider filtering for other ways of displaying errors, in the short term.

@w0rp w0rp self-assigned this Jan 23, 2020
@w0rp w0rp added this to To Do in On the Radar via automation Jan 23, 2020
@w0rp w0rp changed the title Disable line highlights for only specific error codes Disable line highlights for only specific error codes/messages Jan 23, 2020
@w0rp w0rp moved this from To Do to In Progress in On the Radar Mar 11, 2020
@w0rp w0rp closed this as completed in bbe5153 Mar 11, 2020
On the Radar automation moved this from In Progress to Done Mar 11, 2020
@vkaracic
Copy link

@w0rp I'm getting this error when saving files now:

Error detected while processing function <SNR>125_NeoVimCallback[29]..<lambda>19[1]..<SNR>119_ExitCallback[28]..<SNR>118_HandleExit[45]..ale#engine#HandleLoclist[40]..ale#engine#SetResults[19]..ale#highlight#SetHighlights[8]..ale#Var:
line    4:
E716: Key not present in Dictionary: ale_exclude_highlights
Press ENTER or type command to continue

which is related to this work I presume.
Reading the changes I believe ale_exclude_highlights is optional?

@RyanSquared
Copy link
Member

It should be optional and additionally it should be set if it isn't already (based on the line here: bbe5153#diff-f6b9e256c10b3ac5141bd19d5007c1f3R113).

What's the output of :ALEInfo now, and :echo g:ale_exclude_highlights ?

@vkaracic
Copy link

Sorry! Just had to restart Vim for changes to take effect I guess.
:echo g:ale_exclude_highlights now correctly returns [].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants