From bd1585c010ebee8dc152bc024bae5185ea088c5d Mon Sep 17 00:00:00 2001 From: Mo8it Date: Tue, 8 Nov 2022 17:56:02 +0100 Subject: [PATCH] Done initial helix config --- .config/helix/config.toml | 34 +++++++++++++++++++++++++++++++++- .config/helix/languages.toml | 25 +++++++++++++++++-------- 2 files changed, 50 insertions(+), 9 deletions(-) diff --git a/.config/helix/config.toml b/.config/helix/config.toml index 20b8379..1de0972 100644 --- a/.config/helix/config.toml +++ b/.config/helix/config.toml @@ -3,9 +3,10 @@ theme = "onedark" [editor] mouse = false shell = ["fish", "-c"] -line-number = "relative" cursorline = true true-color = true +bufferline = "multiple" +color-modes = true [editor.lsp] display-messages = true @@ -15,5 +16,36 @@ insert = "bar" normal = "block" select = "underline" +[editor.whitespace.render] +space = "none" +tab = "none" +newline = "all" + [editor.indent-guides] render = true + +[keys.normal] +p = "paste_clipboard_after" +P = "paste_clipboard_before" +y = "yank_joined_to_clipboard" +D = ["yank_main_selection_to_clipboard", "delete_selection"] +C-d = ["extend_to_line_bounds", "delete_selection"] +V = "extend_to_line_end" + +C-k = "goto_next_buffer" +C-j = "goto_previous_buffer" +C-b = ":buffer-close" + +esc = ["collapse_selection", "keep_primary_selection"] + +[keys.insert] +esc = ["collapse_selection", "normal_mode"] + +[keys.select] +p = "replace_selections_with_clipboard" +P = "no_op" +y = "yank_joined_to_clipboard" +D = ["yank_main_selection_to_clipboard", "delete_selection"] +V = "extend_to_line_end" + +esc = ["collapse_selection", "keep_primary_selection", "normal_mode"] diff --git a/.config/helix/languages.toml b/.config/helix/languages.toml index 111d338..965fef7 100644 --- a/.config/helix/languages.toml +++ b/.config/helix/languages.toml @@ -1,20 +1,29 @@ [[language]] name = "python" roots = ["pyproject.toml"] -auto-format = true formatter = { command = "black", args = ["-q", "-"] } +auto-format = true [[language]] name = "bash" +formatter = { command = "beautysh", args=["-"] } auto-format = true -formatter = { command = "beautysh" } [[language]] -name = "toml" +name = "markdown" +formatter = { command = "dprint", args = ["fmt", "-c", "/home/mo/.config/dprint.json", "--stdin", "md" ] } auto-format = true -# TODO: djhtml -# TODO: dprint -# TODO: nginx_beautifier -# TODO: prettier -# TODO: stylua +[[language]] +name = "json" +formatter = { command = "dprint", args = ["fmt", "-c", "/home/mo/.config/dprint.json", "--stdin", "json"] } +auto-format = true + +[[language]] +name = "html" +formatter = { command = "djlint", args = ["--reformat", "--quiet", "--preserve-blank-lines", "--format-css", "--format-js", "-"] } +auto-format = true + +[[language]] +name = "julia" +auto-format = true