diff options
author | Martino Pilia <martino.pilia@gmail.com> | 2019-06-01 16:27:44 +0200 |
---|---|---|
committer | Martino Pilia <martino.pilia@gmail.com> | 2019-06-01 16:27:44 +0200 |
commit | 5542db1507edc054d654e748a2e7ccdd007e2f95 (patch) | |
tree | 171ccdb681e26cfcc096c73c3b81d5f1530c2783 /doc | |
parent | 332168594001264e68601c03a6365626142be1fe (diff) | |
download | ale-5542db1507edc054d654e748a2e7ccdd007e2f95.zip |
Support custom LSP notifications
Allow to send custom notification mesages, that expect no response from
the server.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ale.txt | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/doc/ale.txt b/doc/ale.txt index f0c0a468..f0820be6 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -3192,18 +3192,30 @@ ale#linter#PreventLoading(filetype) *ale#linter#PreventLoading()* similar to prevent ALE from loading linters. -ale#lsp_linter#SendRequest(buffer, linter_name, method, parameters, Callback) +ale#lsp_linter#SendRequest(buffer, linter_name, message, [Handler]) *ale#lsp_linter#SendRequest()* - Send a custom request to an LSP linter. + Send a custom request to an LSP linter. The arguments are defined as + follows: - `buffer` must be a valid buffer number, and `linter_name` is a |String| - identifying an LSP linter that is available and enabled for the |filetype| - of `buffer`. `method` is a |String| identifying an LSP method supported by - `linter`, while `parameters` is a |dictionary| of LSP parameters applicable - to `method`. `Callback` is a |Funcref| that is called when a response to the - request is received, and takes as unique argument a dictionary representing - the response to the request obtained from the server. + `buffer` A valid buffer number. + + `linter_name` A |String| identifying an LSP linter that is available and + enabled for the |filetype| of `buffer`. + + `message` A |List| in the form `[is_notification, method, parameters]`, + containing three elements: + `is_notification` - an |Integer| that has value 1 if the + request is a notification, 0 otherwise; + `methdod` - a |String|, identifying an LSP method supported + by `linter`; + `parameters` - a |dictionary| of LSP parameters that are + applicable to `method`. + + `Handler` Optional argument, meaningful only when `message[0]` is 0. + A |Funcref| that is called when a response to the request is + received, and takes as unique argument a dictionary + representing the response obtained from the server. ale#other_source#ShowResults(buffer, linter_name, loclist) |