summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2020-08-07 12:16:13 +0100
committerw0rp <devw0rp@gmail.com>2020-08-07 12:16:13 +0100
commit19229e8e276a6527c179ae2cb7e0420a1c62996f (patch)
tree2915c0d9214ce5a9910a8fd32d9a7333222ef7c9 /doc
parent9bdabce8dffa54791aff8c97f46d0f8ab5acbf24 (diff)
downloadale-19229e8e276a6527c179ae2cb7e0420a1c62996f.zip
Close #2472 - Add support for pyright
Diffstat (limited to 'doc')
-rw-r--r--doc/ale-python.txt60
-rw-r--r--doc/ale-supported-languages-and-tools.txt1
-rw-r--r--doc/ale.txt3
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|