blob: 7a128150b2abd60bb6bd00d8f949688abe54582b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
--langdef=nix
--languages=+nix
--langmap=nix:.nix
# packages are "name = <tag>" or "pname = <tag>"
--kinddef-nix=p,package,package definition
--regex-nix=/[p?]name\s*=\s*"(\w+)"/\1/p/
# functions have args, so have a : right of the =
--kinddef-nix=f,function,function definition
--regex-nix=/(\S+)\s*=\s+\w+:/\1/f/
# attrs just have =, but only index if they have >=4 chars
--kinddef-nix=a,attr,attribute definition
--regex-nix=/\s+([a-zA-Z_0-9-]{4,20})\s*=/\1/a/
# nixpkgs, ignore tests
--exclude=*pkgs/test*
|