Skip to content

Instantly share code, notes, and snippets.

@storopoli
Last active July 26, 2025 16:00
Show Gist options
  • Save storopoli/e63b10dafdcc764f2bfe84f75c61e20a to your computer and use it in GitHub Desktop.
Save storopoli/e63b10dafdcc764f2bfe84f75c61e20a to your computer and use it in GitHub Desktop.
Helix Config
theme = "gruvbox_dark_hard_transparent"
[editor]
line-number = "relative"
mouse = true
scrolloff = 8
cursorline = true
rulers = [ 80 ]
true-color = true
color-modes = true
completion-trigger-len = 1
idle-timeout = 50
bufferline = "multiple"
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"
[editor.file-picker]
hidden = false
[editor.statusline]
left = [ "mode", "spinner", "version-control" ]
center = [ "file-name" ]
right = [ "workspace-diagnostics", "selections", "position-percentage", "position", "file-encoding", "file-type" ]
[editor.indent-guides]
render = true
character = "╎"
[editor.lsp]
display-messages = true
display-progress-messages = true
display-inlay-hints = true
[keys.normal]
Cmd-s = ":write"
esc = [ "collapse_selection", "keep_primary_selection" ]
A-x = "extend_to_line_bounds"
X = [ "extend_line_up", "extend_to_line_bounds" ]
A-g = ":reset-diff-change"
# lazygit integration: https://github.com/helix-editor/helix/discussions/12045
C-g = [
":write-all",
":new",
":insert-output lazygit >/dev/tty",
":set mouse false",
":set mouse true",
":buffer-close!",
":redraw",
":reload-all"
]
# yazi integration: https://github.com/helix-editor/helix/discussions/12934
C-y = [
':sh rm -f /tmp/files2open',
':set mouse false',
':insert-output yazi "%{buffer_name}" --chooser-file=/tmp/files2open',
':redraw',
':set mouse true',
':open /tmp/files2open',
'select_all',
'split_selection_on_newline',
'goto_file',
':buffer-close! /tmp/files2open',
]
# Swap lines up and down
A-j = [ "ensure_selections_forward", "extend_to_line_bounds", "extend_char_right", "extend_char_left", "delete_selection", "add_newline_below", "move_line_down", "replace_with_yanked" ]
A-k = [ "ensure_selections_forward", "extend_to_line_bounds", "extend_char_right", "extend_char_left", "delete_selection", "move_line_up", "add_newline_above", "move_line_up", "replace_with_yanked" ]
[keys.normal.space]
q = ":quit"
Q = ":quit-all!"
# Generate permalink for current line
# o = [":sh echo \"$(git remote get-url origin | sed 's/\\.git$//' | sed 's/git@github\\.com:/https:\\/\\/github\\.com\\//')/blob/$(git rev-parse HEAD)/%{buffer_name}#L%{cursor_line}\" | pbcopy"]
o = [":sh echo \"$(git remote get-url origin | sed 's/\\.git$//' | sed 's/git@github\\.com:/https:\\/\\/github\\.com\\//')/blob/$(git rev-parse HEAD)/%{buffer_name}#L%{selection_line_start}-L%{selection_line_end}\" | pbcopy"]
[keys.select]
X = [ "extend_line_up", "extend_to_line_bounds" ]
A-x = "extend_to_line_bounds"
A-g = ":reset-diff-change"
[keys.select.space]
# Generate permalink for current selection line range
o = [":sh echo \"$(git remote get-url origin | sed 's/\\.git$//' | sed 's/git@github\\.com:/https:\\/\\/github\\.com\\//')/blob/$(git rev-parse HEAD)/%{buffer_name}#L%{selection_line_start}-L%{selection_line_end}\" | pbcopy"]
# ~/.config/helix/themes/gruvbox_dark_hard_transparent.toml
inherits = "gruvbox_dark_hard"
"ui.background" = {}
[[language]]
name = "haskell"
auto-format = true
[[language]]
name = "nix"
formatter = {command = "nixfmt"}
auto-format = true
[language-server.haskell-language-server.config]
"formattingProvider" = "fourmolu"
cabalFormattingProvider = 'cabal-fmt'
[language-server.haskell-language-server.config.plugin]
fourmolu.config.external = true
rename.config.crossModule = true
@storopoli
Copy link
Author

How to make Helix work with pyright-lsp: microsoft/pyright#9797 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment