From 57389d9109ca11447d44760614b5cd50fa10f3a3 Mon Sep 17 00:00:00 2001 From: Jelle Spreeuwenberg Date: Sun, 26 Jul 2026 09:40:20 +0200 Subject: [PATCH] feat: helix updates --- flake.lock | 43 +++++++++++++++++++++++++ flake.nix | 4 +++ modules/capabilities/helix.nix | 58 +++++++++++++++++++++++++++------- 3 files changed, 93 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 31b4194..7889358 100644 --- a/flake.lock +++ b/flake.lock @@ -268,6 +268,27 @@ "type": "github" } }, + "helix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "rust-overlay": "rust-overlay_2" + }, + "locked": { + "lastModified": 1784822617, + "narHash": "sha256-IYDL6Vnf13Sa+wbeXZTAxvdLA4h8Ew5ha0spcJy/Yk0=", + "owner": "helix-editor", + "repo": "helix", + "rev": "079a789e8cb08ead67f19e1971a1b7438b37354b", + "type": "github" + }, + "original": { + "owner": "helix-editor", + "repo": "helix", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -708,6 +729,7 @@ "lux-pkgs", "flake-parts" ], + "helix": "helix", "home-manager": "home-manager", "import-tree": "import-tree", "llm-agents": "llm-agents", @@ -744,6 +766,27 @@ "type": "github" } }, + "rust-overlay_2": { + "inputs": { + "nixpkgs": [ + "helix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1775358767, + "narHash": "sha256-f2eC+WIfhjevCPQILuV08i/kmKZzYZpUvkom/33VxCA=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "20fd44bc663daa53a2575e01293e24e681d62244", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, "sops-nix": { "inputs": { "nixpkgs": [ diff --git a/flake.nix b/flake.nix index 8ee0381..450d8eb 100644 --- a/flake.nix +++ b/flake.nix @@ -8,6 +8,10 @@ }; devenv.url = "github:cachix/devenv"; flake-parts.follows = "lux-pkgs/flake-parts"; + helix = { + url = "github:helix-editor/helix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/modules/capabilities/helix.nix b/modules/capabilities/helix.nix index 7a96421..3afb4fb 100644 --- a/modules/capabilities/helix.nix +++ b/modules/capabilities/helix.nix @@ -1,4 +1,4 @@ -{ ... }: +{ inputs, ... }: { flake.modules.homeManager.helix = { pkgs, ... }: @@ -31,14 +31,51 @@ { programs.helix = { enable = true; + package = inputs.helix.packages.${pkgs.stdenv.hostPlatform.system}.default; extraPackages = with pkgs; [ svelteLanguageServer nixd nixfmt oxfmt + + simple-completion-language-server + + rust-analyzer ]; + settings = { + theme = "kanagawa"; + editor = { + lsp = { + auto-document-highlight = true; + display-inlay-hints = true; + }; + rainbow-brackets = true; + line-number = "relative"; + cursorline = true; + gutters = [ + "code-action-hint" + "diagnostics" + "spacer" + "line-numbers" + "spacer" + "diff" + ]; + color-modes = true; + cursor-shape = { + insert = "bar"; + normal = "block"; + select = "underline"; + }; + }; + }; + languages = { + language-server.scls = { + command = "simple-completion-language-server"; + environment.SNIPPETS_PATH = "${pkgs.vimPlugins.friendly-snippets}/snippets"; + }; + language = [ { name = "svelte"; @@ -47,24 +84,21 @@ args = [ "--stdin-filepath=%{buffer_name}" ]; }; auto-format = true; + language-servers = [ + "scls" + "svelteserver" + ]; } { name = "nix"; auto-format = true; } + { + name = "rust"; + auto-format = true; + } ]; }; - - settings = { - theme = "kanagawa"; - editor = { - cursor-shape = { - insert = "bar"; - normal = "block"; - select = "underline"; - }; - }; - }; }; }; }