diff options
author | w0rp <devw0rp@gmail.com> | 2019-02-22 00:35:53 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2019-02-22 00:35:53 +0000 |
commit | f8aeb5c5a45b57a35d1572176e345173c6e4de61 (patch) | |
tree | 15fb106b46f94d16f90e73fabd6fc7ac03ccbb03 /doc | |
parent | ffa45fa3fb44ade28c64aa8f0a21acd71c903a2a (diff) | |
download | ale-f8aeb5c5a45b57a35d1572176e345173c6e4de61.zip |
#2132 - Make most foo_callback options work as foo
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ale.txt | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/doc/ale.txt b/doc/ale.txt index 083b0507..ca895fe0 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -3231,8 +3231,9 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()* When this argument is set to `'socket'`, then the linter will be defined as an LSP linter via a TCP - socket connection. `address_callback` must be set - with a callback returning an address to connect to. + socket connection. Either `address` or + `address_callback` must be set. + ALE will not start a server automatically. When this argument is not empty @@ -3255,6 +3256,13 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()* An optional `lsp_config` or `lsp_config_callback` may be defined to pass configuration settings to the LSP. + `address` A |String| representing an address to connect to, + or a |Funcref| accepting a buffer number and + returning the |String|. + + This argument must only be set if the `lsp` argument + is set to `'socket'`. + `address_callback` A |String| or |Funcref| for a callback function accepting a buffer number. A |String| should be returned with an address to connect to. @@ -3273,8 +3281,10 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()* is also set to a non-empty string. `language` A |String| representing the name of the language - being checked. This string will be sent to the LSP to - tell it what type of language is being checked. + being checked, or a |Funcref| accepting a buffer + number and returning the |String|. This string will + be sent to the LSP to tell it what type of language + is being checked. If this or `language_callback` isn't set, the language will default to the value of the filetype @@ -3304,7 +3314,10 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()* setting can make it easier to guess the linter name by offering a few alternatives. - `initialization_options` A |Dictionary| of initialization options for LSPs. + `initialization_options` A |Dictionary| of initialization options for LSPs, + or a |Funcref| for a callback function accepting + a buffer number and returning the |Dictionary|. + This will be fed (as JSON) to the LSP in the initialize command. @@ -3315,11 +3328,14 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()* This can be used in place of `initialization_options` when more complicated processing is needed. - `lsp_config` A |Dictionary| of configuration settings for LSPs. + `lsp_config` A |Dictionary| for configuring a language server, + or a |Funcref| for a callback function accepting + a buffer number and returning the |Dictionary|. + This will be fed (as JSON) to the LSP in the workspace/didChangeConfiguration command. - `lsp_config_callback` A |String| or |Funcref| for a callback function + `lsp_config_callback` A |String| or |Funcref| for a callback function accepting a buffer number. A |Dictionary| should be returned for configuration settings to pass the LSP. This can be used in place of `lsp_config` when more |