pub enum IndentMethod {
None,
Keep,
Syntax,
}Expand description
:set indentmethod=.... Which source decides where a newly
created line starts.
A cascade with a named floor, in the shape of
crate::FoldMethod — and for the same reason, which is a
property rather than a resemblance: both name a structural
source that can be unavailable at the moment it is asked (no
query for this language, a parse that has not landed, a grammar
that failed to load). Degrading to documented vim behaviour
beats a silent wrong answer, and it gives a user whose language
has a bad query a one-word escape hatch.
Keep is not merely Syntax’s fallback — it is a setting some
users prefer outright, so the fallback path is exercised by
choice rather than only by failure.
Variants§
None
New lines start at column 0.
Keep
Copy the previous non-blank line’s indent (vim’s
autoindent).
Syntax
Tree-sitter indents.scm, falling back to Keep when the
language has no query or the parse is unavailable.
Implementations§
Trait Implementations§
Source§impl Clone for IndentMethod
impl Clone for IndentMethod
Source§fn clone(&self) -> IndentMethod
fn clone(&self) -> IndentMethod
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for IndentMethod
Source§impl Debug for IndentMethod
impl Debug for IndentMethod
Source§impl Default for IndentMethod
impl Default for IndentMethod
Source§fn default() -> IndentMethod
fn default() -> IndentMethod
impl Eq for IndentMethod
Source§impl PartialEq for IndentMethod
impl PartialEq for IndentMethod
impl StructuralPartialEq for IndentMethod
Auto Trait Implementations§
impl Freeze for IndentMethod
impl RefUnwindSafe for IndentMethod
impl Send for IndentMethod
impl Sync for IndentMethod
impl Unpin for IndentMethod
impl UnsafeUnpin for IndentMethod
impl UnwindSafe for IndentMethod
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.