pub struct Snippet {
pub name: String,
pub prefixes: Vec<String>,
pub body: SnippetBody,
pub description: Option<String>,
pub scope: String,
}Expand description
One snippet entry. prefixes may have multiple entries
(TextMate JSON "prefix": ["loop", "fr"] form). Body is
pre-parsed; the load path runs the parser once at startup.
Fields§
§name: String§prefixes: Vec<String>§body: SnippetBody§description: Option<String>§scope: StringComma-separated source-scope filter (e.g.
"source.rust,source.markdown"). Empty = all-language.
Host maps source.<lang> to the buffer’s tree-sitter
language at filter time.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Snippet
impl RefUnwindSafe for Snippet
impl Send for Snippet
impl Sync for Snippet
impl Unpin for Snippet
impl UnsafeUnpin for Snippet
impl UnwindSafe for Snippet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more