parent
933226d71b
commit
e58b8bf761
|
@ -42,6 +42,7 @@
|
||||||
|
|
||||||
# Flake overlays
|
# Flake overlays
|
||||||
jolheiser.git-age
|
jolheiser.git-age
|
||||||
|
jolheiser.templ
|
||||||
tclip
|
tclip
|
||||||
];
|
];
|
||||||
activation.report-changes = config.lib.dag.entryAnywhere ''
|
activation.report-changes = config.lib.dag.entryAnywhere ''
|
||||||
|
|
|
@ -1,4 +1,13 @@
|
||||||
{
|
{pkgs, ...}: let
|
||||||
|
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 = {
|
programs.helix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
|
@ -180,6 +189,32 @@
|
||||||
args = ["-qq"];
|
args = ["-qq"];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
themes = {
|
themes = {
|
||||||
|
@ -201,4 +236,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
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";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,11 +115,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1694718292,
|
"lastModified": 1694739610,
|
||||||
"narHash": "sha256-x74EG3+M2dz3Kto/KqMov+0/ieShlz/lIoJPQuuhLeM=",
|
"narHash": "sha256-8uaewp23kpGZtCF2vjuZR0QJRC0iXC6nyoxI/+7s6sg=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "cf69cfa8319211e017e1017f6374a3c28629c3a7",
|
"rev": "337275b6dd4514ee7dd0dd0858dccbdbca7853c2",
|
||||||
"revCount": 164,
|
"revCount": 166,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.jojodev.com/jolheiser/nur"
|
"url": "https://git.jojodev.com/jolheiser/nur"
|
||||||
},
|
},
|
||||||
|
|
Reference in New Issue