From 8c2b37402d362be642e933ea73e4f716473f3e0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Schr=C3=B6ter?= Date: Wed, 31 May 2023 16:03:24 +0200 Subject: [PATCH] feat(editors): update helix config --- home/editors/helix/default.nix | 45 ++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/home/editors/helix/default.nix b/home/editors/helix/default.nix index 18d5182..5fc6b28 100644 --- a/home/editors/helix/default.nix +++ b/home/editors/helix/default.nix @@ -1,12 +1,53 @@ { config, lib, pkgs, ... }: { - # TODO use tree-sitter grammars from nixpkgs + # @TODO for direnv to work needs to be started from project folder programs.helix = { enable = true; package = pkgs.unstable.helix; + languages = [ + { + name = "rust"; + config.rust-analyzer = { + cargo.buildScripts.enable = true; + checkOnSave.command = "clippy"; + procMacro.enable = true; + }; + } + { + name = "nix"; + formatter.command = "nixfmt"; + } + { + name = "nickel"; + formatter.command = "topiary"; + } + ]; settings = { - theme = "dark_plus"; + theme = "github_dark"; + editor = { + color-modes = true; + cursor-shape.insert = "bar"; + completion-trigger-len = 1; + statusline = { + left = [ + "mode" + "version-control" + "spinner" + "file-name" + "file-modification-indicator" + ]; + right = [ + "diagnostics" + "file-encoding" + "file-line-ending" + "file-type" + "selections" + "position" + ]; + }; + }; + # @TODO try helix-vim keys = { normal = { "H" = "goto_line_start";