pub struct CompletionList {
pub is_incomplete: bool,
pub item_defaults: Option<CompletionItemDefaults>,
pub apply_kind: Option<CompletionItemApplyKinds>,
pub items: Vec<CompletionItem>,
}Expand description
Represents a collection of completion items to be presented in the editor.
Fields§
§is_incomplete: boolThis list it not complete. Further typing results in recomputing this list.
Recomputed lists have all their items replaced (not appended) in the incomplete completion sessions.
item_defaults: Option<CompletionItemDefaults>In many cases the items of an actual completion result share the same
value for properties like commitCharacters or the range of a text
edit. A completion list can therefore define item defaults which will
be used if a completion item itself doesn’t specify the value.
If a completion list specifies a default value and a completion item
also specifies a corresponding value, the rules for combining these are
defined by applyKinds (if the client supports it), defaulting to
ApplyKind.Replace.
Servers are only allowed to return default values if the client
signals support for this via the completionList.itemDefaults
capability.
@since 3.17.0
apply_kind: Option<CompletionItemApplyKinds>Specifies how fields from a completion item should be combined with those
from completionList.itemDefaults.
If unspecified, all fields will be treated as ApplyKind.Replace.
If a field’s value is ApplyKind.Replace, the value from a completion item
(if provided and not null) will always be used instead of the value
from completionItem.itemDefaults.
If a field’s value is ApplyKind.Merge, the values will be merged using the rules defined against each field below.
Servers are only allowed to return applyKind if the client
signals support for this via the completionList.applyKindSupport
capability.
@since 3.18.0
items: Vec<CompletionItem>The completion items.
Implementations§
Source§impl CompletionList
impl CompletionList
pub const fn new( is_incomplete: bool, item_defaults: Option<CompletionItemDefaults>, apply_kind: Option<CompletionItemApplyKinds>, items: Vec<CompletionItem>, ) -> Self
Trait Implementations§
Source§impl Clone for CompletionList
impl Clone for CompletionList
Source§fn clone(&self) -> CompletionList
fn clone(&self) -> CompletionList
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CompletionList
impl Debug for CompletionList
Source§impl Default for CompletionList
impl Default for CompletionList
Source§fn default() -> CompletionList
fn default() -> CompletionList
Source§impl<'de> Deserialize<'de> for CompletionList
impl<'de> Deserialize<'de> for CompletionList
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<CompletionList> for CompletionResponse
impl From<CompletionList> for CompletionResponse
Source§fn from(v: CompletionList) -> Self
fn from(v: CompletionList) -> Self
Source§impl PartialEq for CompletionList
impl PartialEq for CompletionList
Source§fn eq(&self, other: &CompletionList) -> bool
fn eq(&self, other: &CompletionList) -> bool
self and other values to be equal, and is used by ==.