mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-10 05:22:31 +08:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -138,7 +138,7 @@ g:ale_javascript_flow_use_respect_pragma
|
||||
|
||||
By default, ALE will use the `--respect-pragma` option for `flow`, so only
|
||||
files with the `@flow` pragma are checked by ALE. This option can be set to
|
||||
`0` to disable that behaviour, so all files can be checked by `flow`.
|
||||
`0` to disable that behavior, so all files can be checked by `flow`.
|
||||
|
||||
|
||||
===============================================================================
|
||||
|
||||
@@ -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*
|
||||
|
||||
@@ -682,6 +683,65 @@ g:ale_python_pyre_auto_pipenv *g:ale_python_pyre_auto_pipenv*
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
===============================================================================
|
||||
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*
|
||||
|
||||
|
||||
@@ -373,6 +373,7 @@ Notes:
|
||||
* `pylint`!!
|
||||
* `pyls`
|
||||
* `pyre`
|
||||
* `pyright`
|
||||
* `reorder-python-imports`
|
||||
* `vulture`!!
|
||||
* `yapf`
|
||||
@@ -484,6 +485,7 @@ Notes:
|
||||
* VALA
|
||||
* `uncrustify`
|
||||
* Verilog
|
||||
* `hdl-checker`
|
||||
* `iverilog`
|
||||
* `verilator`
|
||||
* `vlog`
|
||||
|
||||
@@ -3,7 +3,10 @@ ALE Verilog/SystemVerilog Integration *ale-verilog-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
ALE can use four different linters for Verilog HDL:
|
||||
ALE can use five different linters for Verilog HDL:
|
||||
|
||||
HDL Checker
|
||||
Using `hdl_checker --lsp`
|
||||
|
||||
iverilog:
|
||||
Using `iverilog -t null -Wall`
|
||||
@@ -26,6 +29,9 @@ defining 'g:ale_linters' variable:
|
||||
\ let g:ale_linters = {'systemverilog' : ['verilator'],}
|
||||
<
|
||||
|
||||
===============================================================================
|
||||
General notes
|
||||
|
||||
Linters/compilers that utilize a "work" directory for analyzing designs- such
|
||||
as ModelSim and Vivado- can be passed the location of these directories as
|
||||
part of their respective option strings listed below. This is useful for
|
||||
@@ -40,6 +46,16 @@ changing. This can happen in the form of hangs or crashes. To help prevent
|
||||
this when using these linters, it may help to run linting less frequently; for
|
||||
example, only when a file is saved.
|
||||
|
||||
HDL Checker is an alternative for some of the issues described above. It wraps
|
||||
around ghdl, Vivado and ModelSim/Questa and, when using the latter, it can
|
||||
handle mixed language (VHDL, Verilog, SystemVerilog) designs.
|
||||
|
||||
===============================================================================
|
||||
hdl-checker *ale-verilog-hdl-checker*
|
||||
|
||||
See |ale-vhdl-hdl-checker|
|
||||
|
||||
|
||||
===============================================================================
|
||||
iverilog *ale-verilog-iverilog*
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@ ALE VHDL Integration *ale-vhdl-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
ALE can use three different linters for VHDL:
|
||||
ALE can use four different linters for VHDL:
|
||||
|
||||
iverilog:
|
||||
Using `iverilog -t null -Wall`
|
||||
ghdl:
|
||||
Using `ghdl --std=08`
|
||||
|
||||
ModelSim/Questa
|
||||
Using `vcom -2008 -quiet -lint`
|
||||
@@ -14,8 +14,15 @@ ALE can use three different linters for VHDL:
|
||||
Vivado
|
||||
Using `xvhdl --2008`
|
||||
|
||||
Note all linters default to VHDL-2008 support. This, and other options, can be
|
||||
changed with each linter's respective option variable.
|
||||
HDL Checker
|
||||
Using `hdl_checker --lsp`
|
||||
|
||||
===============================================================================
|
||||
General notes
|
||||
|
||||
ghdl, ModelSim/Questa and Vivado linters default to VHDL-2008 support. This,
|
||||
and other options, can be changed with each linter's respective option
|
||||
variable.
|
||||
|
||||
Linters/compilers that utilize a "work" directory for analyzing designs- such
|
||||
as ModelSim and Vivado- can be passed the location of these directories as
|
||||
@@ -31,6 +38,10 @@ changing. This can happen in the form of hangs or crashes. To help prevent
|
||||
this when using these linters, it may help to run linting less frequently; for
|
||||
example, only when a file is saved.
|
||||
|
||||
HDL Checker is an alternative for some of the issues described above. It wraps
|
||||
around ghdl, Vivado and ModelSim/Questa and, when using the latter, it can
|
||||
handle mixed language (VHDL, Verilog, SystemVerilog) designs.
|
||||
|
||||
===============================================================================
|
||||
ghdl *ale-vhdl-ghdl*
|
||||
|
||||
@@ -50,6 +61,60 @@ g:ale_vhdl_ghdl_options *g:ale_vhdl_ghdl_options*
|
||||
This variable can be changed to modify the flags/options passed to 'ghdl'.
|
||||
|
||||
|
||||
===============================================================================
|
||||
hdl-checker *ale-vhdl-hdl-checker*
|
||||
|
||||
HDL Checker is a wrapper for VHDL/Verilg/SystemVerilog tools that aims to
|
||||
reduce the boilerplate code needed to set things up. It can automatically
|
||||
infer libraries for VHDL sources, determine the compilation order and provide
|
||||
some static checks.
|
||||
|
||||
You can install it using pip:
|
||||
>
|
||||
$ pip install hdl-checker
|
||||
|
||||
`hdl-checker` will be run from a detected project root, determined by the
|
||||
following methods, in order:
|
||||
|
||||
1. Find the first directory containing a configuration file (see
|
||||
|g:ale_hdl_checker_config_file|)
|
||||
2. If no configuration file can be found, find the first directory containing
|
||||
a folder named `'.git'
|
||||
3. If no such folder is found, use the directory of the current buffer
|
||||
|
||||
|
||||
g:ale_hdl_checker_executable
|
||||
*g:ale_hdl_checker_executable*
|
||||
*b:ale_hdl_checker_executable*
|
||||
Type: |String|
|
||||
Default: `'hdl_checker'`
|
||||
|
||||
This variable can be changed to the path to the 'hdl_checker' executable.
|
||||
|
||||
|
||||
g:ale_hdl_checker_options *g:ale_hdl_checker_options*
|
||||
*b:ale_hdl_checker_options*
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be changed to modify the flags/options passed to the
|
||||
'hdl_checker' server startup command.
|
||||
|
||||
|
||||
g:ale_hdl_checker_config_file *g:ale_hdl_checker_config_file*
|
||||
*b:ale_hdl_checker_config_file*
|
||||
Type: |String|
|
||||
Default: `'.hdl_checker.config'` (Unix),
|
||||
`'_hdl_checker.config'` (Windows)
|
||||
|
||||
This variable can be changed to modify the config file HDL Checker will try
|
||||
to look for. It will also affect how the project's root directory is
|
||||
determined (see |ale-vhdl-hdl-checker|).
|
||||
|
||||
More info on the configuration file format can be found at:
|
||||
https://github.com/suoto/hdl_checker/wiki/Setting-up-a-project
|
||||
|
||||
|
||||
===============================================================================
|
||||
vcom *ale-vhdl-vcom*
|
||||
|
||||
|
||||
36
doc/ale.txt
36
doc/ale.txt
@@ -127,7 +127,7 @@ their relevant options.
|
||||
* By showing balloons for your mouse cursor - |g:ale_set_balloons|
|
||||
|
||||
Please consult the documentation for each option, which can reveal some other
|
||||
ways of tweaking the behaviour of each way of displaying problems. You can
|
||||
ways of tweaking the behavior of each way of displaying problems. You can
|
||||
disable or enable whichever options you prefer.
|
||||
|
||||
Most settings can be configured for each buffer. (|b:| instead of |g:|),
|
||||
@@ -516,6 +516,10 @@ at the cursor taken from LSP linters. The following commands are supported:
|
||||
|
||||
|ALEHover| - Print information about the symbol at the cursor.
|
||||
|
||||
Truncated information will be displayed when the cursor rests on a symbol by
|
||||
default, as long as there are no problems on the same line. You can disable
|
||||
this behavior by setting |g:ale_hover_cursor| to `0`.
|
||||
|
||||
If |g:ale_set_balloons| is set to `1` and your version of Vim supports the
|
||||
|balloon_show()| function, then "hover" information also show up when you move
|
||||
the mouse over a symbol in a buffer. Diagnostic information will take priority
|
||||
@@ -1048,9 +1052,27 @@ g:ale_history_log_output *g:ale_history_log_output*
|
||||
if you want to save on some memory usage.
|
||||
|
||||
|
||||
g:ale_hover_cursor *g:ale_hover_cursor*
|
||||
|
||||
Type: |Number|
|
||||
Default: `1`
|
||||
|
||||
If set to `1`, ALE will show truncated information in the echo line about
|
||||
the symbol at the cursor automatically when the |CursorHold| event is fired.
|
||||
The delay before requesting hover information is based on 'updatetime', as
|
||||
with all |CursorHold| events.
|
||||
|
||||
If there's a problem on the line where the cursor is resting, ALE will not
|
||||
show any hover information.
|
||||
|
||||
See |ale-hover| for more information on hover information.
|
||||
|
||||
This setting must be set to `1` before ALE is loaded for this behavior
|
||||
to be enabled. See |ale-lint-settings-on-startup|.
|
||||
|
||||
|
||||
g:ale_hover_to_preview *g:ale_hover_to_preview*
|
||||
*b:ale_hover_to_preview*
|
||||
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
||||
@@ -1268,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': [],
|
||||
@@ -2557,6 +2579,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|
|
||||
@@ -2654,12 +2677,14 @@ documented in additional help files.
|
||||
vala....................................|ale-vala-options|
|
||||
uncrustify............................|ale-vala-uncrustify|
|
||||
verilog/systemverilog...................|ale-verilog-options|
|
||||
hdl-checker...........................|ale-verilog-hdl-checker|
|
||||
iverilog..............................|ale-verilog-iverilog|
|
||||
verilator.............................|ale-verilog-verilator|
|
||||
vlog..................................|ale-verilog-vlog|
|
||||
xvlog.................................|ale-verilog-xvlog|
|
||||
vhdl....................................|ale-vhdl-options|
|
||||
ghdl..................................|ale-vhdl-ghdl|
|
||||
hdl-checker...........................|ale-vhdl-hdl-checker|
|
||||
vcom..................................|ale-vhdl-vcom|
|
||||
xvhdl.................................|ale-vhdl-xvhdl|
|
||||
vim.....................................|ale-vim-options|
|
||||
@@ -2864,7 +2889,7 @@ ALELast *ALELast*
|
||||
the last or first warning or error in the file, respectively.
|
||||
|
||||
`ALEPrevious` and `ALENext` take optional flags arguments to custom their
|
||||
behaviour :
|
||||
behavior :
|
||||
`-wrap` enable wrapping around the file
|
||||
`-error`, `-warning` and `-info` enable jumping to errors, warnings or infos
|
||||
respectively, ignoring anything else. They are mutually exclusive and if
|
||||
@@ -3506,7 +3531,7 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()*
|
||||
contents of the buffer being checked. All occurrences of `%t` in command
|
||||
strings will reference the one temporary file. The temporary file will be
|
||||
created inside a temporary directory, and the entire temporary directory
|
||||
will be automatically deleted, following the behaviour of
|
||||
will be automatically deleted, following the behavior of
|
||||
|ale#command#ManageDirectory|. This option can be used for some linters which
|
||||
do not support reading from stdin.
|
||||
|
||||
@@ -3531,7 +3556,6 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()*
|
||||
be used to replace those characters to avoid formatting issues.
|
||||
|
||||
*ale-linter-loading-behavior*
|
||||
*ale-linter-loading-behaviour*
|
||||
|
||||
Linters for ALE will be loaded by searching |runtimepath| in the following
|
||||
format: >
|
||||
|
||||
Reference in New Issue
Block a user