tagbar icon indicating copy to clipboard operation
tagbar copied to clipboard

Support for C++11 Trailing Return Type

Open oosubhisara opened this issue 6 years ago • 3 comments

So Tagbar can recognize this new format

auto getSomeValue() -> int
{
    return  10;
}

oosubhisara avatar Nov 29 '19 10:11 oosubhisara

Supporting new syntax like this is not up to tagbar per-se, the backend used needs to support it and give us some kind of a symbol marker for it. I'm not a C++ guy here so I'll be pretty dependent on you or somebody else reviewing this.

Can you check whether universal-ctags has support for this syntax? If not this needs to be reported upstream not here. It will be close to impossible to support if the tags generator doesn't report anything.

If it does, how is it labeling them in the output? It should be a pretty simple matter of adding the appropriate tag mapping, perhaps you could submit a PR that fixes this yourself.

alerque avatar Nov 29 '19 10:11 alerque

u-ctags supports the syntax:

[jet@living]~/var/ctags% cat /tmp/foo.cc
auto getSomeValue() -> int
{
    return  10;
}

[jet@living]~/var/ctags% u-ctags -o - /tmp/foo.cc
getSomeValue	/tmp/foo.cc	/^auto getSomeValue() -> int$/;"	f	typeref:typename:int

masatake avatar Jun 08 '20 01:06 masatake

@masatake We'd be happy to accept a PR that added first class support for mapping that ctags output to the existing tagbar layouts.

alerque avatar Jun 08 '20 06:06 alerque