Skip to content

Instantly share code, notes, and snippets.

@prassee
Created May 1, 2024 03:31
Show Gist options
  • Save prassee/10d022b977797e13456c8eafc08ffd8c to your computer and use it in GitHub Desktop.
Save prassee/10d022b977797e13456c8eafc08ffd8c to your computer and use it in GitHub Desktop.
helix config
theme = "modus_vivendi"
[editor]
# Show currently open buffers, only when more than one exists.
bufferline = "multiple"
# Highlight all lines with a cursor
cursorline = true
rulers = [110]
# Force the theme to show colors
true-color = true
# Use mouse
mouse = true
# Number of lines of padding around the edge of the screen when scrolling
scrolloff = 10
[editor.gutters]
layout = ["diff", "diagnostics", "line-numbers", "spacer"]
[editor.statusline]
left = ["mode", "spinner" , "version-control"]
center = ["file-name"]
right = ["diagnostics", "selections", "position", "file-encoding", "file-line-ending", "file-type"]
separator = "│"
mode.normal = "NORMAL"
mode.insert = "INSERT"
mode.select = "SELECT"
[editor.indent-guides]
render = true
character = "╎" # Some characters that work well: "▏", "┆", "┊", "⸽"
skip-levels = 1
[editor.cursor-shape]
normal = "underline"
insert = "bar"
select = "block"
[editor.lsp]
display-messages = true
display-inlay-hints = true
[keys.normal]
C-s =":w"
C-a = "goto_line_start"
C-e = "goto_line_end"
C-g = [":new", ":insert-output lazygit", ":buffer-close!", ":redraw"]
A-up = ["extend_to_line_bounds", "delete_selection", "move_line_up", "paste_before"]
A-down = ["extend_to_line_bounds", "delete_selection", "paste_after"]
C-d = ["extend_to_line_bounds" , "delete_selection"]
[keys.insert]
C-a = "goto_line_start"
C-e = "goto_line_end"
A-up = ["extend_to_line_bounds", "delete_selection", "move_line_up", "paste_before"]
A-down = ["extend_to_line_bounds", "delete_selection", "paste_after"]
C-d = ["extend_to_line_bounds" , "delete_selection"]
C-space = "completion"
[editor.file-picker]
hidden = false
git-ignore = true
git-global = false
[editor.whitespace]
render = "all"
[[language]]
name = "rust"
indent = { tab-width = 2, unit = " "}
auto-format = true
[language-server.rust-analyzer.config]
cargo.features = "all"
rust-analyzer.check.command = "clippy"
[language-server.rust-analyzer.config.check]
command = "clippy"
[language.debugger]
command = "codelldb"
name = "codelldb"
port-arg = "--port {}"
transport = "tcp"
[[language.debugger.templates]]
name = "binary"
request = "launch"
[[language.debugger.templates.completion]]
completion = "filename"
name = "binary"
[language.debugger.templates.args]
program = "{0}"
runInTerminal = true
[[language]]
name = "scala"
scope = "source.scala"
auto-format = true
roots = ["build.sbt", "build.sc", "build.gradle", "pom.xml", ".scala-build"]
file-types = ["scala", "sbt", "sc"]
comment-token = "//"
indent = { tab-width = 2, unit = " " }
language-servers = [ "metals" ]
[language-server.metals.config]
isHttpEnabled = true
icons = "unicode"
[language-server.metals.config.metals]
autoImportBuild = "all"
showImplicitArguments = true
showImplicitConversionsAndClasses = true
showInferredType = true
superMethodLensesEnabled = true
[language-server.metals.config.metals.inlayHints]
inferredTypes.enable = true
typeParameters.enable = true
hintsInPatternMatch.enable = true
implicitArguments.enable = true
implicitConversions.enable = true
[[grammar]]
name = "scala"
source = { git = "https://github.com/tree-sitter/tree-sitter-scala", rev = "d50b6ca5cc3d925e3d1f497199cb8d8383ddae8a" }
# [[language]]
# name = "python"
# language-servers = [ "pyright", "ruff" ]
# auto-format = true
# [language-server.ruff]
# command = "ruff-lsp"
# [language-server.ruff.config.settings]
# args = ["--ignore", "E501"]
[language-server.pyright]
command = "pyright-langserver"
args = ["--stdio"]
config = { settings = { python = { analysis = { autoImportCompletions = true, typeCheckingMode = "basic", autoSearchPaths = true, useLibraryCodeForTypes = true, diagnosticMode = "openFilesOnly" } } } }
[language-server.ruff-lsp]
command = "ruff-lsp"
[[language]]
name = "python"
scope = "source.python"
injection-regex = "python"
auto-format = true
formatter = { command = "black", args = ["-", "-q"] }
file-types = [
"py",
"pyi",
"py3",
"pyw",
"ptl",
".pythonstartup",
".pythonrc",
"SConstruct",
]
shebangs = ["python"]
roots = [
"setup.py",
"setup.cfg",
"pyproject.toml",
"pyrightconfig.json",
"Poetry.lock",
]
comment-token = "#"
language-servers = ["pyright", "ruff-lsp"]
indent = { tab-width = 4, unit = " " }
# # -- Not functional yet
[language.debugger]
name = "debugpy"
transport = "stdio"
command = "python"
args = ["-m", "debugpy.adapter"]
[[language.debugger.templates]]
name = "source"
request = "launch"
completion = [{ name = "entrypoint", completion = "filename", default = "." }]
args = { mode = "debug", program = "{0}" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment