Skip to main content

EditorExtras

Struct EditorExtras 

Source
pub struct EditorExtras { /* private fields */ }
Expand description

What a code editor adds on top of multi-line text: language features.

Trait Implementations§

Source§

impl Default for EditorExtras

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl InputExtras for EditorExtras

What a code editor exposes to the renderer. See crate::input::InputExtras.

Source§

fn decoration_layers(&self) -> Vec<&[TextDecoration]>

Decoration ranges to paint, innermost collection first.
Source§

fn range_decorations(&self, ranges: &[Range<usize>]) -> Vec<&RangeDecoration>

Geometric decorations intersecting visible, non-folded buffer spans.
Source§

fn gutter_decorations_width(&self) -> Option<Pixels>

Return the gutter decoration strip width, or None when no gutter collection exists.
Source§

fn gutter_decorations(&self, range: Range<usize>) -> Vec<&GutterDecoration>

Return the gutter decorations that touch a UTF-8 byte range, in paint order. An empty decoration touches the range when it lies inside it.
Source§

fn overview_ruler_decorations(&self) -> Vec<&OverviewRulerDecoration>

Return all overview ruler decorations in paint order.
Source§

fn overview_ruler_revision(&self) -> u64

A number that changes whenever an overview ruler collection is created, replaced, extended, cleared or released.
Source§

fn semantic_token_styles( &self, text: &Rope, range: &Range<usize>, resolver: &dyn HighlightStyleResolver, ) -> Vec<(Range<usize>, HighlightStyle)>

Semantic-token styles for a visible range, when an LSP supplies them.
Source§

fn document_color_swatches( &self, text: &Rope, range: &Range<usize>, ) -> Vec<(Range<usize>, Hsla)>

Document colours to paint as swatches, when an LSP supplies them.
Source§

fn hover_symbol_range(&self) -> Option<Range<usize>>

The symbol range the hover popover is anchored to.
Source§

fn inline_completion_item(&self) -> Option<&InlineCompletionItem>

The inline completion to paint as ghost text.
Source§

fn context_menu_capabilities(&self) -> (bool, bool)

What this mode can offer its context menu: go-to-definition, code actions.

Auto Trait Implementations§

§

impl !RefUnwindSafe for EditorExtras

§

impl !Send for EditorExtras

§

impl !Sync for EditorExtras

§

impl !UnwindSafe for EditorExtras

§

impl Forget for EditorExtras

§

impl Freeze for EditorExtras
where *const RcInner<dyn CompletionProvider> is !null: Freeze, PhantomData<RcInner<dyn CompletionProvider>>: Freeze, *const u8 is !null: Freeze, PhantomData<Rc<dyn CodeActionProvider>>: Freeze, *const RcInner<dyn HoverProvider> is !null: Freeze, PhantomData<RcInner<dyn HoverProvider>>: Freeze, *const RcInner<dyn DefinitionProvider> is !null: Freeze, PhantomData<RcInner<dyn DefinitionProvider>>: Freeze, *const RcInner<dyn DocumentColorProvider> is !null: Freeze, PhantomData<RcInner<dyn DocumentColorProvider>>: Freeze, *const RcInner<dyn DocumentRangeSemanticTokensProvider> is !null: Freeze, PhantomData<RcInner<dyn DocumentRangeSemanticTokensProvider>>: Freeze, *const RcInner<dyn Fn(&ShowDocumentParams, &mut Window, &mut App) -> bool> is !null: Freeze, PhantomData<RcInner<dyn Fn(&ShowDocumentParams, &mut Window, &mut App) -> bool>>: Freeze, *const RcInner<dyn Fn(&str, &CompletionItem) -> Vec<Range<usize>>> is !null: Freeze, PhantomData<RcInner<dyn Fn(&str, &CompletionItem) -> Vec<Range<usize>>>>: Freeze, PhantomData<(Range, Hsla)>: Freeze, PhantomData<(Range, SharedString)>: Freeze, *const ErrorImpl is !null: Freeze, *const () is !null: Freeze, PhantomData<(Result<(), Error>, RunnableMeta)>: Freeze, *const Task<Box<dyn Any + Sync + Send>> is !null: Freeze, PhantomData<Task<Box<dyn Any + Sync + Send>>>: Freeze, PhantomData<fn() -> Result<(), Error>>: Freeze, *const ArcInner<Mutex<RawMutex, RendezvousState<Result<(), Error>>>> is !null: Freeze, PhantomData<ArcInner<Mutex<RawMutex, RendezvousState<Result<(), Error>>>>>: Freeze, PhantomData<((), RunnableMeta)>: Freeze, PhantomData<fn()>: Freeze, *const ArcInner<Mutex<RawMutex, RendezvousState<()>>> is !null: Freeze, PhantomData<ArcInner<Mutex<RawMutex, RendezvousState<()>>>>: Freeze, *const LeafNode<DecorationCollectionId, DecorationEntries<TextDecoration>> is !null: Freeze, PhantomData<(Owned, LeafOrInternal)>: Freeze, PhantomData<Box<(DecorationCollectionId, DecorationEntries<TextDecoration>)>>: Freeze, *const LeafNode<DecorationCollectionId, DecorationEntries<RangeDecoration>> is !null: Freeze, PhantomData<Box<(DecorationCollectionId, DecorationEntries<RangeDecoration>)>>: Freeze, *const LeafNode<DecorationCollectionId, DecorationEntries<GutterDecoration>> is !null: Freeze, PhantomData<Box<(DecorationCollectionId, DecorationEntries<GutterDecoration>)>>: Freeze, *const LeafNode<DecorationCollectionId, DecorationEntries<OverviewRulerDecoration>> is !null: Freeze, PhantomData<Box<(DecorationCollectionId, DecorationEntries<OverviewRulerDecoration>)>>: Freeze, PhantomData<u8>: Freeze, PhantomData<Value>: Freeze, PhantomData<InlineCompletionItem>: Freeze, PhantomData<(Result<InlineCompletionResponse, Error>, RunnableMeta)>: Freeze, PhantomData<fn() -> Result<InlineCompletionResponse, Error>>: Freeze, *const ArcInner<Mutex<RawMutex, RendezvousState<Result<InlineCompletionResponse, Error>>>> is !null: Freeze, PhantomData<ArcInner<Mutex<RawMutex, RendezvousState<Result<InlineCompletionResponse, Error>>>>>: Freeze, PhantomData<CompletionItem>: Freeze, PhantomData<CodeActionItem>: Freeze, PhantomData<MarkedString>: Freeze, *const RcInner<Vec<LocationLink>> is !null: Freeze, PhantomData<RcInner<Vec<LocationLink>>>: Freeze,

§

impl Move for EditorExtras

§

impl Unpin for EditorExtras
where Rc<dyn CompletionProvider>: Unpin, *const u8 is !null: Unpin, Rc<dyn CodeActionProvider>: Unpin, Rc<dyn HoverProvider>: Unpin, Rc<dyn DefinitionProvider>: Unpin, Rc<dyn DocumentColorProvider>: Unpin, Rc<dyn DocumentRangeSemanticTokensProvider>: Unpin, Rc<dyn Fn(&ShowDocumentParams, &mut Window, &mut App) -> bool>: Unpin, Rc<dyn Fn(&str, &CompletionItem) -> Vec<Range<usize>>>: Unpin, &'static str: Unpin, Arc<str>: Unpin, *const ErrorImpl is !null: Unpin, Task<Result<(), Error>, RunnableMeta>: Unpin, Box<Task<Box<dyn Any + Sync + Send>>>: Unpin, Arc<Mutex<RawMutex, RendezvousState<Result<(), Error>>>>: Unpin, Task<(), RunnableMeta>: Unpin, Arc<Mutex<RawMutex, RendezvousState<()>>>: Unpin, *const LeafNode<DecorationCollectionId, DecorationEntries<TextDecoration>> is !null: Unpin, Box<(DecorationCollectionId, DecorationEntries<TextDecoration>)>: Unpin, *const LeafNode<DecorationCollectionId, DecorationEntries<RangeDecoration>> is !null: Unpin, Box<(DecorationCollectionId, DecorationEntries<RangeDecoration>)>: Unpin, *const LeafNode<DecorationCollectionId, DecorationEntries<GutterDecoration>> is !null: Unpin, Box<(DecorationCollectionId, DecorationEntries<GutterDecoration>)>: Unpin, *const LeafNode<DecorationCollectionId, DecorationEntries<OverviewRulerDecoration>> is !null: Unpin, Box<(DecorationCollectionId, DecorationEntries<OverviewRulerDecoration>)>: Unpin, Task<Result<InlineCompletionResponse, Error>, RunnableMeta>: Unpin, Arc<Mutex<RawMutex, RendezvousState<Result<InlineCompletionResponse, Error>>>>: Unpin, String: Unpin, Capped: Unpin, NonZero<u32>: Unpin, Rc<Vec<LocationLink>>: Unpin,

§

impl UnsafeUnpin for EditorExtras
where *const RcInner<dyn CompletionProvider> is !null: UnsafeUnpin, PhantomData<RcInner<dyn CompletionProvider>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<Rc<dyn CodeActionProvider>>: UnsafeUnpin, *const RcInner<dyn HoverProvider> is !null: UnsafeUnpin, PhantomData<RcInner<dyn HoverProvider>>: UnsafeUnpin, *const RcInner<dyn DefinitionProvider> is !null: UnsafeUnpin, PhantomData<RcInner<dyn DefinitionProvider>>: UnsafeUnpin, *const RcInner<dyn DocumentColorProvider> is !null: UnsafeUnpin, PhantomData<RcInner<dyn DocumentColorProvider>>: UnsafeUnpin, *const RcInner<dyn DocumentRangeSemanticTokensProvider> is !null: UnsafeUnpin, PhantomData<RcInner<dyn DocumentRangeSemanticTokensProvider>>: UnsafeUnpin, *const RcInner<dyn Fn(&ShowDocumentParams, &mut Window, &mut App) -> bool> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&ShowDocumentParams, &mut Window, &mut App) -> bool>>: UnsafeUnpin, *const RcInner<dyn Fn(&str, &CompletionItem) -> Vec<Range<usize>>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&str, &CompletionItem) -> Vec<Range<usize>>>>: UnsafeUnpin, PhantomData<(Range, Hsla)>: UnsafeUnpin, PhantomData<(Range, SharedString)>: UnsafeUnpin, *const ErrorImpl is !null: UnsafeUnpin, *const () is !null: UnsafeUnpin, PhantomData<(Result<(), Error>, RunnableMeta)>: UnsafeUnpin, *const Task<Box<dyn Any + Sync + Send>> is !null: UnsafeUnpin, PhantomData<Task<Box<dyn Any + Sync + Send>>>: UnsafeUnpin, PhantomData<fn() -> Result<(), Error>>: UnsafeUnpin, *const ArcInner<Mutex<RawMutex, RendezvousState<Result<(), Error>>>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<RawMutex, RendezvousState<Result<(), Error>>>>>: UnsafeUnpin, PhantomData<((), RunnableMeta)>: UnsafeUnpin, PhantomData<fn()>: UnsafeUnpin, *const ArcInner<Mutex<RawMutex, RendezvousState<()>>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<RawMutex, RendezvousState<()>>>>: UnsafeUnpin, *const LeafNode<DecorationCollectionId, DecorationEntries<TextDecoration>> is !null: UnsafeUnpin, PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin, PhantomData<Box<(DecorationCollectionId, DecorationEntries<TextDecoration>)>>: UnsafeUnpin, *const LeafNode<DecorationCollectionId, DecorationEntries<RangeDecoration>> is !null: UnsafeUnpin, PhantomData<Box<(DecorationCollectionId, DecorationEntries<RangeDecoration>)>>: UnsafeUnpin, *const LeafNode<DecorationCollectionId, DecorationEntries<GutterDecoration>> is !null: UnsafeUnpin, PhantomData<Box<(DecorationCollectionId, DecorationEntries<GutterDecoration>)>>: UnsafeUnpin, *const LeafNode<DecorationCollectionId, DecorationEntries<OverviewRulerDecoration>> is !null: UnsafeUnpin, PhantomData<Box<(DecorationCollectionId, DecorationEntries<OverviewRulerDecoration>)>>: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, PhantomData<Value>: UnsafeUnpin, PhantomData<InlineCompletionItem>: UnsafeUnpin, PhantomData<(Result<InlineCompletionResponse, Error>, RunnableMeta)>: UnsafeUnpin, PhantomData<fn() -> Result<InlineCompletionResponse, Error>>: UnsafeUnpin, *const ArcInner<Mutex<RawMutex, RendezvousState<Result<InlineCompletionResponse, Error>>>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<RawMutex, RendezvousState<Result<InlineCompletionResponse, Error>>>>>: UnsafeUnpin, PhantomData<CompletionItem>: UnsafeUnpin, PhantomData<CodeActionItem>: UnsafeUnpin, PhantomData<MarkedString>: UnsafeUnpin, *const RcInner<Vec<LocationLink>> is !null: UnsafeUnpin, PhantomData<RcInner<Vec<LocationLink>>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> NoneValue for T
where T: Default,

Source§

type NoneType = T

Source§

fn null_value() -> T

The none-equivalent value.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more