diff options
author | Martino Pilia <martino.pilia@gmail.com> | 2019-05-31 17:26:53 +0200 |
---|---|---|
committer | Martino Pilia <martino.pilia@gmail.com> | 2019-05-31 17:58:27 +0200 |
commit | 7053d468cc45b1afc18a12cc26dea0278fe9567c (patch) | |
tree | c0cfa052e1a89d7536a4f67104ad2b9318573ba1 /doc/ale.txt | |
parent | 27146ade32d6686fefde27de76b65bcdf353eab5 (diff) | |
download | ale-7053d468cc45b1afc18a12cc26dea0278fe9567c.zip |
Add API for custom LSP requests
Implement a function `ale#lsp_linter#SendRequest` that allows to send
custom LSP requests to an enabled LSP linter.
Resolves #2474
Diffstat (limited to 'doc/ale.txt')
-rw-r--r-- | doc/ale.txt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/ale.txt b/doc/ale.txt index 17f1dde6..8dcbea60 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -3191,6 +3191,24 @@ ale#linter#PreventLoading(filetype) *ale#linter#PreventLoading()* |runtimepath| for that filetype. This function can be called from vimrc or similar to prevent ALE from loading linters. + +ale#lsp_linter#SendRequest(buffer, linter_name, method, parameters, Callback) + *ale#lsp_linter#SendRequest()* + + Send a custom request to an LSP linter. + + `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. + + The function returns zero if the request is succesfully sent, non-zero + otherwise. + + ale#other_source#ShowResults(buffer, linter_name, loclist) *ale#other_source#ShowResults()* |