3

I'm having issues with setting up ale and pyright.

According to the documentation on both repos, everything should work out of the box, but that doesn't seem to be the case for me. I'm guessing it's another plugin causing issues, but I'm not sure.

The issue I have is that when I do :ALEInfo, I see "enabled" and "ignored" linters like this:

  Enabled Linters: ['flake8', 'mypy', 'pylint', 'pyright']
  Ignored Linters: ['pyright']

I tried using the "explicit" mode for ALE by doing something like this:

let g:ale_linters_explicit = 1
let g:ale_linters = {
      \ 'python': ['pyright', 'mypy'],
      \ }

But then, I'd still get:

  Enabled Linters: ['mypy', 'pyright']
  Ignored Linters: ['pyright']

So, I'm wondering why is pyright being ignored?

Farzad
  • 1,770
  • 4
  • 26
  • 48
  • Are you sure there is no `g:ale_linters_ignore` anywhere in your config? Maybe it’s part of another plugin that you use? – rfkortekaas Mar 02 '21 at 05:16
  • I know I don't have it in my `vimrc`, is there a way I can check? – Farzad Mar 02 '21 at 13:56
  • Do a full text search in each file in the `.vim` folder. – rfkortekaas Mar 02 '21 at 13:57
  • No, doesn't seem like it, I see it being done in one file, but it's a test for `ale` itself (`plugged/ale/test_ale_info.vader`) – Farzad Mar 02 '21 at 14:04
  • Maybe try to isolate if it's in your configuration to temporarily use a seperate [`.vimrc` file and `.vim` folder](https://superuser.com/questions/209075/toggle-between-two-different-vim-configurations)! – rfkortekaas Mar 02 '21 at 14:07

1 Answers1

3

Had the same issue, it was bugging me quite a bit. Finally resolved it by realizing that I had g:ale_disable_lsp = 1 set in my .vimrc, causing ALE to ignore all lsp linters for any language regardless of whether I included them in my enabled linters.

ds2606
  • 66
  • 1
  • 5
  • 1
    Good point @ds2606, I was following their documentation and they suggest to add that line when using with `coc`, I had the same line in my `.vimrc`, and disabling it seems to resolve the issue – Farzad Mar 30 '21 at 13:32
  • @Farzad, I had that variable set for exactly the same reason, for coc. Took ages to finally pin that down to get lsp linter functionality back! – ds2606 Jul 02 '21 at 05:24
  • Nice @ds2606! For now, I decided to get away from using ALE and COC together because I think it creates more headaches than what it's worth – Farzad Jul 05 '21 at 15:06