Skip to content

Instantly share code, notes, and snippets.

@ahungry
Forked from sogaiu/janet.ctags
Created April 22, 2020 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahungry/1574ae4a6c103bef2bc8a228e268d367 to your computer and use it in GitHub Desktop.
Save ahungry/1574ae4a6c103bef2bc8a228e268d367 to your computer and use it in GitHub Desktop.
~/.ctags.d/janet.ctags -- for indexing top-level things in janet code -- usage: `ctags -R <dir>` or for emacs, `ctags -e -R <dir>` -- sorry, no destructuring support
--exclude=.git
--langdef=Janet
--langmap=Janet:.janet
--regex-janet=/^\([ \t]*def[ \t]+([^0-9:#][^ \t\[{(]+)/\1/D,def/
--regex-janet=/^\([ \t]*def-[ \t]+([^0-9:#][^ \t\[{(]+)/\1/d,private def/
--regex-janet=/^\([ \t]*defglobal[ \t]+([^0-9:#][^ \t\[{(]+)/\1/g,defglobal/
--regex-janet=/^\([ \t]*defmacro[ \t]+([^0-9:#][^ \t\[{(]+)/\1/M,macro/
--regex-janet=/^\([ \t]*defmacro-[ \t]+([^0-9:#][^ \t\[{(]+)/\1/m,private macro/
--regex-janet=/^\([ \t]*defn[ \t]+([^0-9:#][^ \t\[{(]+)/\1/N,function/
--regex-janet=/^\([ \t]*defn-[ \t]+([^0-9:#][^ \t\[{(]+)/\1/n,private function/
--regex-janet=/^\([ \t]*var[ \t]+([^0-9:#][^ \t\[{(]+)/\1/V,var/
--regex-janet=/^\([ \t]*var-[ \t]+([^0-9:#][^ \t\[{(]+)/\1/v,private var/
--regex-janet=/^\([ \t]*varfn[ \t]+([^0-9:#][^ \t\[{(]+)/\1/R,varfun/
--regex-janet=/^\([ \t]*varglobal[ \t]+([^0-9:#][^ \t\[{(]+)/\1/G,varglobal/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment