diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ale-python.txt | 60 | ||||
-rw-r--r-- | doc/ale-supported-languages-and-tools.txt | 1 | ||||
-rw-r--r-- | doc/ale.txt | 3 |
3 files changed, 63 insertions, 1 deletions
diff --git a/doc/ale-python.txt b/doc/ale-python.txt index 93f1d668..60b0771d 100644 --- a/doc/ale-python.txt +++ b/doc/ale-python.txt @@ -598,6 +598,7 @@ g:ale_python_pylint_use_msg_id *g:ale_python_pylint_use_msg_id* Use message for output (e.g. I0011) instead of symbolic name of the message (e.g. locally-disabled). + =============================================================================== pyls *ale-python-pyls* @@ -683,6 +684,65 @@ g:ale_python_pyre_auto_pipenv *g:ale_python_pyre_auto_pipenv* =============================================================================== +pyright *ale-python-pyright* + +The `pyrlight` linter requires a recent version of `pyright` which includes +the `pyright-langserver` executable. You can install `pyright` on your system +through `npm` with `sudo npm install -g pyright` or similar. + +Refer to their README for installation instructions: +https://github.com/Microsoft/pyright + +`pyright` needs to know the path to your Python executable and probably a +virtualenv to run. ALE will try to detect these automatically. +See |g:ale_python_pyright_config|. + + +g:ale_python_pyright_executable *g:ale_python_pyright_executable* + *b:ale_python_pyright_executable* + Type: |String| + Default: `'pyright-langserver'` + + The executable for running `pyright`, which is typically installed globally. + + +g:ale_python_pyright_config *g:ale_python_pyright_config* + *b:ale_python_pyright_config* + Type: |Dictionary| + Default: `{}` + + Settings for configuring the `pyright` language server. + + See pyright's documentation for a full list of options: + https://github.com/microsoft/pyright/blob/master/docs/settings.md + + ALE will automatically try to set defaults for `venvPath` and `pythonPath` + so your project can automatically be checked with the right libraries. + You can override these settings with whatever you want in your ftplugin + file like so: > + + let b:ale_python_pyright_config = { + \ 'python': { + \ 'pythonPath': '/bin/python', + \ 'venvPath': '/other/dir', + \ }, + \} +< + If `venvPath` is set, but `pythonPath` is not, + ALE will use `venvPath . '/bin/python'` or similar as `pythonPath`. + + A commonly used setting for `pyright` is disabling language services + apart from type checking and "hover" (|ale-hover|), you can set this + setting like so, or use whatever other settings you want: > + + let b:ale_python_pyright_config = { + \ 'pyright': { + \ 'disableLanguageServices': v:true, + \ }, + \} +< + +=============================================================================== reorder-python-imports *ale-python-reorder_python_imports* g:ale_python_reorder_python_imports_executable diff --git a/doc/ale-supported-languages-and-tools.txt b/doc/ale-supported-languages-and-tools.txt index 8d142721..2dc05287 100644 --- a/doc/ale-supported-languages-and-tools.txt +++ b/doc/ale-supported-languages-and-tools.txt @@ -372,6 +372,7 @@ Notes: * `pylint`!! * `pyls` * `pyre` + * `pyright` * `reorder-python-imports` * `vulture`!! * `yapf` diff --git a/doc/ale.txt b/doc/ale.txt index e6b3e58d..e1b38292 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -1290,7 +1290,7 @@ g:ale_linters *g:ale_linters* \ 'help': [], \ 'perl': ['perlcritic'], \ 'perl6': [], - \ 'python': ['flake8', 'mypy', 'pylint'], + \ 'python': ['flake8', 'mypy', 'pylint', 'pyright'], \ 'rust': ['cargo'], \ 'spec': [], \ 'text': [], @@ -2578,6 +2578,7 @@ documented in additional help files. pylint................................|ale-python-pylint| pyls..................................|ale-python-pyls| pyre..................................|ale-python-pyre| + pyright...............................|ale-python-pyright| reorder-python-imports................|ale-python-reorder_python_imports| vulture...............................|ale-python-vulture| yapf..................................|ale-python-yapf| |