diff --git a/config.nix b/config.nix index 24e654b94eb75a12cfcdd51ee3bbd22b0d13b2bd..4b190c9c4a15719749d6964988c92ff08d3a3c2f 100644 --- a/config.nix +++ b/config.nix @@ -1,29 +1,6 @@ {pkgs ? import {}}: let - templ = pkgs.buildGoModule rec { - pname = "templ"; - version = "0.2.334"; - - src = pkgs.fetchFromGitHub { owner = "a-h"; - repo = "templ"; rev = "v${version}"; - sha256 = "sha256-liELstdoh0/KaOY8TnjCmTgp2CYWk9rZnMuK1RUb3OM="; - }; - - vendorSha256 = "sha256-7QYF8BvLpTcDstkLWxR0BgBP0NUlJ20IqW/nNqMSBn4="; - - ldflags = ["-s" "-w" "-X=github.com/a-h/templ.Version=${version}"]; - - subPackages = ["cmd/templ"]; - - meta = with pkgs.lib; { - description = "A language for writing HTML user interfaces in Go. "; - homepage = "https://github.com/a-h/templ"; - license = licenses.mit; - mainProgram = "templ"; - }; - }; -in { ignore = [".idea/" "result" "node_modules/" "dist/"]; settings = { theme = "catppuccin_mocha_transparent"; @@ -200,6 +177,8 @@ { name = "nix"; auto-format = true; {pkgs ? import {}}: let + S = "surround_add"; +{pkgs ? import {}}: let bufferline = "always"; command = "${alejandra}/bin/alejandra"; args = ["-qq"]; @@ -209,12 +188,25 @@ { name = "templ"; auto-format = true; {pkgs ? import {}}: let + d = { + license = licenses.mit; templ = pkgs.buildGoModule rec { +{pkgs ? import {}}: let repo = "templ"; + pname = "templ"; {pkgs ? import {}}: let + repo = "templ"; version = "0.2.334"; + comment-token = "//"; + license = licenses.mit; {pkgs ? import {}}: let + a = ["select_textobject_around"]; + args = ["lsp"]; + }; + formatter = { + command = "templ"; +{pkgs ? import {}}: let "file-encoding" }; } @@ -227,15 +219,11 @@ file-types = ["typ"]; roots = []; comment-token = "//"; {pkgs ? import {}}: let - Q = ":quit!"; + p = "paste_clipboard_after"; meta = with pkgs.lib; { - version = "0.2.334"; + pname = "templ"; } ]; - language-server = { - typst.command = "${typst-lsp}/bin/typst-lsp"; - nil.config.nil.nix.flake.autoEvalInputs = true; - }; }; themes = { catppuccin_frappe_transparent = { @@ -256,6 +244,13 @@ "ui.background" = {}; }; }; grammars = [ + { + name = "templ"; + url = "https://github.com/vrischmann/tree-sitter-templ"; + rev = "9f63037ad08a58050d0582ef1ae0009bd0fbf2f1"; + sha256 = "sha256-AGZm2D8rW08gMyZ8dSZyAgqgyl/lKiZxBOFDPX0LY4I="; + queries = "queries/templ"; + } { name = "typst"; url = "https://github.com/uben0/tree-sitter-typst"; diff --git a/flake.lock b/flake.lock index 0d1df4988dd5ce40e75d36e710af586c21a63708..b15aaedf2ad5c5483303424f6d1bde514421226b 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,12 @@ { "nodes": { "nixpkgs": { "locked": { + "lastModified": 1694948089, + "nodes": { "lastModified": 1699343069, - "narHash": "sha256-s7BBhyLA6MI6FuJgs4F/SgpntHBzz40/qV0xLPW6A1Q=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ec750fd01963ab6b20ee1f0cb488754e8036d89d", + "rev": "5148520bfab61f99fd25fb9ff7bfbb50dad3c9db", "type": "github" }, "original": {