This makes it possible to actually see the function names in
stacktraces. It also means that the internal objects of some of the tag
prototypes don't need to be public any more.
The TagbarKind syntax match pattern has a zero-width look-behind atom
with unlimited length. This can slow down syntax highlighting. Since in
this case there can only be 1 or 2 characters that get matched, we can
set a limit for the match, thus speeding up the matching.
Since the limit unfortunately works with bytes instead of characters,
use 3 instead of 2 to account for double-width folding characters.
Exuberant Ctags:
- ObjectiveC
Universal Ctags:
- Ada
- Autoconf
- Automake
- Ctags config
- D
- Elm (courtesy of @bitterjug)
- Go
- ObjectiveC
- Perl 6
- Protobuf (closes#437)
- R
Also various improvements to existing definitions based on changes in
Universal Ctags.
Added scopes, so tagbar will show the following hierarchy:
```
namespace
subnamespace
...
class
property (variable)
...
method
...
```
Additional kinds added (basically the same as #283):
* namespaces
* use aliases (imports)
* traits
The view files created with the 'mkview' command run the
'SessionLoadPost' autocommand at the end, which creates problems if
Tagbar has alread been initialized. Add a new variable so that we can
detect this situation.
Currently the tags will always get updated immediately when writing a
file. However, for large files that can slow down the writing process
noticeably, leading to annoying pauses. This commit instead defers the
updating process to the first CursorHold/CursorHoldI event after writing
a file, which should make the process much less noticeable.
Closes#289Closes#381
References SpaceVim/SpaceVim#129
When constructing the tag tree it is often necessary to look up tags
with a certain name and other attributes at the current depth. This was
previously done with the filter() function on the list of all the
relevant tags. However, this filtering is very slow.
This commit changes the FileInfo and TagInfo objects to save added tags
in a dictionary indexed by the name of the tag in addition to the list
(which is still maintained in parallel since it is necessary for things
like sorting). This significatly speeds up tag lookup since most tags
have unique names.
The current algorithm for contructing the tag tree works pretty well
even when pseudo-tags are encountered, but is quite complex, hard to
understand, and hard to tweak and optimize. This commit rewrites the
algorithm to a relatively straight-forward recursive algorithm that
makes use of placeholder pseudo-tags if required that will get replaced
if the actual tag is encountered later.