From 8c81b94e47184c35250761bf0c4b4be4b9e24079 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Wed, 12 Jun 2024 13:23:20 +0200 Subject: [PATCH] helix inline diags --- flake.nix | 14 +++++++++++--- modules/shell/helix.nix | 15 ++++++++++++--- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index 89bffb8..52c8181 100644 --- a/flake.nix +++ b/flake.nix @@ -5,6 +5,13 @@ nixpkgs.url = "nixpkgs/nixos-unstable"; nixpkgs-stable.url = "nixpkgs/nixos-23.11"; nixpkgs-unstable-small.url = "nixpkgs/nixos-unstable-small"; + helix-inline-diags = { + url = "github:pascalkuthe/helix/inline-diagnostics"; + inputs = { + crane.follows = "crane"; + nixpkgs.follows = "nixpkgs"; + }; + }; lix = { url = "git+https://git@git.lix.systems/lix-project/lix?ref=refs/tags/2.90-beta.1"; flake = false; @@ -40,6 +47,7 @@ nixpkgs, nixpkgs-stable, nixpkgs-unstable-small, + helix-inline-diags, lix-module, home-manager, nixos-hardware, @@ -93,7 +101,7 @@ nixosConfigurations = { monosodium-glutamate-g = nixpkgs.lib.nixosSystem { specialArgs = { - inherit inputs pkgs-unstable-small pkgs-stable rs-programs lix-module; + inherit inputs pkgs-unstable-small pkgs-stable rs-programs lix-module helix-inline-diags; }; system = "x86_64-linux"; modules = [ @@ -118,7 +126,7 @@ }; catbook-j = nixpkgs.lib.nixosSystem { specialArgs = { - inherit inputs pkgs-unstable-small pkgs-stable rs-programs lix-module; + inherit inputs pkgs-unstable-small pkgs-stable rs-programs lix-module helix-inline-diags; }; system = "x86_64-linux"; modules = [ @@ -143,7 +151,7 @@ }; potatobook-g = nixpkgs.lib.nixosSystem { specialArgs = { - inherit inputs pkgs-unstable-small rs-programs lix-module; + inherit inputs pkgs-unstable-small rs-programs lix-module helix-inline-diags; }; system = "x86_64-linux"; modules = [ diff --git a/modules/shell/helix.nix b/modules/shell/helix.nix index 7f025b3..36d3e41 100644 --- a/modules/shell/helix.nix +++ b/modules/shell/helix.nix @@ -1,4 +1,8 @@ -{config, ...}: { +{ + config, + helix-inline-diags, + ... +}: { home-manager.users.jade = {pkgs, ...}: { home = { sessionVariables.EDITOR = "hx"; @@ -12,7 +16,7 @@ }; programs.helix = { enable = true; - package = pkgs.helix; + package = helix-inline-diags.outputs.packages."x86_64-linux".default; settings = { theme = "gruvbox"; editor = { @@ -22,6 +26,11 @@ cursorline = true; auto-save = true; auto-format = true; + end-of-line-diagnostics = "hint"; + inline-diagnostics = { + cursor-line = "hint"; + other-lines = "error"; + }; lsp = { display-messages = true; display-inlay-hints = true; @@ -48,7 +57,7 @@ "file-encoding" "file-type" ]; - idle-timeout = 200; + idle-timeout = 50; indent-guides = { render = true; character = "│";