pub enum FileFormatKind {
Show 18 variants
Rust,
Markdown,
Yaml,
Json,
JsonStringify,
Jsonc,
Toml,
JavaScript,
TypeScript,
TypeScriptReact,
Css,
Scss,
Less,
Html,
Vue,
PlainText,
PlainTextPreserveTabs,
Unsupported,
}Expand description
Supported text formatting strategy resolved from a file’s name or extension.
Variants§
Rust
Rust source file formatted via derive sorting and cargo fmt.
Markdown
Markdown file formatted with VS Code Prettier 3.7.4 alignment.
Yaml
YAML / YML file formatted with VS Code Prettier 3.7.4 alignment.
Json
JSON file formatted with Prettier 3.7.4 json parser (objectWrap: "preserve", comments allowed, no trailing commas).
JsonStringify
JSON manifest (package.json, package-lock.json, composer.json) formatted with Prettier 3.7.4 json-stringify parser.
Jsonc
JSONC file (.jsonc, .cjson) formatted with Prettier 3.7.4 jsonc parser (comments and trailing commas preserved).
Toml
TOML file formatted with VS Code tamasfe.even-better-toml (Taplo 0.7.0) defaults.
JavaScript
JavaScript file (.js, .mjs, .cjs, .wxs) formatted with Prettier 3.7.4.
TypeScript
TypeScript file (.ts, .mts, .cts) formatted with Prettier 3.7.4.
TypeScriptReact
TypeScript JSX file (.tsx) formatted with Prettier 3.7.4.
Css
CSS stylesheet (.css, .wxss) formatted with Prettier 3.7.4.
Scss
SCSS stylesheet (.scss) formatted with Prettier 3.7.4.
Less
Less stylesheet (.less) formatted with Prettier 3.7.4.
Html
HTML document (.html, .htm) formatted with Prettier 3.7.4.
Vue
Vue Single-File Component (.vue) formatted with Prettier 3.7.4.
PlainText
Generic UTF-8 text/script/config file left verbatim unchanged to match VS Code save behavior.
PlainTextPreserveTabs
Generic UTF-8 text file with syntactically meaningful leading tabs (for example Makefile), left verbatim unchanged to match VS Code save behavior.
Unsupported
Binary, lockfile, certificate, or unsupported file left untouched.
Trait Implementations§
Source§impl Clone for FileFormatKind
impl Clone for FileFormatKind
impl Copy for FileFormatKind
Source§impl Debug for FileFormatKind
impl Debug for FileFormatKind
impl Eq for FileFormatKind
Source§impl PartialEq for FileFormatKind
impl PartialEq for FileFormatKind
impl StructuralPartialEq for FileFormatKind
Auto Trait Implementations§
impl Forget for FileFormatKind
impl Freeze for FileFormatKind
impl Move for FileFormatKind
impl RefUnwindSafe for FileFormatKind
impl Send for FileFormatKind
impl Sync for FileFormatKind
impl Unpin for FileFormatKind
impl UnsafeUnpin for FileFormatKind
impl UnwindSafe for FileFormatKind
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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