config/users/pbsds/home/profiles/ast-grep.nix

23 lines
582 B
Nix

{ pkgs, ... }:
{
# https://github.com/ast-grep/ast-grep/issues/658
# https://github.com/ast-grep/ast-grep/issues/30
# https://github.com/ast-grep/ast-grep.github.io/issues/98
/** /
home.packages = with pkgs; [
ast-grep
];
xdg.configFile."ast-grep/sgrammar.yaml".source = (pkgs.formats.yaml { }).generate {
ruleDirs = "rules";
#customLanguages = (lib.mapAttrs (k: v: TODO) pkgs.tree-sitter-grammars)
customLanguages.nix = {
libraryPath = "${pkgs.tree-sitter-grammars.tree-sitter-nix}/parser";
extensions = [ "nix" ];
};
};
/**/
}