Add hylo to tree-sitter
This commit is contained in:
parent
9a11fd1b38
commit
581093ff78
|
@ -9,13 +9,6 @@
|
|||
./modules/programs/my-kitty
|
||||
./modules/programs/openconnect-epfl.nix
|
||||
./common-linux.nix
|
||||
|
||||
# PATH Overrides
|
||||
({ config, lib, ... }: {
|
||||
home.sessionPath = lib.mkBefore [
|
||||
"${config.home.homeDirectory}/.bin/overrides"
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
|
|
|
@ -146,6 +146,9 @@ in
|
|||
if test -e /opt/homebrew/bin/brew
|
||||
/opt/homebrew/bin/brew shellenv | source
|
||||
end
|
||||
|
||||
# Override PATH
|
||||
set --export --prepend PATH ~/.bin/overrides ~/.local/bin
|
||||
'';
|
||||
|
||||
interactiveShellInit = ''
|
||||
|
|
|
@ -272,7 +272,7 @@ in
|
|||
# override inherited files
|
||||
cat ${tree-sitter-go}/queries/highlights.scm ${src}/queries/templ/highlights.scm > $out/queries/highlights.scm
|
||||
'';
|
||||
queries.path = "queries/templ";
|
||||
queries.path = "queries";
|
||||
};
|
||||
|
||||
go = {
|
||||
|
@ -282,6 +282,23 @@ in
|
|||
queries.src = tree-sitter-go;
|
||||
queries.path = "queries";
|
||||
};
|
||||
|
||||
hylo =
|
||||
let
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "natsukagami";
|
||||
repo = "tree-sitter-hylo";
|
||||
rev = "494cbdff0d13cbc67348316af2efa0286dbddf6f";
|
||||
hash = "sha256-R5UeoglCTl0do3VDJ/liCTeqbxU9slvmVKNRA/el2VY=";
|
||||
};
|
||||
in
|
||||
{
|
||||
grammar.src = src;
|
||||
grammar.compile.args = [ "-c" "-fpic" "../parser.c" "-I" ".." ];
|
||||
grammar.link.args = [ "-shared" "-fpic" "parser.o" ];
|
||||
queries.src = src;
|
||||
queries.path = "queries";
|
||||
};
|
||||
};
|
||||
|
||||
programs.my-kakoune.package = pkgs.kakoune;
|
||||
|
|
|
@ -214,7 +214,12 @@ hook global BufCreate .*[.]typ %{
|
|||
|
||||
hook global BufCreate .*[.]templ %{
|
||||
set-option buffer filetype templ
|
||||
set-option window comment_line "//"
|
||||
set-option buffer comment_line "//"
|
||||
}
|
||||
|
||||
hook global BufCreate .*[.]hylo %{
|
||||
set-option buffer filetype hylo
|
||||
set-option buffer comment_line "//"
|
||||
}
|
||||
|
||||
hook global BufOpenFile .* %{
|
||||
|
|
Loading…
Reference in a new issue