diff --git a/docs/index.html b/docs/index.html index 673d25a529..8d00635e91 100644 --- a/docs/index.html +++ b/docs/index.html @@ -205,6 +205,18 @@
Long poll for asynchronous server messages.
+ +The server needs to react to a number of client events in order to
- provide things like diagnotics and to handler downstream server states
+ provide things like diagnostics and to handle downstream server states
etc. The client must inform the server of the following events,
populating the event name in the event_name
property:
BufferUnload
(optional)
+ BufferUnload
Call when the user closes a buffer that was previously known to be
- open.BufferVisit
(optional)
Call when the user focusses on a buffer that is already known.
Note: The ultisnips_snippets
property is optional when firing
@@ -1164,9 +1176,9 @@ For filetypes not natively supported by ycmd, clients can often
determine a set of suitable candidate completion suggestions by other
- means. In Vim this is is typically from the omnifunc
and other
- clients will have equivalents.
This endpoint allows clients to use ycmd''s powerful filtering and
+ means. In Vim this is typically from the omnifunc
and other clients
+ will have equivalents.
This endpoint allows clients to use ycmd's powerful filtering and ranking capabilities (including longest-common-subsequence and word-boundary-character ranking) on arbitrary sets of identifiers.
NOTE: This API is primarily intended for use when subclassing the @@ -1558,6 +1570,127 @@
Return asynchronous messages from the server. This request is + used by clients in a "long poll" style, and does not return until + either:
+true
is returned and
+ the client should re-send this request, orreceive_messages
requests, in which case false
is
+ returned, and the client should only send the request again when
+ something substantial changes such as a new file type is opened, or
+ the completer server is manually restarted.The following types of event are delivered asynchronously for certain + filetypes:
+This message is optional. Clients do not require to implement this + method, but it is strongly recommended for certain languages to offer + the best user experience.
+ +The context data, including the current cursor position, and details + of dirty buffers.
+ ++
+ +Messages are ready, the request timed out, or the request + is not supported and should not be retried.
+The response may be one of MessagePollResponse
or
+ MessagesList
.
[
{
"message": "Initializing: 19% complete"
},
{
"message": "Initializing: Done."
},
{
"diagonostics": {
"diagnotics": [
{
"fixit_available": false,
"kind": "WARNING",
"location": {
"column_num": 11,
"filepath": "/file",
"line_num": 10
},
"location_extent": {
"end": {
"column_num": 11,
"filepath": "/file",
"line_num": 10
},
"start": {
"column_num": 11,
"filepath": "/file",
"line_num": 10
}
},
"ranges": [
{
"end": {
"column_num": 20,
"filepath": "/file",
"line_num": 10
},
"start": {
"column_num": 11,
"filepath": "/file",
"line_num": 10
}
}
],
"text": "Very naughty code!"
},
{
"fixit_available": true,
"kind": "ERROR",
"location": {
"column_num": 11,
"filepath": "/file",
"line_num": 19
},
"location_extent": {
"end": {
"column_num": 11,
"filepath": "/file",
"line_num": 19
},
"start": {
"column_num": 11,
"filepath": "/file",
"line_num": 19
}
},
"ranges": [
{
"end": {
"column_num": 20,
"filepath": "/file",
"line_num": 19
},
"start": {
"column_num": 11,
"filepath": "/file",
"line_num": 19
}
}
],
"text": "Very dangerous code!"
}
],
"filepath": "/file"
}
}
]
+ An error occurred.
+ +command_arguments
property.
- The list of available subcommands for a particular semantic compelter +
The list of available subcommands for a particular semantic completer
can be queried using the /defined_subcommands
endpoint.
Subcommands may return one of a number of actions, depending on the type of command. The following types of response are returned:
message
property. These
+ type of the response is an object with a message
property. These
messages are typically only a single line and can be displayed in
a message-box or similarly echoed in a status bar or equivalent.The type of diagnostic being reported. Typically semantic engines will - differentiate between warnings and fatal errors.
+ differentiate between warnings and fatal errors. Informational and + hint messages should be treated as warnings where the client does not + differentiate.Diagnostics for a particular file. Note: diagnostics may be supplied for + any arbitrary file. The client is responsible for displaying the + diagnostics in an appropriate manner. The server supplies an empty set of + diagnostics to clear the diagnostics for a particular file.
+ +The entire contents of the buffer encoded as UTF-8
+The entire contents of the buffer encoded as UTF-8.
An object mapping whose keys are the absolute paths to the - files and whose values are data relating to dirty buffers.
+ files and whose values are data relating unsaved buffers. +An unsaved buffer is any file that is opened in the editor and has been + changed without saving the contents to disk.
+The file referred to in the request filepath
entry must always be
+ included. For most requests this is the user's current buffer, but may
+ be any buffer (e.g. in the case of closing a buffer which is not current).
When a file is closed in the editor, a BufferUnload
event should be sent
+ and the file should not be included in further FileDataMap
entries
+ until (or unless) it is opened and changed again.
An object containing a single asynchronous message.
+ It is either a SimpleDisplayMessage
or a DiagnosticsMessage
If present, this object is a SimpleDisplayMessage
If present, this object is a DiagnosticsMessage
A list of messages in the sequence they should be handled.
+The type of message in each item is determined by the property name:
+message
is a simple display message where
+ the property value is the message.diagnostics
contains diagnotics for a
+ project file. The value of the property is described below.When true
is returned, the request timed out (meaning no
+ messages were returned in the poll period). Clients should
+ send another receive_messages
request immediately.
When false
is returned, the server determined that message
+ polling should abort for the current file type context. Clients
+ should not re-send this request until the filetype being edited
+ changes or the server is restarted.
A message for display to the user. Note: the message should be displayed + discreetly (such as in a status bar) and should not block the user or + interrupt them.
+ +