summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/ale-elixir.txt2
-rw-r--r--doc/ale-supported-languages-and-tools.txt2
-rw-r--r--doc/ale.txt128
3 files changed, 126 insertions, 6 deletions
diff --git a/doc/ale-elixir.txt b/doc/ale-elixir.txt
index 5864f728..de9daacf 100644
--- a/doc/ale-elixir.txt
+++ b/doc/ale-elixir.txt
@@ -6,7 +6,7 @@ ALE Elixir Integration *ale-elixir-options*
mix *ale-elixir-mix*
-The `mix` linter is disabled by default, as it can bee too expensive to run.
+The `mix` linter is disabled by default, as it can be too expensive to run.
See `:help g:ale_linters`
diff --git a/doc/ale-supported-languages-and-tools.txt b/doc/ale-supported-languages-and-tools.txt
index 73c2e473..ba96c37c 100644
--- a/doc/ale-supported-languages-and-tools.txt
+++ b/doc/ale-supported-languages-and-tools.txt
@@ -456,9 +456,9 @@ Notes:
* SugarSS
* `stylelint`
* Swift
+ * Apple `swift-format`
* `sourcekit-lsp`
* `swiftformat`
- * `swift-format`
* `swiftlint`
* Tcl
* `nagelfar`!!
diff --git a/doc/ale.txt b/doc/ale.txt
index 4a1dc7cc..fdd95ace 100644
--- a/doc/ale.txt
+++ b/doc/ale.txt
@@ -20,6 +20,7 @@ CONTENTS *ale-contents*
5.4 Find References...................|ale-find-references|
5.5 Hovering..........................|ale-hover|
5.6 Symbol Search.....................|ale-symbol-search|
+ 5.7 Refactoring: Rename, Actions......|ale-refactor|
6. Global Options.......................|ale-options|
6.1 Highlights........................|ale-highlights|
7. Linter/Fixer Options.................|ale-integration-options|
@@ -147,12 +148,14 @@ ALE offers several options for controlling which linters are run.
* Disabling only a subset of linters. - |g:ale_linters_ignore|
* Disabling LSP linters and `tsserver`. - |g:ale_disable_lsp|
+You can stop ALE any currently running linters with the |ALELintStop| command.
+Any existing problems will be kept.
-------------------------------------------------------------------------------
3.1 Linting On Other Machines *ale-lint-other-machines*
ALE offers support for running linters or fixers on files you are editing
-locally on other machines, so long as the other machine has access the file
+locally on other machines, so long as the other machine has access to the file
you are editing. This could be a linter or fixer run inside of a Docker image,
running in a virtual machine, running on a remote server, etc.
@@ -177,8 +180,11 @@ script like so. >
#!/usr/bin/env bash
- exec docker run --rm -v "$(pwd):/data" cytopia/pylint "$@"
+ exec docker run -i --rm -v "$(pwd):/data" cytopia/pylint "$@"
<
+
+You will run to run Docker commands with `-i` in order to read from stdin.
+
With the above script in mind, you might configure ALE to lint your Python
project with `pylint` by providing the path to the script to execute, and
mappings which describe how to between the two file systems in your
@@ -526,6 +532,15 @@ completion information with Deoplete, consult Deoplete's documentation.
ALE by can support automatic imports from external modules. This behavior can
be enabled by setting the |g:ale_completion_autoimport| variable to `1`.
+You can manually request imports for symbols at the cursor with the
+|ALEImport| command. The word at the cursor must be an exact match for some
+potential completion result which includes additional text to insert into the
+current buffer, which ALE will assume is code for an import line. This command
+can be useful when your code already contains something you need to import.
+
+You can execute other commands whenever ALE inserts some completion text with
+the |ALECompletePost| event.
+
When working with TypeScript files, ALE can remove warnings from your
completions by setting the |g:ale_completion_tsserver_remove_warnings|
variable to 1.
@@ -655,6 +670,34 @@ ALE supports searching for workspace symbols via LSP linters with the
|ALESymbolSearch| command. See the documentation for the command
for a full list of options.
+-------------------------------------------------------------------------------
+5.7 Refactoring: Rename, Actions *ale-refactor*
+
+ALE supports renaming symbols in code such as variables or class names with
+the |ALERename| command.
+
+|ALECodeAction| will execute actions on the cursor or applied to a visual
+range selection, such as automatically fixing errors.
+
+Actions will appear in the right click mouse menu by default for GUI versions
+of Vim, unless disabled by setting |g:ale_popup_menu_enabled| to `0`.
+
+Make sure to set your Vim to move the cursor position whenever you right
+click, and enable the mouse menu: >
+
+ set mouse=a
+ set mousemodel=popup_setpos
+<
+You may wish to remove some other menu items you don't want to see: >
+
+ silent! aunmenu PopUp.Select\ Word
+ silent! aunmenu PopUp.Select\ Sentence
+ silent! aunmenu PopUp.Select\ Paragraph
+ silent! aunmenu PopUp.Select\ Line
+ silent! aunmenu PopUp.Select\ Block
+ silent! aunmenu PopUp.Select\ Blockwise
+ silent! aunmenu PopUp.Select\ All
+<
===============================================================================
6. Global Options *ale-options*
@@ -1759,6 +1802,19 @@ g:ale_pattern_options_enabled *g:ale_pattern_options_enabled*
will not set buffer variables per |g:ale_pattern_options|.
+g:ale_popup_menu_enabled *g:ale_popup_menu_enabled*
+
+ Type: |Number|
+ Default: `has('gui')`
+
+ When this option is set to `1`, ALE will show code actions and rename
+ capabilities in the right click mouse menu when there's a LSP server or
+ tsserver available. See |ale-refactor|.
+
+ 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_rename_tsserver_find_in_comments *g:ale_rename_tsserver_find_in_comments*
Type: |Number|
@@ -2971,6 +3027,10 @@ ALEFix *ALEFix*
Fix problems with the current buffer. See |ale-fix| for more information.
+ If the command is run with a bang (`:ALEFix!`), all warnings will be
+ suppressed, including warnings about no fixers being defined, and warnings
+ about not being able to apply fixes to a file because it has been changed.
+
A plug mapping `<Plug>(ale_fix)` is defined for this command.
@@ -3053,6 +3113,23 @@ ALEHover *ALEHover*
A plug mapping `<Plug>(ale_hover)` is defined for this command.
+ALEImport *ALEImport*
+
+ Try to import a symbol using `tsserver` or a Language Server.
+
+ ALE will look for completions for the word at the cursor which contain
+ additional text edits that possible insert lines to import the symbol. The
+ first match with additional text edits will be used, and may add other code
+ to the current buffer other than import lines.
+
+ If linting is enabled, and |g:ale_lint_on_text_changed| is set to ever check
+ buffers when text is changed, the buffer will be checked again after changes
+ are made.
+
+ A Plug mapping `<Plug>(ale_import)` is defined for this command. This
+ mapping should only be bound for normal mode.
+
+
ALEOrganizeImports *ALEOrganizeImports*
Organize imports using tsserver. Currently not implemented for LSPs.
@@ -3060,9 +3137,28 @@ ALEOrganizeImports *ALEOrganizeImports*
ALERename *ALERename*
- Rename a symbol using TypeScript server or Language Server.
+ Rename a symbol using `tsserver` or a Language Server.
+
+ The symbol where the cursor is resting will be the symbol renamed, and a
+ prompt will open to request a new name.
+
+ ALE will refuse to complete a rename operation if there are files to modify
+ which have not yet been saved in Vim. If the command is run with a bang
+ (`:ALERename!`), all warnings will be suppressed, and files that are still
+ open in Vim and not saved will be ignored and left in a state where symbols
+ in those files will not be updated.
+
+
+ALECodeAction *ALECodeAction*
+
+ Apply a code action via LSP servers or `tsserver`.
- The user will be prompted for a new name.
+ If there is an error present on a line that can be fixed, ALE will
+ automatically fix a line, unless there are multiple possible code fixes to
+ apply.
+
+ This command can be run in visual mode apply actions, such as applicable
+ refactors. A menu will be shown to select code action to apply.
ALERepeatSelection *ALERepeatSelection*
@@ -3092,6 +3188,13 @@ ALELint *ALELint*
A plug mapping `<Plug>(ale_lint)` is defined for this command.
+ALELintStop *ALELintStop*
+
+ Stop any currently running jobs for checking the current buffer.
+
+ Any problems from previous linter results will continue to be shown.
+
+
ALEPrevious *ALEPrevious*
ALEPreviousWrap *ALEPreviousWrap*
ALENext *ALENext*
@@ -3957,6 +4060,23 @@ g:ale_want_results_buffer *g:ale_want_results_buffer*
figure out which buffer other sources should lint.
+ALECompletePost *ALECompletePost-autocmd*
+ *ALECompletePost*
+
+ This |User| autocmd is triggered after ALE inserts an item on
+ |CompleteDone|. This event can be used to run commands after a buffer
+ is changed by ALE as the result of completion. For example, |ALEFix| can
+ be configured to run automatically when completion is done: >
+
+ augroup FixAfterComplete
+ autocmd!
+ " Run ALEFix when completion items are added.
+ autocmd User ALECompletePost ALEFix!
+ " If ALE starts fixing a file, stop linters running for now.
+ autocmd User ALEFixPre ALELintStop
+ augroup END
+<
+
ALELintPre *ALELintPre-autocmd*
*ALELintPre*
ALELintPost *ALELintPost-autocmd*