liuchengxu / vista.vim

:cactus: Viewer & Finder for LSP symbols and tags

Home Page:https://liuchengxu.github.io/vista.vim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tree view for ctags

jiangyinzuo opened this issue · comments

Is your feature request related to a problem? Please describe.

The tagbar.vim plugin supports parsing ctags and provides a tree view functionality.

image

In vista.vim, we can also obtain a tree view using LSP (such as :Vista coc).

image

Indeed, :Vista ctags provides a flat view rather than a tree view.
image

So is it possible to support tree view for :Vista ctags

Describe the solution you'd like

Perhaps we can utilize the fields in the ctags file format to obtain the tree view.

a	foo.cpp	/^	int a = 1;$/;"	v	namespace:foo::bar::baz1::baz2	typeref:typename:int
bar	foo.cpp	/^namespace foo::bar {$/;"	n	namespace:foo	file:
bar	foo.cpp	/^namespace foo::bar::baz3 { }$/;"	n	namespace:foo	file:
baz1	foo.cpp	/^	namespace baz1::baz2 {$/;"	n	namespace:foo::bar	file:
baz2	foo.cpp	/^	namespace baz1::baz2 {$/;"	n	namespace:foo::bar::baz1	file:
baz3	foo.cpp	/^namespace foo::bar::baz3 { }$/;"	n	namespace:foo::bar	file:
foo	foo.cpp	/^namespace foo::bar {$/;"	n	file:
foo	foo.cpp	/^namespace foo::bar::baz3 { }$/;"	n	file:
zz	foo.cpp	/^	void zz() {}$/;"	f	namespace:foo::bar::baz1::baz2	typeref:typename:void

The tree view is already supported by :Vista ctags, there is some space for improvement though (#320).