Use the lint_file option so the Cargo linter will only be run against files on disk
This commit is contained in:
parent
3f5cb55e73
commit
8e71f233da
@ -27,4 +27,5 @@ call ale#linter#Define('rust', {
|
|||||||
\ 'command_callback': 'ale_linters#rust#cargo#GetCommand',
|
\ 'command_callback': 'ale_linters#rust#cargo#GetCommand',
|
||||||
\ 'callback': 'ale#handlers#rust#HandleRustErrors',
|
\ 'callback': 'ale#handlers#rust#HandleRustErrors',
|
||||||
\ 'output_stream': 'stdout',
|
\ 'output_stream': 'stdout',
|
||||||
|
\ 'lint_file': 1,
|
||||||
\})
|
\})
|
||||||
|
@ -16,9 +16,8 @@ Integration Information
|
|||||||
|g:ale_rust_ignore_error_codes| to ignore some of these errors.
|
|g:ale_rust_ignore_error_codes| to ignore some of these errors.
|
||||||
2. cargo -- If your project is managed by Cargo, the whole project is
|
2. cargo -- If your project is managed by Cargo, the whole project is
|
||||||
checked. That means that all errors are properly shown, but cargo can
|
checked. That means that all errors are properly shown, but cargo can
|
||||||
only operate on the files written on disk. That means it is highly
|
only operate on the files written on disk, so errors will not be reported
|
||||||
recommended to turn off |g:ale_lint_on_text_changed| and to turn on
|
while you type.
|
||||||
|g:ale_lint_on_save| in your vimrc file.
|
|
||||||
|
|
||||||
Only cargo is enabled by default. To switch to using rustc instead of cargo,
|
Only cargo is enabled by default. To switch to using rustc instead of cargo,
|
||||||
configure |g:ale_linters| appropriately: >
|
configure |g:ale_linters| appropriately: >
|
||||||
|
Loading…
Reference in New Issue
Block a user