Hi everyone, yet another LSP question. I am hoping that someone with a similar setup can help me configuring things correctly.
I am using `pyright` with `lsp-mode` (via `lsp-pyright`) and want to switch the `flycheck` checker to `flake8`. After some fiddling I got things to kind of work by setting
(setq flycheck-python-flake8-executable "flake8")
(setq-default flycheck-disabled-checkers '(lsp))
in my config. I say kind of, because the errors that are underlined in the buffer are chosen by `flake8` and jumping between them with the flycheck commands works. However, `M-x flycheck-verify-setup` gives me
Syntax checkers for buffer iosys.py in python-mode:
No checker to run in this buffer.
Checkers that could run if selected:
python-flake8 select
- may enable: yes
- executable: Found at /Users/pelling/miniconda3/envs/pymor/bin/flake8
- configuration file: Found at "/Users/pelling/projects/pymor/setup.cfg"
- next checkers: python-pylint, python-mypy
python-pycompile select
- may enable: yes
- executable: Found at /Users/pelling/miniconda3/envs/pymor/bin/python3
- next checkers: python-mypy
python-pyright select
- may enable: yes
- executable: Found at /Users/pelling/miniconda3/envs/pymor/bin/pyright
Checkers that are compatible with this mode, but will not run until properly configured:
lsp (manually disabled) enable (explicitly selected)
- may enable: yes
- may run: t
python-pylint (automatically disabled) reset
- may enable: no
- executable: Not found
- configuration file: Found at "/Users/pelling/projects/pymor/pyproject.toml"
- next checkers: python-mypy
python-mypy (automatically disabled) reset
- may enable: no
- may run: t
- executable: Not found
- configuration file: Found at "/Users/pelling/projects/pymor/pyproject.toml"
Flycheck Mode is enabled. Use C-u C-c ! x to enable disabled checkers.
--------------------
Flycheck version: 32snapshot
Emacs version: 28.1
System: aarch64-apple-darwin21.5.0
Window system: ns
which says `(explicitly selected)` after `lsp` and my modeline shows a lot of errors. When I look at them with `lsp-ui-flycheck-list` they are all errors detected from `pyright`.
​
Any ideas on how I can avoid this double checking and achieve what I want (only check errors with `flake8)` are greatly appreciated. I don't quite understand the interplay between pyright, lsp-ui and flycheck...