summaryrefslogtreecommitdiff
path: root/doc/ale-rust.txt
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-03-28 23:25:44 +0100
committerw0rp <devw0rp@gmail.com>2017-03-28 23:25:44 +0100
commitd7f8324c3c9b9eb6ea49591fc4fa37948996170d (patch)
tree8a342445f96fbbb904895babba106139c7dc22a2 /doc/ale-rust.txt
parent094eeb267397acdc7eb35498f06088aec1eb339a (diff)
downloadale-d7f8324c3c9b9eb6ea49591fc4fa37948996170d.zip
Move linter documentation into separate files
Diffstat (limited to 'doc/ale-rust.txt')
-rw-r--r--doc/ale-rust.txt60
1 files changed, 60 insertions, 0 deletions
diff --git a/doc/ale-rust.txt b/doc/ale-rust.txt
new file mode 100644
index 00000000..d0d4f707
--- /dev/null
+++ b/doc/ale-rust.txt
@@ -0,0 +1,60 @@
+===============================================================================
+ALE Rust Integration *ale-rust-options*
+ *ale-integration-rust*
+
+-------------------------------------------------------------------------------
+Integration Information
+
+ 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
+
+ Note that there are two possible linters for rust files:
+
+ 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
+ when you use e.g. a struct which is defined in another file. You can use
+ |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
+ 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
+ recommended to turn off |g:ale_lint_on_text_changed| and to turn on
+ |g:ale_lint_on_save| in your vimrc file.
+
+ Only cargo is enabled by default. To switch to using rustc instead of cargo,
+ configure |g:ale_linters| appropriately: >
+
+ " See the help text for the option for more information.
+ let g:ale_linters = {'rust': ['rustc']}
+<
+
+ Also note that rustc 1.12. or later is needed.
+
+
+-------------------------------------------------------------------------------
+cargo *ale-rust-cargo*
+
+g:ale_rust_cargo_use_check *g:ale_rust_cargo_use_check*
+
+ Type: |Number|
+ Default: `1`
+
+ When set to `1`, this option will cause ALE to use "cargo check" instead of
+ "cargo build". "cargo check" is supported since version 1.16.0 of Rust.
+
+
+-------------------------------------------------------------------------------
+rustc *ale-rust-rustc*
+
+g:ale_rust_ignore_error_codes *g:ale_rust_ignore_error_codes*
+
+ Type: |List| of |String|s
+ Default: []
+
+ This variable can contain error codes which will be ignored. For example, to
+ ignore most errors regarding failed imports, put this in your .vimrc
+ >
+ let g:ale_rust_ignore_error_codes = ['E0432', 'E0433']
+
+
+-------------------------------------------------------------------------------
+ vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: