Struct lsp::types::ColorPresentation [−][src]
pub struct ColorPresentation { pub label: String, pub text_edit: Option<TextEdit>, pub additional_text_edits: Option<Vec<TextEdit>>, }
Fields
label: String
The label of this color presentation. It will be shown on the color picker header. By default this is also the text that is inserted when selecting this color presentation.
text_edit: Option<TextEdit>
An edit which is applied to a document when selecting
this presentation for the color. When falsy
the label
is used.
additional_text_edits: Option<Vec<TextEdit>>
An optional array of additional text edits that are applied when selecting this color presentation. Edits must not overlap with the main edit nor with themselves.
Methods
impl ColorPresentation
[src]
impl ColorPresentation
The Color namespace provides helper functions to work with ColorPresentation literals.
pub fn create(
label: String,
text_edit: Option<TextEdit>,
additional_text_edits: Option<Vec<TextEdit>>
) -> Self
[src]
pub fn create(
label: String,
text_edit: Option<TextEdit>,
additional_text_edits: Option<Vec<TextEdit>>
) -> Self
Creates a new ColorInformation literal.
Trait Implementations
impl Debug for ColorPresentation
[src]
impl Debug for ColorPresentation
Auto Trait Implementations
impl Send for ColorPresentation
impl Send for ColorPresentation
impl Sync for ColorPresentation
impl Sync for ColorPresentation