# HG changeset patch # User Meredith Howard # Date 1590309005 18000 # Node ID b91d44fd967d8b7dd297941e726af416247279d0 # Parent 9b6eec375e56da8f319c2d2fbe519da565cbe0e8 iffy nim support diff --git a/.ctags b/.ctags --- a/.ctags +++ b/.ctags @@ -20,3 +20,16 @@ --regex-Elixir=/^[ \t]*defmodule[ \t]+([A-Z][a-zA-Z0-9_]*\.)*([A-Z][a-zA-Z0-9_?!]*)/\2/m,modules,modules (defmodule ...)/ --regex-Elixir=/^[ \t]*defprotocol[ \t]+([A-Z][a-zA-Z0-9_]*\.)*([A-Z][a-zA-Z0-9_?!]*)/\2/p,protocols,protocols (defprotocol...)/ --regex-Elixir=/^[ \t]*Record\.defrecord[ \t]+:([a-zA-Z0-9_]+)/\1/r,records,records (defrecord...)/ + +--langdef=nim +--langmap=nim:.nim +--regex-nim=/(\S+)\*?\s*=\s*(ref\s+)?object/\1/c,class/ +--regex-nim=/(\w+)\*?\s*=\s*enum/\1/e,enum/ +--regex-nim=/(\S+)\*?\s*=\s*tuple/\1/t,tuple/ +--regex-nim=/(\w+)\*?\s*=\s*range/\1/r,subrange/ +--regex-nim=/(\w+)\*?\s*=\s*proc/\1/P,proctype/ +--regex-nim=/proc\s+(\w+)/\1/p,procedure/ +--regex-nim=/method\s+(\w+)/\1/m,method/ +--regex-nim=/proc\s+`([^`]+)`/\1/o,operator/ +--regex-nim=/template\s+(\w+)/\1/T,template/ +--regex-nim=/macro\s+(\w+)/\1/M,macro/ diff --git a/.vim/plugin/tagbar-types.vim b/.vim/plugin/tagbar-types.vim --- a/.vim/plugin/tagbar-types.vim +++ b/.vim/plugin/tagbar-types.vim @@ -64,3 +64,19 @@ let g:tagbar_type_go = { \ 'ctagsbin' : 'gotags', \ 'ctagsargs' : '-sort -silent' \ } + +let g:tagbar_type_nim = { + \ 'ctagstype': 'nim', + \ 'kinds' : [ + \'c:classes', + \'e:enums', + \'t:tuples', + \'r:subranges', + \'P:proctypes', + \'p:procedures', + \'m:methods', + \'o:operators', + \'T:templates', + \'M:macros' + \ ] +\}