From 34106c074c8cd4a0882be66d2924f07233be11bb Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Mon, 14 Oct 2024 23:52:35 +0200 Subject: [PATCH] home/programs/editors: configure helix --- home/programs/editors/helix.nix | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/home/programs/editors/helix.nix b/home/programs/editors/helix.nix index c722d8b..59d2fba 100644 --- a/home/programs/editors/helix.nix +++ b/home/programs/editors/helix.nix @@ -15,7 +15,25 @@ in { auto-format = true; auto-completion = true; completion-timeout = 5; + color-modes = true; + completion-trigger-len = 1; + completion-replace = true; + cursorline = true; + cursor-shape = { + insert = "bar"; + normal = "block"; + select = "underline"; + }; + indent-guides.render = true; + lsp.display-inlay-hints = true; + statusline.center = ["position-percentage"]; + true-color = true; + whitespace.characters = { + newline = "↴"; + tab = "⇥"; + }; }; + keys.normal = { space = { space = "file_picker"; @@ -30,12 +48,16 @@ in { language = [ { name = "nix"; - formatter = {command = getExe pkgs.alejandra;}; + auto-format = true; } ]; + + language-server = { + nil = { + command = lib.getExe pkgs.nil; + config.nil.formatting.command = ["${lib.getExe pkgs.alejandra}" "-q"]; + }; + }; }; }; - home.packages = [ - pkgs.nil - ]; }