mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-10 13:32:34 +08:00
Support custom LSP notifications
Allow to send custom notification mesages, that expect no response from the server.
This commit is contained in:
30
doc/ale.txt
30
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)
|
||||
|
||||
Reference in New Issue
Block a user