Skip to main content
added 545 characters in body
Source Link
D. Ben Knoble
  • 27.7k
  • 3
  • 31
  • 68

Knowing from :help ale-python-pylint that we want to adjust g:ale_python_pylint_options to include --rcfile, I would drop

let g:ale_python_pylint_options = '--rcfile '.<filename>

in wherever the right place is for you. That could be wherever you configure ALE, if a single setting is right; or, it could be in an ftplugin (use b:…) if you need to change the name based on the specific file/project/whatever.

For the specific ~/.vim/.pylintrc, you should be able to do

let g:ale_python_pylint_options = '--rcfile '.expand('~/.vim/.pylintrc')

It's possible expand() isn't necessary if pylint will properly tilde-expand its arguments, but I haven't tested that (a smoke-test would be to run something like sh -c 'pylint --rcfile '\''~/.vim/.pylintrc'\'' <other options>' and see if it picks up your settings; run it in your own shell if single-quotes disable all expansion: pylint --rcfile '~/.vim/pylintrc' <other options>).

Knowing from :help ale-python-pylint that we want to adjust g:ale_python_pylint_options to include --rcfile, I would drop

let g:ale_python_pylint_options = '--rcfile '.<filename>

in wherever the right place is for you. That could be wherever you configure ALE, if a single setting is right; or, it could be in an ftplugin (use b:…) if you need to change the name based on the specific file/project/whatever.

Knowing from :help ale-python-pylint that we want to adjust g:ale_python_pylint_options to include --rcfile, I would drop

let g:ale_python_pylint_options = '--rcfile '.<filename>

in wherever the right place is for you. That could be wherever you configure ALE, if a single setting is right; or, it could be in an ftplugin (use b:…) if you need to change the name based on the specific file/project/whatever.

For the specific ~/.vim/.pylintrc, you should be able to do

let g:ale_python_pylint_options = '--rcfile '.expand('~/.vim/.pylintrc')

It's possible expand() isn't necessary if pylint will properly tilde-expand its arguments, but I haven't tested that (a smoke-test would be to run something like sh -c 'pylint --rcfile '\''~/.vim/.pylintrc'\'' <other options>' and see if it picks up your settings; run it in your own shell if single-quotes disable all expansion: pylint --rcfile '~/.vim/pylintrc' <other options>).

Source Link
D. Ben Knoble
  • 27.7k
  • 3
  • 31
  • 68

Knowing from :help ale-python-pylint that we want to adjust g:ale_python_pylint_options to include --rcfile, I would drop

let g:ale_python_pylint_options = '--rcfile '.<filename>

in wherever the right place is for you. That could be wherever you configure ALE, if a single setting is right; or, it could be in an ftplugin (use b:…) if you need to change the name based on the specific file/project/whatever.