diff --git a/helix-term/src/keymap/default.rs b/helix-term/src/keymap/default.rs index 563b9bde..62f8dca3 100644 --- a/helix-term/src/keymap/default.rs +++ b/helix-term/src/keymap/default.rs @@ -10,6 +10,8 @@ pub fn default() -> HashMap { "j" | "down" => move_line_down, "k" | "up" => move_line_up, "l" | "right" => move_char_right, + "C-j" => half_page_down, + "C-k" => half_page_up, "t" => find_till_char, "f" => find_next_char, diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index c38733d0..d5154dde 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -154,7 +154,7 @@ impl Default for ExplorerConfig { fn default() -> Self { Self { style: ExplorerStyle::Tree, - position: ExplorerPosition::Overlay, + position: ExplorerPosition::Embed, column_width: 30, } } @@ -322,7 +322,16 @@ impl Default for StatusLineConfig { Self { left: vec![E::Mode, E::Spinner, E::FileName], center: vec![], - right: vec![E::Diagnostics, E::Selections, E::Position, E::FileEncoding], + right: vec![ + E::Diagnostics, + E::Selections, + E::Position, + E::PositionPercentage, + E::Separator, + E::FileEncoding, + E::FileLineEnding, + E::FileType, + ], separator: String::from("│"), } } @@ -418,7 +427,7 @@ impl std::ops::Deref for CursorShapeConfig { impl Default for CursorShapeConfig { fn default() -> Self { - Self([CursorKind::Block; 3]) + Self([CursorKind::Block, CursorKind::Underline, CursorKind::Bar]) } } @@ -591,7 +600,7 @@ pub struct IndentGuidesConfig { impl Default for IndentGuidesConfig { fn default() -> Self { Self { - render: false, + render: true, character: '│', } } @@ -609,7 +618,7 @@ impl Default for Config { vec!["sh".to_owned(), "-c".to_owned()] }, line_number: LineNumber::Absolute, - cursorline: false, + cursorline: true, gutters: vec![GutterType::Diagnostics, GutterType::LineNumbers], middle_click_paste: true, auto_pairs: AutoPairConfig::default(), @@ -625,11 +634,11 @@ impl Default for Config { search: SearchConfig::default(), lsp: LspConfig::default(), terminal: get_terminal_provider(), - rulers: Vec::new(), + rulers: vec![120], whitespace: WhitespaceConfig::default(), bufferline: BufferLine::default(), indent_guides: IndentGuidesConfig::default(), - color_modes: false, + color_modes: true, explorer: ExplorerConfig::default(), } } diff --git a/runtime/themes/dracula-purple.toml b/runtime/themes/dracula-purple.toml new file mode 100644 index 00000000..64c86a07 --- /dev/null +++ b/runtime/themes/dracula-purple.toml @@ -0,0 +1,80 @@ +# Author : Sam Sartor , Trivernis +# A port of https://github.com/bceskavich/dracula-at-night +"comment" = { fg = "comment" } +"constant" = { fg = "purple" } +"constant.character.escape" = { fg = "pink" } +"function" = { fg = "green" } +"keyword" = { fg = "pink" } +"operator" = { fg = "pink" } +"special" = { fg = "yellow" } +"punctuation" = { fg = "foreground" } +"string" = { fg = "yellow" } +"string.regexp" = { fg = "red" } +"tag" = { fg = "pink" } +"attribute" = { fg = "cyan" } +"type" = { fg = "cyan", modifiers = ["italic"] } +"type.enum.variant" = { fg = "foreground", modifiers = ["italic"] } +"variable" = { fg = "foreground" } +"variable.builtin" = { fg = "cyan", modifiers = ["italic"] } +"variable.parameter" = { fg ="orange", modifiers = ["italic"] } + +"diff.plus" = { fg = "green" } +"diff.delta" = { fg = "orange" } +"diff.minus" = { fg = "red" } + +"ui.background" = { fg = "foreground", bg = "background" } +"ui.cursor" = { fg = "background", bg = "orange", modifiers = ["dim"] } +"ui.cursor.match" = { fg = "green", modifiers = ["underlined"] } +"ui.cursor.primary" = { fg = "background", bg = "cyan", modifier = ["dim"] } +"ui.cursorline" = {bg = "background_dark"} +"ui.help" = { fg = "foreground", bg = "background_dark" } +"ui.linenr" = { fg = "comment" } +"ui.linenr.selected" = { fg = "foreground" } +"ui.menu" = { fg = "foreground", bg = "background_dark" } +"ui.menu.selected" = { fg = "cyan", bg = "background_dark" } +"ui.popup" = { fg = "foreground", bg = "background_dark" } +"ui.selection" = { fg = "background", bg = "purple", modifiers = ["dim"] } +"ui.selection.primary" = { fg = "background", bg = "pink" } +"ui.text" = { fg = "foreground" } +"ui.text.focus" = { fg = "cyan" } +"ui.window" = { fg = "foreground" } +"ui.virtual.ruler" = { bg = "ruler" } +"ui.virtual.indent-guide" = { fg = "ruler" } + +"ui.statusline" = { fg = "foreground", bg = "background_dark" } +"ui.statusline.inactive" = { fg = "comment", bg = "background_dark" } +"ui.statusline.normal" = { fg = "background_dark", bg = "purple"} +"ui.statusline.insert" = { fg = "background_dark", bg = "pink"} +"ui.statusline.select" = { fg = "background_dark", bg = "cyan"} + +"error" = { fg = "red" } +"warning" = { fg = "cyan" } + +"markup.heading" = { fg = "purple", modifiers = ["bold"] } +"markup.list" = "cyan" +"markup.bold" = { fg = "orange", modifiers = ["bold"] } +"markup.italic" = { fg = "yellow", modifiers = ["italic"] } +"markup.link.url" = "cyan" +"markup.link.text" = "pink" +"markup.quote" = { fg = "yellow", modifiers = ["italic"] } +"markup.raw" = { fg = "foreground" } + +"ui.explorer.file" = { fg = "foreground" } +"ui.explorer.dir" = { fg = "cyan" } +"ui.explorer.exe" = { fg = "foreground" } +"ui.explorer.focus" = { modifiers = ["reversed"] } +"ui.explorer.unfocus" = { bg = "comment" } + +[palette] +background = "#3A2A4D" +background_dark = "#2B1C3D" +foreground = "#f8f8f2" +ruler = "#453254" +comment = "#886C9C" +red = "#ff5555" +orange = "#ffb86c" +yellow = "#f1fa8c" +green = "#50fa7b" +purple = "#bd93f9" +cyan = "#8be9fd" +pink = "#ff79c6" \ No newline at end of file diff --git a/theme.toml b/theme.toml index ab7c995a..64c86a07 100644 --- a/theme.toml +++ b/theme.toml @@ -1,104 +1,80 @@ -attribute = "lilac" -keyword = "almond" -"keyword.directive" = "lilac" # -- preprocessor comments (#if in C) -namespace = "lilac" -punctuation = "lavender" -"punctuation.delimiter" = "lavender" -operator = "lilac" -special = "honey" -"variable.other.member" = "white" -variable = "lavender" -# variable = "almond" # TODO: metavariables only -# "variable.parameter" = { fg = "lavender", modifiers = ["underlined"] } -"variable.parameter" = { fg = "lavender" } -"variable.builtin" = "mint" -type = "white" -"type.builtin" = "white" # TODO: distinguish? -constructor = "lilac" -function = "white" -"function.macro" = "lilac" -"function.builtin" = "white" -tag = "almond" -comment = "sirocco" -constant = "white" -"constant.builtin" = "white" -string = "silver" -"constant.numeric" = "chamois" -"constant.character.escape" = "honey" -# used for lifetimes -label = "honey" +# Author : Sam Sartor , Trivernis +# A port of https://github.com/bceskavich/dracula-at-night +"comment" = { fg = "comment" } +"constant" = { fg = "purple" } +"constant.character.escape" = { fg = "pink" } +"function" = { fg = "green" } +"keyword" = { fg = "pink" } +"operator" = { fg = "pink" } +"special" = { fg = "yellow" } +"punctuation" = { fg = "foreground" } +"string" = { fg = "yellow" } +"string.regexp" = { fg = "red" } +"tag" = { fg = "pink" } +"attribute" = { fg = "cyan" } +"type" = { fg = "cyan", modifiers = ["italic"] } +"type.enum.variant" = { fg = "foreground", modifiers = ["italic"] } +"variable" = { fg = "foreground" } +"variable.builtin" = { fg = "cyan", modifiers = ["italic"] } +"variable.parameter" = { fg ="orange", modifiers = ["italic"] } -"markup.heading" = "lilac" -"markup.bold" = { modifiers = ["bold"] } -"markup.italic" = { modifiers = ["italic"] } -"markup.link.url" = { fg = "silver", modifiers = ["underlined"] } -"markup.link.text" = "almond" -"markup.raw" = "almond" +"diff.plus" = { fg = "green" } +"diff.delta" = { fg = "orange" } +"diff.minus" = { fg = "red" } -"diff.plus" = "#35bf86" -"diff.minus" = "#f22c86" -"diff.delta" = "#6f44f0" +"ui.background" = { fg = "foreground", bg = "background" } +"ui.cursor" = { fg = "background", bg = "orange", modifiers = ["dim"] } +"ui.cursor.match" = { fg = "green", modifiers = ["underlined"] } +"ui.cursor.primary" = { fg = "background", bg = "cyan", modifier = ["dim"] } +"ui.cursorline" = {bg = "background_dark"} +"ui.help" = { fg = "foreground", bg = "background_dark" } +"ui.linenr" = { fg = "comment" } +"ui.linenr.selected" = { fg = "foreground" } +"ui.menu" = { fg = "foreground", bg = "background_dark" } +"ui.menu.selected" = { fg = "cyan", bg = "background_dark" } +"ui.popup" = { fg = "foreground", bg = "background_dark" } +"ui.selection" = { fg = "background", bg = "purple", modifiers = ["dim"] } +"ui.selection.primary" = { fg = "background", bg = "pink" } +"ui.text" = { fg = "foreground" } +"ui.text.focus" = { fg = "cyan" } +"ui.window" = { fg = "foreground" } +"ui.virtual.ruler" = { bg = "ruler" } +"ui.virtual.indent-guide" = { fg = "ruler" } -# TODO: diferentiate doc comment -# concat (ERROR) @error.syntax and "MISSING ;" selectors for errors +"ui.statusline" = { fg = "foreground", bg = "background_dark" } +"ui.statusline.inactive" = { fg = "comment", bg = "background_dark" } +"ui.statusline.normal" = { fg = "background_dark", bg = "purple"} +"ui.statusline.insert" = { fg = "background_dark", bg = "pink"} +"ui.statusline.select" = { fg = "background_dark", bg = "cyan"} -"ui.background" = { bg = "midnight" } -"ui.background.separator" = { fg = "comet" } -"ui.linenr" = { fg = "comet" } -"ui.linenr.selected" = { fg = "lilac" } -"ui.statusline" = { fg = "lilac", bg = "revolver" } -"ui.statusline.inactive" = { fg = "lavender", bg = "revolver" } -"ui.popup" = { bg = "revolver" } -"ui.window" = { fg = "bossanova" } -"ui.help" = { bg = "#7958DC", fg = "#171452" } +"error" = { fg = "red" } +"warning" = { fg = "cyan" } -"ui.text" = { fg = "lavender" } -"ui.text.focus" = { fg = "white" } -"ui.virtual" = { fg = "comet" } +"markup.heading" = { fg = "purple", modifiers = ["bold"] } +"markup.list" = "cyan" +"markup.bold" = { fg = "orange", modifiers = ["bold"] } +"markup.italic" = { fg = "yellow", modifiers = ["italic"] } +"markup.link.url" = "cyan" +"markup.link.text" = "pink" +"markup.quote" = { fg = "yellow", modifiers = ["italic"] } +"markup.raw" = { fg = "foreground" } -"ui.virtual.indent-guide" = { fg = "comet" } - -"ui.selection" = { bg = "#540099" } -"ui.selection.primary" = { bg = "#540099" } -# TODO: namespace ui.cursor as ui.selection.cursor? -"ui.cursor.select" = { bg = "delta" } -"ui.cursor.insert" = { bg = "white" } -"ui.cursor.match" = { fg = "#212121", bg = "#6C6999" } -"ui.cursor" = { modifiers = ["reversed"] } -"ui.cursorline.primary" = { bg = "bossanova" } -"ui.highlight" = { bg = "bossanova" } - -"ui.menu" = { fg = "lavender", bg = "revolver" } -"ui.menu.selected" = { fg = "revolver", bg = "white" } -"ui.menu.scroll" = { fg = "lavender", bg = "comet" } - -diagnostic = { modifiers = ["underlined"] } -# "diagnostic.hint" = { fg = "revolver", bg = "lilac" } -# "diagnostic.info" = { fg = "revolver", bg = "lavender" } -# "diagnostic.warning" = { fg = "revolver", bg = "honey" } -# "diagnostic.error" = { fg = "revolver", bg = "apricot" } - -warning = "lightning" -error = "apricot" -info = "delta" -hint = "silver" +"ui.explorer.file" = { fg = "foreground" } +"ui.explorer.dir" = { fg = "cyan" } +"ui.explorer.exe" = { fg = "foreground" } +"ui.explorer.focus" = { modifiers = ["reversed"] } +"ui.explorer.unfocus" = { bg = "comment" } [palette] -white = "#ffffff" -lilac = "#dbbfef" -lavender = "#a4a0e8" -comet = "#5a5977" -bossanova = "#452859" -midnight = "#3b224c" -revolver = "#281733" - -silver = "#cccccc" -sirocco = "#697C81" -mint = "#9ff28f" -almond = "#eccdba" -chamois = "#E8DCA0" -honey = "#efba5d" - -apricot = "#f47868" -lightning = "#ffcd1c" -delta = "#6F44F0" +background = "#3A2A4D" +background_dark = "#2B1C3D" +foreground = "#f8f8f2" +ruler = "#453254" +comment = "#886C9C" +red = "#ff5555" +orange = "#ffb86c" +yellow = "#f1fa8c" +green = "#50fa7b" +purple = "#bd93f9" +cyan = "#8be9fd" +pink = "#ff79c6" \ No newline at end of file