From 209fa4ec72c8719d82e049c5d10a06f0a679671c Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 12 Jun 2024 16:07:50 -0400 Subject: Followup changes to ctags These were just hanging around as I was doing other things. Included in this commit are the following: - Configure it in .ctags.d to only index the languages I use - Add support for sources listed in Sources.json - Fix broken link to inspekt3d repo --- .ctags.d/base.ctags | 11 +++++++++++ .ctags.d/nix.ctags | 14 ++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 .ctags.d/base.ctags create mode 100644 .ctags.d/nix.ctags (limited to '.ctags.d') diff --git a/.ctags.d/base.ctags b/.ctags.d/base.ctags new file mode 100644 index 0000000..0bbf5ee --- /dev/null +++ b/.ctags.d/base.ctags @@ -0,0 +1,11 @@ +--languages=Haskell +--languages=+Python +--languages=+C +--languages=+Rust +--languages=+Lisp +--languages=+Scheme +# common excludes +--exclude=.mypy_cache +--exclude=.git +--exclude=.direnv +--exclude=.ruff_cache diff --git a/.ctags.d/nix.ctags b/.ctags.d/nix.ctags new file mode 100644 index 0000000..7a12815 --- /dev/null +++ b/.ctags.d/nix.ctags @@ -0,0 +1,14 @@ +--langdef=nix +--languages=+nix +--langmap=nix:.nix +# packages are "name = " or "pname = " +--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* -- cgit v1.2.3