I use ALE
to check coding style, but I want to ignore the warning type:line too long
, like this picture:
And I find the related setting g:ale_exclude_highlights
, this is its explanation in :help ale
:
g:ale_exclude_highlights g:ale_exclude_highlights
b:ale_exclude_highlights
Type: List
Default: []
A list of regular expressions for matching against highlight messages to
remove. For example:
" Do not highlight messages matching strings like these.
let b:ale_exclude_highlights = ['line too long', 'foo.*bar']
So,
- I put
let g:ale_exclude_highlights = ['line-too-long', 'line too long', 'Line too long', 'E501']
in~/.vimrc
, - then open vim again,
- then check the above settings by
:echo g:ale_exclude_highlights
.
But the warning highlight still arise.
My question is: How to set the ALE configuration g:ale_exclude_highlights
?
PS. & UPDATE:
MY ALE Config(find in ::ALEInfo
)
Current Filetype: python
Available Linters: ['bandit', 'cspell', 'flake8', 'flakehell', 'jedils', 'mypy', 'prospector', 'pycln', 'pycodestyle', 'pydocstyle', 'pyflakes', 'pylama', 'pylint', 'pylsp', 'pyre', 'pyright', 'refurb', 'ruff', 'unimport', vulture']
Enabled Linters: ['flake8', 'pylint']
Ignored Linters: []