summaryrefslogtreecommitdiff
path: root/helix-view/src/editor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r--helix-view/src/editor.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 7af28ccc..5a81cb5d 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -727,7 +727,7 @@ pub struct WhitespaceCharacters {
impl Default for WhitespaceCharacters {
fn default() -> Self {
Self {
- space: '·', // U+00B7
+ space: '·', // U+00B7
nbsp: '⍽', // U+237D
tab: '→', // U+2192
newline: '⏎', // U+23CE
@@ -755,12 +755,13 @@ impl Default for IndentGuidesConfig {
}
/// Line ending configuration.
-#[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Default, Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum LineEndingConfig {
/// The platform's native line ending.
///
/// `crlf` on Windows, otherwise `lf`.
+ #[default]
Native,
/// Line feed.
LF,
@@ -777,12 +778,6 @@ pub enum LineEndingConfig {
Nel,
}
-impl Default for LineEndingConfig {
- fn default() -> Self {
- LineEndingConfig::Native
- }
-}
-
impl From<LineEndingConfig> for LineEnding {
fn from(line_ending: LineEndingConfig) -> Self {
match line_ending {