mirror of
https://github.com/keith/swift.vim.git
synced 2025-12-12 20:35:53 +01:00
9
ctags/swift.cnf
Normal file
9
ctags/swift.cnf
Normal file
@@ -0,0 +1,9 @@
|
||||
--langdef=swift
|
||||
--langmap=swift:.swift
|
||||
--regex-swift=/[[:<:]]class[[:>:]][[:space:]]+([[:alnum:]_]+)/\1/c,class/
|
||||
--regex-swift=/[[:<:]]enum[[:>:]][[:space:]]+([[:alnum:]_]+)/\1/e,enum/
|
||||
--regex-swift=/[[:<:]]func[[:>:]][[:space:]]+([[:alnum:]_]+)/\1/f,function/
|
||||
--regex-swift=/[[:<:]]protocol[[:>:]][[:space:]]+([[:alnum:]_]+)/\1/P,protocol/
|
||||
--regex-swift=/[[:<:]]struct[[:>:]][[:space:]]+([[:alnum:]_]+)/\1/s,struct/
|
||||
--regex-swift=/[[:<:]]extension[[:>:]][[:space:]]+([[:alnum:]_]+)/\1/E,extension/
|
||||
--regex-swift=/[[:<:]]typealias[[:>:]][[:space:]]+([[:alnum:]_]+)/\1/t,typealias/
|
||||
14
plugin/swift.vim
Normal file
14
plugin/swift.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
let g:tagbar_type_swift = {
|
||||
\ 'ctagstype': 'swift',
|
||||
\ 'kinds': [
|
||||
\ 'P:protocol',
|
||||
\ 'c:class',
|
||||
\ 's:struct',
|
||||
\ 'e:enum',
|
||||
\ 'E:extension',
|
||||
\ 'f:function',
|
||||
\ 't:typealias'
|
||||
\ ],
|
||||
\ 'sort': 0,
|
||||
\ 'deffile': expand('<sfile>:p:h:h') . '/ctags/swift.cnf'
|
||||
\ }
|
||||
Reference in New Issue
Block a user