Skip to content

Commit

Permalink
Update initial .md description
Browse files Browse the repository at this point in the history
  • Loading branch information
c-claeys committed Jun 29, 2023
1 parent c944fa8 commit a7b9e03
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions _specifications/lsp/3.18/language/inlineCompletion.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,15 @@

> *Since version 3.18.0*
The inline completion request is sent from the client to the server to compute
inline completions for a given text document either explicitly by a user gesture
or implicitly when typing. Inline completion items are presented directly in the
editor with the user's text. The portion of the inline completion item's text
that isn't in the document receives a slightly different UI treatment e.g. lower
contrast. With only one item being displayed at a time, the server may use this
feature for visible edits where it is relatively confident the user would like
this edit in particular. The context property also provides allowance for this
feature to work *with* completions presented in the IntelliSense interface.

When multiple inline completion items are returned, the client may decide
whether the user can cycle through them or if they, along with their
`filterText`, are merely for filtering if the user continues to type without yet
accepting the inline completion item.

Clients may choose to send information about the user's current completion
selection via context if completions are visible at the same time. In this case,
returned inline completions should extend the text of the provided completion.
The inline completion request is sent from the client to the server to compute inline completions for a given text document either explicitly by a user gesture or implicitly when typing.

Inline completion items usually complete bigger portions of text (e.g. whole methods, ...) and in contrast to completions items can complete code that might be syntactically or semantically incorrect.

Due to this inline completion items are usually not suited to be presented in normal code completion widgets like a list of items. One possible approach can be to present the information inline in the editor with lower contrast.

When multiple inline completion items are returned, the client may decide whether the user can cycle through them or if they, along with their `filterText`, are merely for filtering if the user continues to type without yet accepting the inline completion item.

Clients may choose to send information about the user's current completion selection via context if completions are visible at the same time. In this case, returned inline completions should extend the text of the provided completion.


_Client Capability_:
Expand Down

0 comments on commit a7b9e03

Please sign in to comment.