Document the rls linter
This commit is contained in:
parent
2d608b9329
commit
f7d7abe5b2
@ -109,7 +109,7 @@ name. That seems to be the fairest way to arrange this table.
|
|||||||
| reStructuredText | [proselint](http://proselint.com/)|
|
| reStructuredText | [proselint](http://proselint.com/)|
|
||||||
| RPM spec | [rpmlint](https://github.com/rpm-software-management/rpmlint) (disabled by default; see `:help ale-integration-spec`) |
|
| RPM spec | [rpmlint](https://github.com/rpm-software-management/rpmlint) (disabled by default; see `:help ale-integration-spec`) |
|
||||||
| Ruby | [brakeman](http://brakemanscanner.org/), [rails_best_practices](https://github.com/flyerhzm/rails_best_practices), [reek](https://github.com/troessner/reek), [rubocop](https://github.com/bbatsov/rubocop), [ruby](https://www.ruby-lang.org) |
|
| Ruby | [brakeman](http://brakemanscanner.org/), [rails_best_practices](https://github.com/flyerhzm/rails_best_practices), [reek](https://github.com/troessner/reek), [rubocop](https://github.com/bbatsov/rubocop), [ruby](https://www.ruby-lang.org) |
|
||||||
| Rust | [rustc](https://www.rust-lang.org/), cargo (see `:help ale-integration-rust` for configuration instructions) |
|
| Rust | cargo (see `:help ale-integration-rust` for configuration instructions), [rls](https://github.com/rust-lang-nursery/rls), [rustc](https://www.rust-lang.org/) |
|
||||||
| SASS | [sass-lint](https://www.npmjs.com/package/sass-lint), [stylelint](https://github.com/stylelint/stylelint) |
|
| SASS | [sass-lint](https://www.npmjs.com/package/sass-lint), [stylelint](https://github.com/stylelint/stylelint) |
|
||||||
| SCSS | [sass-lint](https://www.npmjs.com/package/sass-lint), [scss-lint](https://github.com/brigade/scss-lint), [stylelint](https://github.com/stylelint/stylelint) |
|
| SCSS | [sass-lint](https://www.npmjs.com/package/sass-lint), [scss-lint](https://github.com/brigade/scss-lint), [stylelint](https://github.com/stylelint/stylelint) |
|
||||||
| Scala | [scalac](http://scala-lang.org), [scalastyle](http://www.scalastyle.org) |
|
| Scala | [scalac](http://scala-lang.org), [scalastyle](http://www.scalastyle.org) |
|
||||||
|
@ -8,7 +8,7 @@ Integration Information
|
|||||||
Since Vim does not detect the rust file type out-of-the-box, you need the
|
Since Vim does not detect the rust file type out-of-the-box, you need the
|
||||||
runtime files for rust from here: https://github.com/rust-lang/rust.vim
|
runtime files for rust from here: https://github.com/rust-lang/rust.vim
|
||||||
|
|
||||||
Note that there are two possible linters for rust files:
|
Note that there are three possible linters for Rust files:
|
||||||
|
|
||||||
1. rustc -- The Rust compiler is used to check the currently edited file.
|
1. rustc -- The Rust compiler is used to check the currently edited file.
|
||||||
So, if your project consists of multiple files, you will get some errors
|
So, if your project consists of multiple files, you will get some errors
|
||||||
@ -18,6 +18,10 @@ Integration Information
|
|||||||
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, so errors will not be reported
|
only operate on the files written on disk, so errors will not be reported
|
||||||
while you type.
|
while you type.
|
||||||
|
3. rls -- If you have `rls` installed, you might prefer using this linter
|
||||||
|
over cargo. rls implements the Language Server Protocol for incremental
|
||||||
|
compliation of Rust code, and can check Rust files while you type. `rls`
|
||||||
|
requires Rust files to contained in Cargo projects.
|
||||||
|
|
||||||
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: >
|
||||||
@ -41,13 +45,24 @@ g:ale_rust_cargo_use_check *g:ale_rust_cargo_use_check*
|
|||||||
"cargo build". "cargo check" is supported since version 1.16.0 of Rust.
|
"cargo build". "cargo check" is supported since version 1.16.0 of Rust.
|
||||||
|
|
||||||
|
|
||||||
|
===============================================================================
|
||||||
|
rls *ale-rust-rls*
|
||||||
|
|
||||||
|
g:ale_rust_rls_executable *g:ale_rust_rls_executable*
|
||||||
|
*b:ale_rust_rls_executable*
|
||||||
|
Type: |String|
|
||||||
|
Default: `'rls'`
|
||||||
|
|
||||||
|
This variable can be modified to change the executable path for `rls`.
|
||||||
|
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
rustc *ale-rust-rustc*
|
rustc *ale-rust-rustc*
|
||||||
|
|
||||||
g:ale_rust_ignore_error_codes *g:ale_rust_ignore_error_codes*
|
g:ale_rust_ignore_error_codes *g:ale_rust_ignore_error_codes*
|
||||||
*b:ale_rust_ignore_error_codes*
|
*b:ale_rust_ignore_error_codes*
|
||||||
Type: |List| of |String|s
|
Type: |List| of |String|s
|
||||||
Default: []
|
Default: `[]`
|
||||||
|
|
||||||
This variable can contain error codes which will be ignored. For example, to
|
This variable can contain error codes which will be ignored. For example, to
|
||||||
ignore most errors regarding failed imports, put this in your .vimrc
|
ignore most errors regarding failed imports, put this in your .vimrc
|
||||||
|
@ -94,6 +94,7 @@ CONTENTS *ale-contents*
|
|||||||
rubocop.............................|ale-ruby-rubocop|
|
rubocop.............................|ale-ruby-rubocop|
|
||||||
rust..................................|ale-rust-options|
|
rust..................................|ale-rust-options|
|
||||||
cargo...............................|ale-rust-cargo|
|
cargo...............................|ale-rust-cargo|
|
||||||
|
rls.................................|ale-rust-rls|
|
||||||
rustc...............................|ale-rust-rustc|
|
rustc...............................|ale-rust-rustc|
|
||||||
sass..................................|ale-sass-options|
|
sass..................................|ale-sass-options|
|
||||||
stylelint...........................|ale-sass-stylelint|
|
stylelint...........................|ale-sass-stylelint|
|
||||||
@ -212,7 +213,7 @@ The following languages and tools are supported.
|
|||||||
* ReasonML: 'merlin'
|
* ReasonML: 'merlin'
|
||||||
* reStructuredText: 'proselint'
|
* reStructuredText: 'proselint'
|
||||||
* RPM spec: 'spec'
|
* RPM spec: 'spec'
|
||||||
* Rust: 'rustc' (see |ale-integration-rust|)
|
* Rust: 'cargo', 'rls', 'rustc' (see |ale-integration-rust|)
|
||||||
* Ruby: 'reek', 'rubocop'
|
* Ruby: 'reek', 'rubocop'
|
||||||
* SASS: 'sasslint', 'stylelint'
|
* SASS: 'sasslint', 'stylelint'
|
||||||
* SCSS: 'sasslint', 'scsslint', 'stylelint'
|
* SCSS: 'sasslint', 'scsslint', 'stylelint'
|
||||||
|
Loading…
Reference in New Issue
Block a user