diff --git a/.helix/languages.toml b/.helix/languages.toml new file mode 100644 index 0000000000000000000000000000000000000000..86368c1e783d13f02046d3a0fb82c17991bb846e --- /dev/null +++ b/.helix/languages.toml @@ -0,0 +1,3 @@ +[[language]] +name = "nix" +language-servers = ["nil", "gpt"] diff --git a/config.nix b/config.nix index 289f56c77fcfcc0b582693f8d1584ec1602f1c45..9590f3fec01cfed435950843ca4e2ff5d653571c 100644 --- a/config.nix +++ b/config.nix @@ -256,6 +256,17 @@ ]; }; } { + name = "python"; + auto-format = true; + formatter = with python311Packages; { + command = "${black}/bin/black"; + args = [ + "--quiet" + "-" + ]; + }; + } + { name = "nix"; auto-format = true; formatter = { @@ -264,6 +275,27 @@ args = [ "-q" ]; }; } { + name = "templ"; + auto-format = true; + formatter = { + command = "${templ}/bin/templ"; + args = [ "fmt" ]; + }; + } + { + name = "typst"; + auto-format = true; + formatter.command = "${typst-fmt}/bin/typstfmt"; + } + { + name = "dhall"; + auto-format = true; + formatter = { + command = "${dhall}/bin/dhall"; + args = [ "format" ]; + }; + } + { name = "jsonnet"; auto-format = true; formatter = { @@ -271,9 +303,19 @@ command = "${jsonnet}/bin/jsonnetfmt"; args = [ "-" ]; }; } + { + name = "cooklang"; + scope = "source.cook"; + injection-regex = "cook"; + file-types = [ "cook" ]; + } ]; language-server = { nil.config.nil.nix.flake.autoEvalInputs = true; + gpt = { + command = "${helix-gpt}"; + args = [ "--handler=codeium" ]; + }; }; }; themes = { @@ -294,5 +336,13 @@ inherits = "catppuccin_mocha"; "ui.background" = { }; }; }; - grammars = [ ]; + grammars = [ + { + name = "cooklang"; + url = "https://github.com/jolheiser/tree-sitter-cooklang"; + rev = "a87b94729c0e4276a3e7b9fdccf497c268a2e1b8"; + sha256 = "sha256-j6WD1+WVTLlq0x0WkFWWR8JHYk2jObSRDNEz6SUWovw="; + queries = "queries"; + } + ]; } diff --git a/flake.lock b/flake.lock index 02f6b9781170ad6638cc4e5ed3e40add8bf906ea..ec3f22a143e3f24bfbf03ef3db5e51c152335e89 100644 --- a/flake.lock +++ b/flake.lock @@ -5,10 +5,10 @@ "inputs": { "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1739904102, - "narHash": "sha256-Oh+ckGaUrnH5mMCsPvU9XViSAIfbigW7H0Rq/ZbbhlI=", + "lastModified": 1730336659, + "narHash": "sha256-DYQUprBce8sXdBj7Ub1h/52GnGvxiXelvucVTcTXE8I=", "ref": "refs/heads/main", - "rev": "0abadd849d3d36ca87fda7ea9ed637f25a0e9dae", + "rev": "69856a465c69e5b456ef652f0f5f17a12b9d8c02", "revCount": 3, "type": "git", "url": "https://git.jolheiser.com/nixpkgs.git" @@ -20,11 +20,11 @@ } }, "nixpkgs": { "locked": { - "lastModified": 1739736696, - "narHash": "sha256-zON2GNBkzsIyALlOCFiEBcIjI4w38GYOb+P+R4S8Jsw=", + "lastModified": 1729880355, + "narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d74a2335ac9c133d6bbec9fc98d91a77f1604c1f", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", "type": "github" }, "original": { diff --git a/justfile b/justfile new file mode 100644 index 0000000000000000000000000000000000000000..8f92f5e25be5a0e549e6a31bd4b4f4b603d7f473 --- /dev/null +++ b/justfile @@ -0,0 +1,3 @@ +build: + @git add . + @nix build