From ca2d5282bf14e8014d9fa018e92f4a1dc4234c3b Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Tue, 11 Apr 2023 18:05:06 +0200 Subject: Revert to using ctags --- .config/ctags/gradle.ctags | 4 ---- .config/ctags/groovy.ctags | 7 ------- .ctags | 20 ++++++++++++++++++++ Brewfile | 2 +- README.md | 4 +--- 5 files changed, 22 insertions(+), 15 deletions(-) delete mode 100644 .config/ctags/gradle.ctags delete mode 100644 .config/ctags/groovy.ctags create mode 100644 .ctags diff --git a/.config/ctags/gradle.ctags b/.config/ctags/gradle.ctags deleted file mode 100644 index 950c69f..0000000 --- a/.config/ctags/gradle.ctags +++ /dev/null @@ -1,4 +0,0 @@ ---langdef=Gradle ---langmap=Gradle:.gradle ---regex-Gradle=/^[ \t]*task[ \t]+([a-zA-Z0-9]+)/\1/t,task/ ---regex-Gradle=/^[ \t]*def[ \t]+([a-zA-Z0-9_]+\([A-Za-z0-9 _,]*\))[ \t]+/\1/m,method/ diff --git a/.config/ctags/groovy.ctags b/.config/ctags/groovy.ctags deleted file mode 100644 index a5d1ad3..0000000 --- a/.config/ctags/groovy.ctags +++ /dev/null @@ -1,7 +0,0 @@ ---langdef=groovy ---langmap=groovy:.groovy ---regex-groovy=/^[ \t]*[(static|private|public|protected) \t]*(def|[A-Za-z0-9_.]+)[ \t]+([A-Za-z0-9_]+)[ \t]*\(/\2/f,function,functions/ ---regex-groovy=/^[ \t]*private def[ \t]+([A-Za-z0-9_]+)[ \t]*/\1/v,private,private variables/ ---regex-groovy=/^[ \t]*public def[ \t]+([A-Za-z0-9_]+)[ \t]*/\1/u,public,public variables/ ---regex-groovy=/^[ \t]*[abstract ( \t)]*[(private|public) ( \t)]*class[ \t]+([A-Za-z0-9_]+)[ \t]*/\1/c,class,classes/ ---regex-groovy=/^[ \t]*[abstract ( \t)]*[(private|public) ( \t)]*enum[ \t]+([A-Za-z0-9_]+)[ \t]*/\1/c,class,classes/ diff --git a/.ctags b/.ctags new file mode 100644 index 0000000..3b59731 --- /dev/null +++ b/.ctags @@ -0,0 +1,20 @@ +--langdef=Gradle +--langmap=Gradle:.gradle +--regex-Gradle=/^[ \t]*task[ \t]+([a-zA-Z0-9]+)/\1/t,task/ +--regex-Gradle=/^[ \t]*def[ \t]+([a-zA-Z0-9_]+\([A-Za-z0-9 _,]*\))[ \t]+/\1/m,method/ + +--langdef=groovy +--langmap=groovy:.groovy +--regex-groovy=/^[ \t]*package[ \t]+([a-zA-Z0-9.-_]+)/\1/p,package/ +--regex-groovy=/^[ \t]*(private|public)?[ \t]*(abstract|final|static)?[ \t]*class[ \t]+([A-Za-z0-9_]+)/\3/c,class/ +--regex-groovy=/^[ \t]*(private|public)?[ \t]*interface[ \t]+([A-Za-z0-9_]+)/\2/i,interface/ +--regex-groovy=/^[ \t]*(private|public)?[ \t]*trait[ \t]+([A-Za-z0-9_]+)/\2/t,trait/ +--regex-groovy=/^[ \t]*(private|public)?[ \t]*enum[ \t]+([A-Za-z0-9_]+)/\2/e,enum/ +--regex-groovy=/^[ \t]*[(abstract|final|static) \t]*((def|void|byte|int|short|long|float|double|boolean|char|[A-Z][a-zA-Z0-9_]*)[ \t]+)?([a-zA-Z0-9_]+\(.*\))[ \t]+/~\3/m,package method/ +--regex-groovy=/^[ \t]*public[ \t]+[(abstract|final|static) \t]*((def|void|byte|int|short|long|float|double|boolean|char|[A-Z][a-zA-Z0-9_]*)[ \t]+)?([a-zA-Z0-9_]+\(.*\))[ \t]+/+\3/m,public method/ +--regex-groovy=/^[ \t]*protected[ \t]+[(abstract|final|static) \t]*((def|void|byte|int|short|long|float|double|boolean|char|[A-Z][a-zA-Z0-9_]*)[ \t]+)?([a-zA-Z0-9_]+\(.*\))[ \t]+/#\3/m,protected method/ +--regex-groovy=/^[ \t]*private[ \t]+[(abstract|final|static) \t]*((def|void|byte|int|short|long|float|double|boolean|char|[A-Z][a-zA-Z0-9_]*)[ \t]+)?([a-zA-Z0-9_]+\(.*\))[ \t]+/-\3/m,private method/ +--regex-groovy=/^[ \t]*[(final|static|synchronized) \t]*(def|byte|int|short|long|float|double|boolean|char|[A-Z][A-Za-z0-9_]*)[ \t]+([a-zA-Z0-9_]+)([ \t]*[\/]+.*)?/~\2/f,property/ +--regex-groovy=/^[ \t]*public[ \t]+[(final|static|synchronized) \t]*(def|byte|int|short|long|float|double|boolean|char|[A-Z][a-zA-Z0-9_]*)[ \t]+([a-zA-Z0-9_]+)([ \t]*[\/]+.*)?/+\2/f,public field/ +--regex-groovy=/^[ \t]*protected[ \t]+[(final|static|synchronized) \t]*(def|byte|int|short|long|float|double|boolean|char|[A-Z][a-zA-Z0-9_]*)[ \t]+([a-zA-Z0-9_]+)([ \t]*[\/]+.*)?/#\2/f,protected field/ +--regex-groovy=/^[ \t]*private[ \t]+[(final|static|synchronized) \t]*(def|byte|int|short|long|float|double|boolean|char|[A-Z][a-zA-Z0-9_]*)[ \t]+([a-zA-Z0-9_]+)([ \t]*[\/]+.*)?/-\2/f,private field/ diff --git a/Brewfile b/Brewfile index 8eefac1..c017fe2 100644 --- a/Brewfile +++ b/Brewfile @@ -5,7 +5,7 @@ brew "bash-completion" brew "fortune" brew "cowsay" brew "lolcat" -brew "universal-ctags" +brew "ctags" brew "cmake" brew "git" brew "git-crypt" diff --git a/README.md b/README.md index ee5852f..0db4eca 100644 --- a/README.md +++ b/README.md @@ -54,9 +54,7 @@ ln -sf ~/.rc/.config/tmuxinator/spc.yml ~/.config/tmuxinator/spc.yml ln -sf ~/.rc/.config/tmuxinator/mb.yml ~/.config/tmuxinator/mb.yml ln -sf ~/.rc/.config/tmuxinator/infra.yml ~/.config/tmuxinator/infra.yml -mkdir -p ~/.config/ctags -ln -sf ~/.rc/.config/ctags/groovy.ctags ~/.config/ctags/groovy.ctags -ln -sf ~/.rc/.config/ctags/gradle.ctags ~/.config/ctags/gradle.ctags +ln -sf ~/.rc/.ctags ~/.ctags cd ~/.rc git remote remove origin -- cgit v1.2.3