{ pkgs, ... }: { programs.helix = { enable = true; defaultEditor = true; extraPackages = with pkgs; [ markdown-oxide nixd nixfmt-rfc-style ]; settings = { editor = { line-number = "relative"; cursorline = true; color-modes = true; mouse = true; end-of-line-diagnostics = "hint"; inline-diagnostics.cursor-line = "warning"; cursor-shape = { insert = "bar"; normal = "block"; select = "underline"; }; soft-wrap.enable = true; statusline = { left = [ "mode" "spinner" "version-control" "read-only-indicator" "file-modification-indicator" ]; center = [ "file-name" ]; right = [ "diagnostics" "selections" "register" "position" "position-percentage" "file-encoding" "file-type" ]; mode = { normal = "NORMAL"; insert = "INSERT"; select = "SELECT"; }; }; }; keys = { normal = { X = [ "extend_line_up" "extend_to_line_bounds" ]; }; }; }; languages = { # language-server = { # nixd = { # config.nixd = # let # flake = "(builtins.getFlake (toString ./.))"; # in # { # nixpkgs.expr = "import ${flake}.inputs.nixpkgs { }"; # options = { # nixos.expr = "${flake}.nixosConfigurations.galanthus.options"; # darwin.expr = "${flake}.darwinConfigurations."Mac von Jan".options"; # home-manager.expr = "${flake}.darwinConfigurations."Mac von Jan".options.home-manager.users.type.getSubOptions []"; # }; # }; # }; # }; language = [ { name = "nix"; formatter.command = "nixfmt"; auto-format = true; } { name = "typst"; formatter.command = "typstyle"; auto-format = true; } ]; }; }; }