diff options
author | w0rp <devw0rp@gmail.com> | 2017-02-16 20:59:29 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-02-16 20:59:37 +0000 |
commit | 8c3c84c45e1f1405842dce67694bf61ff1a556b3 (patch) | |
tree | fbb79044b179744b431eafc299ba7d4d3fd437fd /README.md | |
parent | 406d784f7a83c2c76eab86265e3509b470b06e3a (diff) | |
download | ale-8c3c84c45e1f1405842dce67694bf61ff1a556b3.zip |
Add an FAQ section to address concerns about battery life
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -34,6 +34,7 @@ In other words, this plugin allows you to lint while you type. 8. [How can I run linters only when I save files?](#faq-lint-on-save) 9. [How can I use the quickfix list instead of the loclist?](#faq-quickfix) 10. [How can I check JSX files with both stylelint and eslint?](#faq-jsx-stylelint-eslint) + 11. [Will this plugin eat all of my laptop battery power](#faq-my-battery-is-sad) <a name="supported-languages"></a> @@ -410,3 +411,29 @@ ALE will alias the `jsx` filetype so it uses the `css` filetype linters, and use the original Array of selected linters for `jsx` from the `g:ale_linters` object. All available linters will be used for the filetype `javascript`, and no linter will be run twice for the same file. + +<a name="faq-my-battery-is-sad"></a> + +### 4.xi. Will this plugin eat all of my laptop battery power? + +ALE takes advantage of the power of various tools to check your code. This of +course means that CPU time will be used to continuously check your code. If you +are concerned about the CPU time ALE will spend, which will of course imply +some cost to battery life, you can adjust your settings to make your CPU do +less work. + +First, consider increasing the delay before which ALE will run any linters +while you type. ALE uses a timeout which is cancelled and reset every time you +type, and this delay can be increased so linters are run less often. See +`:help g:ale_lint_delay` for more information. + +If you don't wish to run linters while you type, you can disable that +behaviour. Set `g:ale_lint_on_text_changed` to `0`, and consider setting +`g:ale_lint_on_save` to `1` to enable linting when you save files. You won't +get as frequent error checking, but ALE shouldn't block your ability to edit a +document after you save a file, so the asynchronous nature of the plugin will +still be an advantage. + +If you are still concerned, you can turn the automatic linting off altogether, +including the option `g:ale_lint_on_enter`, and you can run ALE manually with +`:call ale#Lint()`. |