helix why
This commit is contained in:
		
							parent
							
								
									dcea7ca2d8
								
							
						
					
					
						commit
						e5fba5a6fd
					
				
					 4 changed files with 136 additions and 134 deletions
				
			
		
							
								
								
									
										40
									
								
								flake.lock
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										40
									
								
								flake.lock
									
										
									
										generated
									
									
									
								
							| 
						 | 
					@ -130,9 +130,7 @@
 | 
				
			||||||
      "inputs": {
 | 
					      "inputs": {
 | 
				
			||||||
        "crane": "crane",
 | 
					        "crane": "crane",
 | 
				
			||||||
        "flake-utils": "flake-utils_2",
 | 
					        "flake-utils": "flake-utils_2",
 | 
				
			||||||
        "nixpkgs": [
 | 
					        "nixpkgs": "nixpkgs",
 | 
				
			||||||
          "nixpkgs"
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        "rust-overlay": "rust-overlay"
 | 
					        "rust-overlay": "rust-overlay"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "locked": {
 | 
					      "locked": {
 | 
				
			||||||
| 
						 | 
					@ -262,7 +260,7 @@
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "hyprlang_2": {
 | 
					    "hyprlang_2": {
 | 
				
			||||||
      "inputs": {
 | 
					      "inputs": {
 | 
				
			||||||
        "nixpkgs": "nixpkgs"
 | 
					        "nixpkgs": "nixpkgs_2"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "locked": {
 | 
					      "locked": {
 | 
				
			||||||
        "lastModified": 1704230242,
 | 
					        "lastModified": 1704230242,
 | 
				
			||||||
| 
						 | 
					@ -281,7 +279,7 @@
 | 
				
			||||||
    "hyprpaper": {
 | 
					    "hyprpaper": {
 | 
				
			||||||
      "inputs": {
 | 
					      "inputs": {
 | 
				
			||||||
        "hyprlang": "hyprlang_2",
 | 
					        "hyprlang": "hyprlang_2",
 | 
				
			||||||
        "nixpkgs": "nixpkgs_2"
 | 
					        "nixpkgs": "nixpkgs_3"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "locked": {
 | 
					      "locked": {
 | 
				
			||||||
        "lastModified": 1704406943,
 | 
					        "lastModified": 1704406943,
 | 
				
			||||||
| 
						 | 
					@ -359,7 +357,7 @@
 | 
				
			||||||
    "nix-gaming": {
 | 
					    "nix-gaming": {
 | 
				
			||||||
      "inputs": {
 | 
					      "inputs": {
 | 
				
			||||||
        "flake-parts": "flake-parts",
 | 
					        "flake-parts": "flake-parts",
 | 
				
			||||||
        "nixpkgs": "nixpkgs_3"
 | 
					        "nixpkgs": "nixpkgs_4"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "locked": {
 | 
					      "locked": {
 | 
				
			||||||
        "lastModified": 1706477838,
 | 
					        "lastModified": 1706477838,
 | 
				
			||||||
| 
						 | 
					@ -377,15 +375,15 @@
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "nixpkgs": {
 | 
					    "nixpkgs": {
 | 
				
			||||||
      "locked": {
 | 
					      "locked": {
 | 
				
			||||||
        "lastModified": 1702645756,
 | 
					        "lastModified": 1706191920,
 | 
				
			||||||
        "narHash": "sha256-qKI6OR3TYJYQB3Q8mAZ+DG4o/BR9ptcv9UnRV2hzljc=",
 | 
					        "narHash": "sha256-eLihrZAPZX0R6RyM5fYAWeKVNuQPYjAkCUBr+JNvtdE=",
 | 
				
			||||||
        "owner": "nixos",
 | 
					        "owner": "nixos",
 | 
				
			||||||
        "repo": "nixpkgs",
 | 
					        "repo": "nixpkgs",
 | 
				
			||||||
        "rev": "40c3c94c241286dd2243ea34d3aef8a488f9e4d0",
 | 
					        "rev": "ae5c332cbb5827f6b1f02572496b141021de335f",
 | 
				
			||||||
        "type": "github"
 | 
					        "type": "github"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "original": {
 | 
					      "original": {
 | 
				
			||||||
        "owner": "NixOS",
 | 
					        "owner": "nixos",
 | 
				
			||||||
        "ref": "nixos-unstable",
 | 
					        "ref": "nixos-unstable",
 | 
				
			||||||
        "repo": "nixpkgs",
 | 
					        "repo": "nixpkgs",
 | 
				
			||||||
        "type": "github"
 | 
					        "type": "github"
 | 
				
			||||||
| 
						 | 
					@ -425,6 +423,22 @@
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "nixpkgs_2": {
 | 
					    "nixpkgs_2": {
 | 
				
			||||||
 | 
					      "locked": {
 | 
				
			||||||
 | 
					        "lastModified": 1702645756,
 | 
				
			||||||
 | 
					        "narHash": "sha256-qKI6OR3TYJYQB3Q8mAZ+DG4o/BR9ptcv9UnRV2hzljc=",
 | 
				
			||||||
 | 
					        "owner": "nixos",
 | 
				
			||||||
 | 
					        "repo": "nixpkgs",
 | 
				
			||||||
 | 
					        "rev": "40c3c94c241286dd2243ea34d3aef8a488f9e4d0",
 | 
				
			||||||
 | 
					        "type": "github"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "original": {
 | 
				
			||||||
 | 
					        "owner": "NixOS",
 | 
				
			||||||
 | 
					        "ref": "nixos-unstable",
 | 
				
			||||||
 | 
					        "repo": "nixpkgs",
 | 
				
			||||||
 | 
					        "type": "github"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "nixpkgs_3": {
 | 
				
			||||||
      "locked": {
 | 
					      "locked": {
 | 
				
			||||||
        "lastModified": 1703637592,
 | 
					        "lastModified": 1703637592,
 | 
				
			||||||
        "narHash": "sha256-8MXjxU0RfFfzl57Zy3OfXCITS0qWDNLzlBAdwxGZwfY=",
 | 
					        "narHash": "sha256-8MXjxU0RfFfzl57Zy3OfXCITS0qWDNLzlBAdwxGZwfY=",
 | 
				
			||||||
| 
						 | 
					@ -440,7 +454,7 @@
 | 
				
			||||||
        "type": "github"
 | 
					        "type": "github"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "nixpkgs_3": {
 | 
					    "nixpkgs_4": {
 | 
				
			||||||
      "locked": {
 | 
					      "locked": {
 | 
				
			||||||
        "lastModified": 1706173671,
 | 
					        "lastModified": 1706173671,
 | 
				
			||||||
        "narHash": "sha256-lciR7kQUK2FCAYuszyd7zyRRmTaXVeoZsCyK6QFpGdk=",
 | 
					        "narHash": "sha256-lciR7kQUK2FCAYuszyd7zyRRmTaXVeoZsCyK6QFpGdk=",
 | 
				
			||||||
| 
						 | 
					@ -456,7 +470,7 @@
 | 
				
			||||||
        "type": "github"
 | 
					        "type": "github"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "nixpkgs_4": {
 | 
					    "nixpkgs_5": {
 | 
				
			||||||
      "locked": {
 | 
					      "locked": {
 | 
				
			||||||
        "lastModified": 1706191920,
 | 
					        "lastModified": 1706191920,
 | 
				
			||||||
        "narHash": "sha256-eLihrZAPZX0R6RyM5fYAWeKVNuQPYjAkCUBr+JNvtdE=",
 | 
					        "narHash": "sha256-eLihrZAPZX0R6RyM5fYAWeKVNuQPYjAkCUBr+JNvtdE=",
 | 
				
			||||||
| 
						 | 
					@ -485,7 +499,7 @@
 | 
				
			||||||
        "nh": "nh",
 | 
					        "nh": "nh",
 | 
				
			||||||
        "nix-colors": "nix-colors",
 | 
					        "nix-colors": "nix-colors",
 | 
				
			||||||
        "nix-gaming": "nix-gaming",
 | 
					        "nix-gaming": "nix-gaming",
 | 
				
			||||||
        "nixpkgs": "nixpkgs_4"
 | 
					        "nixpkgs": "nixpkgs_5"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "rust-overlay": {
 | 
					    "rust-overlay": {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -34,7 +34,6 @@
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
    helix = {
 | 
					    helix = {
 | 
				
			||||||
      url = "github:helix-editor/helix";
 | 
					      url = "github:helix-editor/helix";
 | 
				
			||||||
      inputs.nixpkgs.follows = "nixpkgs";
 | 
					 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    nh = {
 | 
					    nh = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,35 +5,23 @@ let
 | 
				
			||||||
in
 | 
					in
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  imports = [
 | 
					  # imports = [
 | 
				
			||||||
    ./languages.nix
 | 
					  #   ./languages.nix
 | 
				
			||||||
  ];
 | 
					  # ];
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  config = {
 | 
					  config = lib.mkIf cfg.enable {
 | 
				
			||||||
    programs.helix = lib.mkIf cfg.enable {
 | 
					    home.packages = with pkgs; [
 | 
				
			||||||
      enable = true;
 | 
					 | 
				
			||||||
      defaultEditor = lib.mkIf cfg.default true;
 | 
					 | 
				
			||||||
      package = 
 | 
					 | 
				
			||||||
        inputs.helix.packages.${pkgs.system}.default.overrideAttrs (self: {
 | 
					 | 
				
			||||||
              makeWrapperArgs = with pkgs;
 | 
					 | 
				
			||||||
                self.makeWrapperArgs
 | 
					 | 
				
			||||||
                or []
 | 
					 | 
				
			||||||
                ++ [
 | 
					 | 
				
			||||||
                  "--suffix"
 | 
					 | 
				
			||||||
                  "PATH"
 | 
					 | 
				
			||||||
                  ":"
 | 
					 | 
				
			||||||
                  (lib.makeBinPath [
 | 
					 | 
				
			||||||
                    clang-tools
 | 
					 | 
				
			||||||
      marksman
 | 
					      marksman
 | 
				
			||||||
 | 
					      clang-tools
 | 
				
			||||||
      nil
 | 
					      nil
 | 
				
			||||||
      nodePackages.bash-language-server
 | 
					      nodePackages.bash-language-server
 | 
				
			||||||
      nodePackages.vscode-css-languageserver-bin
 | 
					      nodePackages.vscode-css-languageserver-bin
 | 
				
			||||||
      nodePackages.vscode-langservers-extracted
 | 
					      nodePackages.vscode-langservers-extracted
 | 
				
			||||||
      shellcheck
 | 
					      shellcheck
 | 
				
			||||||
                  ])
 | 
					 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
            });
 | 
					    programs.helix = {
 | 
				
			||||||
         
 | 
					      enable = true;
 | 
				
			||||||
 | 
					      defaultEditor = lib.mkIf cfg.default true;
 | 
				
			||||||
      settings = {
 | 
					      settings = {
 | 
				
			||||||
        theme = colorscheme.slug;
 | 
					        theme = colorscheme.slug;
 | 
				
			||||||
        editor = {
 | 
					        editor = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +1,8 @@
 | 
				
			||||||
{ pkgs, lib, config, ... }: 
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
let
 | 
					 | 
				
			||||||
  cfg = config.homeModules.console.editor.helix;
 | 
					 | 
				
			||||||
in
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  config = lib.mkIf cfg.enable {
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}: {
 | 
				
			||||||
  programs.helix.languages = {
 | 
					  programs.helix.languages = {
 | 
				
			||||||
    language = let
 | 
					    language = let
 | 
				
			||||||
      deno = lang: {
 | 
					      deno = lang: {
 | 
				
			||||||
| 
						 | 
					@ -51,6 +48,11 @@ in
 | 
				
			||||||
          auto-format = true;
 | 
					          auto-format = true;
 | 
				
			||||||
          formatter = deno "md";
 | 
					          formatter = deno "md";
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          name = "typescript";
 | 
				
			||||||
 | 
					          auto-format = true;
 | 
				
			||||||
 | 
					          language-servers = ["deno-lsp"];
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
      ]
 | 
					      ]
 | 
				
			||||||
      ++ prettierLangs langs;
 | 
					      ++ prettierLangs langs;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -104,5 +106,4 @@ in
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue