@@ -34,5 +34,26 @@ def get_erl_lib_dir():
3434 'take_define' : re .compile (r'\?\s*(\w+)' ),
3535 'take_include' : re .compile (r'-include\("([^\)]*)"\)' )
3636 },
37- 'package_name' : 'Erl-AutoCompletion'
37+ 'package_name' : 'Erl-AutoCompletion' ,
38+ '-key' : [
39+ ["-behaviour\t Directives" , "-behaviour(${1:behaviour})." ],
40+ ["-callback\t Directives" , "-callback ${1:function}(${2:Parameters}) -> ${3:ReturnType}." ],
41+ ["-compile\t Directives" , "-compile([${1:export_all}])." ],
42+ ["-define\t Directives" , "-define(${1:macro}${2: (${3:param})], ${4:body})." ],
43+ ["-else\t Directives" , "-else." ],
44+ ["-endif\t Directives" , "-endif." ],
45+ ["-export\t Directives" , "-export([${1:function}/${2:arity}])." ],
46+ ["-export_type\t Directives" , "-export_type([${1:type}/${2:arity}])." ],
47+ ["-ifdef\t Directives" , "-ifdef(${1:macro})." ],
48+ ["-ifndef\t Directives" , "-ifndef(${1:macro})." ],
49+ ["-import\t Directives" , "-import(${1:module}, [${2:function}/${3:arity}])." ],
50+ ["-include\t Directives" , "-include(\" ${1:file.hrl}\" )." ],
51+ ["-include_lib\t Directives" , "-include_lib(\" ${1:app/file.hrl}\" )." ],
52+ ["-module\t Directives" , "-module(${1:${TM_FILEPATH/^.*\\ /(.*)\\ .[a-z]+$/$1/g}})." ],
53+ ["-opaque\t Directives" , "-opaque ${1:type}() :: ${2:term()}." ],
54+ ["-record\t Directives" , "-record(${1:record, {${2:field}${3: = ${4:value}}}})." ],
55+ ["-spec\t Directives" , "-spec ${1:function}(${2:Parameters}) -> ${3:ReturnType}." ],
56+ ["-type\t Directives" , "-type ${1:type}() :: ${2:term()}." ],
57+ ["-undef\t Directives" , "-undef(${1:macro})." ]
58+ ]
3859}
0 commit comments