Home

dotnix @main - refs - log -
-
https://git.jolheiser.com/dotnix.git
My nix dotfiles
tree log patch
feat: templ Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signature
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEgqEQpE3xoo1QwJO/uFOtpdp7v3oFAmUDu2cACgkQuFOtpdp7 v3p6MxAAyl/9gFerWdk5KHRPKVV+QEJ8KO67Yddv25XQY0GB8J+GGBbysYq96wv5 ATy8cIoo0q4NDUcxYmwZ+kuMzlYPCD5zTVY2tzcXg3u3N5xX8ub6Ac1S2dAP0C/G Ldme/kKJwCucTD2/HXkr5SCU+AxLdmJNWdwET9ii9QdAJsN6AT1eY8t13JXwGD5H 8oj20jWOmvcriwk9a7GT5RPAl9vQ/L0nIDQx0KWABwVnL/JvEkgf8BZqcTDO73bW AuUcuN1UceV3qle7iA/nXuCkF13LS9gO69MtdhHz+mmgJQ0ruU4vVAttVjPbKEOy Jx7lts8B7B33IrpMiv5uqjCbpgbUOd9nxOSOCZ6DmIjsefFpnoH2DVJU6wEmyUQF 7AJaFGf9/wV+QW9A5XZjg8uooYQQJB5QaxJHFor5SuR75PAXczUhxj1jEXcSWwTP doIUCS0SwpxApioarEBEW6Fh7JBg/Jx80tEsy4OtdIAv8SJzU42xHNezIrVlqDWI nqcyYMj7cx26CGYBmElxGn4N4R273gdLXzr53TBCtErpBWxwhF3UJWkgQYV2JwYO vdBCMHhhTctwz1TcCjwpxWwvWg8vouxDaQecx7aDryPlTUbyi5MI9TUjbAu4y2kp E0jv/JVJkgqZt0ilagpMSw7lnUVRW7w4B63lFN/mf7X9BS8YHCo= =eSmm -----END PGP SIGNATURE-----
jolheiser <john.olheiser@gmail.com>
1 year ago
3 changed files, 48 additions(+), 4 deletions(-)
M apps/nogui/default.nix -> apps/nogui/default.nix
diff --git a/apps/nogui/default.nix b/apps/nogui/default.nix
index befae1f9c5769d781932999f175e5729e52fe73d..8a73f2e2121c6166e6d90ae1bb7e9b6b88e78c3f 100644
--- a/apps/nogui/default.nix
+++ b/apps/nogui/default.nix
@@ -42,6 +42,7 @@       gofumpt
 
       # Flake overlays
       jolheiser.git-age
+      jolheiser.templ
       tclip
     ];
     activation.report-changes = config.lib.dag.entryAnywhere ''
M apps/nogui/helix.nix -> apps/nogui/helix.nix
diff --git a/apps/nogui/helix.nix b/apps/nogui/helix.nix
index 8d5858833fd2d7657ebb460ca7d2f89e1f771bd6..4a1ec61a759a984a4dcb19c6604e2a43f3290d48 100644
--- a/apps/nogui/helix.nix
+++ b/apps/nogui/helix.nix
@@ -1,4 +1,14 @@
 {
+          };
+  queries = pkgs.fetchFromGitea {
+    domain = "git.jojodev.com";
+    owner = "jolheiser";
+    repo = "templ-helix";
+    rev = "2a47b9c5af0fd9ae8bba8198fd66abc6d07fdf10";
+    sha256 = "sha256-pTdOX9bPup626t+ko6k3Xq/tprAMAZCUBl+xeIBkhfs=";
+  };
+  query = scm: builtins.readFile (queries + "/queries/templ/${scm}.scm");
+in {
   programs.helix = {
     enable = true;
     defaultEditor = true;
@@ -181,6 +191,33 @@             args = ["-qq"];
           };
         }
 {
+        color-modes = true;
+          name = "templ";
+          auto-format = true;
+          scope = "source.templ";
+          injection-regex = "templ";
+          file-types = ["templ"];
+          roots = ["go.mod"];
+          comment-token = "//";
+          language-server = {
+            command = "templ";
+            args = ["lsp"];
+          };
+          formatter = {
+            command = "templ";
+            args = ["fmt"];
+          };
+        }
+      ];
+      grammar = [
+        {
+          name = "templ";
+          source = {
+            git = "https://github.com/vrischmann/tree-sitter-templ";
+            rev = "9f63037ad08a58050d0582ef1ae0009bd0fbf2f1";
+          };
+        }
+{
             "selections"
     };
     themes = {
@@ -201,5 +238,11 @@         inherits = "catppuccin_mocha";
         "ui.background" = {};
       };
     };
+  };
+  xdg.configFile = {
+    "helix/runtime/queries/templ/highlights.scm".text = query "highlights";
+    "helix/runtime/queries/templ/indents.scm".text = query "indents";
+    "helix/runtime/queries/templ/injections.scm".text = query "injections";
+    "helix/runtime/queries/templ/structure.scm".text = query "structure";
   };
 }
M flake.lock -> flake.lock
diff --git a/flake.lock b/flake.lock
index c3f8e114aaf630b68a4ee6d58c42ee45d25061a0..80925ab5540436dc35c515312e9fb2016ef27502 100644
--- a/flake.lock
+++ b/flake.lock
@@ -115,13 +115,13 @@           "nixpkgs"
         ]
       },
       "locked": {
-        "lastModified": 1694718292,
+        "lastModified": 1694739610,
+      },
         "darwin": [],
-      "inputs": {
         "ref": "refs/heads/main",
-        "darwin": [],
+      },
         "home-manager": [],
-        "darwin": [],
+      },
         "nixpkgs": [
         "type": "git",
         "url": "https://git.jojodev.com/jolheiser/nur"