Skip to content

Commit

Permalink
Update types for go and tex (#466)
Browse files Browse the repository at this point in the history
* Remove -w in go types

* Revamp go types according to `ctags --list-kinds=go`

* Update tex types according to `ctags --list-kinds=tex`

Close #465
  • Loading branch information
liuchengxu authored Sep 14, 2023
1 parent f925e48 commit 40daf5e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
15 changes: 9 additions & 6 deletions autoload/vista/types/uctags/go.vim
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ let type_go.lang = 'go'

let type_go.kinds = {
\ 'p': {'long' : 'packages', 'fold' : 0, 'stl' : 0},
\ 'i': {'long' : 'imports', 'fold' : 0, 'stl' : 0},
\ 'n': {'long' : 'interfaces', 'fold' : 0, 'stl' : 0},
\ 'f': {'long' : 'functions', 'fold' : 0, 'stl' : 1},
\ 'c': {'long' : 'constants', 'fold' : 0, 'stl' : 0},
\ 's': {'long' : 'structs', 'fold' : 0, 'stl' : 1},
\ 'm': {'long' : 'methods', 'fold' : 0, 'stl' : 0},
\ 't': {'long' : 'types', 'fold' : 0, 'stl' : 1},
\ 'f': {'long' : 'functions', 'fold' : 0, 'stl' : 1},
\ 'v': {'long' : 'variables', 'fold' : 0, 'stl' : 0},
\ 'w': {'long' : 'struct members', 'fold' : 0, 'stl' : 0}
\ 's': {'long' : 'structs', 'fold' : 0, 'stl' : 1},
\ 'i': {'long' : 'interfaces', 'fold' : 0, 'stl' : 0},
\ 'm': {'long' : 'struct members', 'fold' : 0, 'stl' : 0},
\ 'M': {'long' : 'struct anonymous members', 'fold' : 0, 'stl' : 0},
\ 'n': {'long' : 'interface method specification', 'fold' : 0, 'stl' : 0},
\ 'Y': {'long' : 'unknown', 'fold' : 0, 'stl' : 0},
\ 'P': {'long' : 'imports', 'fold' : 0, 'stl' : 0},
\ 'a': {'long' : 'type aliases', 'fold' : 0, 'stl' : 0},
\ }

let type_go.sro = '.'
Expand Down
14 changes: 7 additions & 7 deletions autoload/vista/types/uctags/tex.vim
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ let s:types = {}
let s:types.lang = 'tex'

let s:types.kinds = {
\ 'i': {'long' : 'includes', 'fold' : 1, 'stl' : 0},
\ 'p': {'long' : 'parts', 'fold' : 0, 'stl' : 1},
\ 'c': {'long' : 'chapters', 'fold' : 0, 'stl' : 1},
\ 's': {'long' : 'sections', 'fold' : 0, 'stl' : 1},
Expand All @@ -14,8 +13,13 @@ let s:types.kinds = {
\ 'P': {'long' : 'paragraphs', 'fold' : 0, 'stl' : 0},
\ 'G': {'long' : 'subparagraphs', 'fold' : 0, 'stl' : 0},
\ 'l': {'long' : 'labels', 'fold' : 0, 'stl' : 0},
\ 'f': {'long' : 'frame', 'fold' : 0, 'stl' : 0},
\ 'g': {'long' : 'subframe', 'fold' : 0, 'stl' : 0}
\ 'i': {'long' : 'includes', 'fold' : 1, 'stl' : 0},
\ 'B': {'long' : 'bibliography', 'fold' : 0, 'stl' : 0},
\ 'C': {'long' : 'command', 'fold' : 0, 'stl' : 0},
\ 'o': {'long' : 'mathoperator', 'fold' : 0, 'stl' : 0},
\ 'e': {'long' : 'environment', 'fold' : 0, 'stl' : 0},
\ 't': {'long' : 'theorem', 'fold' : 0, 'stl' : 0},
\ 'N': {'long' : 'counter', 'fold' : 0, 'stl' : 0},
\ }

let s:types.sro = '""'
Expand All @@ -26,8 +30,6 @@ let s:types.kind2scope = {
\ 's' : 'section',
\ 'u' : 'subsection',
\ 'b' : 'subsubsection',
\ 'f' : 'frame',
\ 'g' : 'subframe'
\ }

let s:types.scope2kind = {
Expand All @@ -36,8 +38,6 @@ let s:types.scope2kind = {
\ 'section' : 's',
\ 'subsection' : 'u',
\ 'subsubsection' : 'b',
\ 'frame' : 'f',
\ 'subframe' : 'g'
\ }

let s:types.sort = 0
Expand Down

0 comments on commit 40daf5e

Please sign in to comment.