This is the config for Helix Editor. It’s a command line editor/IDE written in Rust that has syntax highlighting, tree sitter, LSP, multiple cursors support out of the box.
I like monokai themes
theme = "base16_transparent"
Disable mouse mode, enable cursor line for better visibility on where the cursor is and set appropriate idle timeout for code completions to show up after right amount of delay.
[editor]
mouse = false
color-modes = true
cursorline = true
idle-timeout = 40
auto-save = true
bufferline = "multiple"
Change cursor shape based on different modes
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"
Ignore hidden files in file picker
[editor.file-picker]
hidden = false
Add things on the statusline at appropriate places.
[editor.statusline]
left = ["mode", "spinner", "file-name", "file-type", "total-line-numbers", "file-encoding"]
center = ["selections", "primary-selection-length", "position", "position-percentage"]
right = ["diagnostics", "workspace-diagnostics"]
[editor.lsp]
display-messages = true
[editor.indent-guides]
render = true
Adding custom prettier to helix helix-editor/helix#3198
formatter = { command = 'npx', args = ["prettier", "--config", ".prettierrc", "--parser", "typescript"] }
Some keybindings in normal mode so that it’s easy to save and reload buffer.
[keys.normal]
C-s = ":w"
C-r = ":reload"
C-S-up = "expand_selection"
C-S-down = "shrink_selection"
C-n = "move_line_down"
C-p = "move_line_up"
C-j = ":buffer-previous"
C-k = ":buffer-next"
C-e = ["goto_line_end", "move_char_right"]
C-a = "goto_line_start"
D = ["extend_line_below", "delete_selection"]
C-c = ["toggle_comments", "move_line_down"]
esc = ["collapse_selection", "keep_primary_selection"]
[keys.normal.space]
w = ":write"
q = ":quit"
c = ":buffer-close"
C = ":buffer-close-others"
[keys.insert]
C-s = ":w"
C-f = "move_char_right"
C-b = "move_char_left"
C-c = ["toggle_comments", "move_line_down"]
C-e = ["goto_line_end", "move_char_right"]
C-a = "goto_line_start"
C-n = "move_line_down"
C-p = "move_line_up"