Potential fix for #772
This issue is being caused by the InitWindow() routine not being called
when a split of the tagbar window occurs. This will potentially fix that
issue by forceably calling s:InitWindow() when a new tagbar window is
found.
Note however, that when closing one of the split tagbar windows, it does
cause the other one to close as well. It looks like there is an issue on
the close processing that it identifies all windows that have the tagbar
buffer loaded as the tagbar window.
Fixes#750
Once the tagbar window is opened and a file is registered, that file
stays in memory even if the tagbar window is closed. This allows tagbar
to cache the info so if the tagbar window is opened again, it doesn't
have to rescan the file and rerun ctags on the file.
However if this buffer is wiped out using `:bwipe <file>`, then the
buffer is completely unloaded from vim memory and also needs to be
unloaded from tagbar memory. This works if the tagbar window is open,
but in the event the tagbar window is closed, all autocmds are
unregistered, so tagbar never gets the BufWipeout notification. This
results in tagbar leaving the buffer in active memory even though the
buffer doesn't exist anymore.
This fix will leave the BufWipeout and BufDelete autocmds active even if
the tagbar window is closed. This allows the buffer cleanup to occur on
a `:bwipe` command even if the tagbar window is closed.
Closes#750
On `:bdelete` or `:bwipe` of a file, remove the file from the known file
listing even if the tagbar window is not open. Previously was only
removing the file if the tagbar window was open.
Clearly steer users away from Exuberant Ctags and be more explicit that
it is less well supported and will be deprecated. Rephrase sentence on
additional providers because an exemplary enumeration (such as) does not
redundantly need to add (or others).
This adds an option making the highlight in the Tagbar follow the cursor
in insert mode as well. This feature is guarded behind an option because
it may introduce some delay in the input.
GitHub: closes#724
* Fix the problem that the data type was unexpectedly displayed in the C++ destructor's tag.
* Update autoload/tagbar/prototypes/normaltag.vim
Co-authored-by: Caleb Maclennan <caleb@alerque.com>
Closes#632
Support for kotlin type was recently added into universal ctags
(https://github.com/universal-ctags/ctags/pull/2769)
Currently there is no scope information in the ctags definition. So the
`scope2kind` and `kind2scope` settings are not functional. If support is
added, then these definitions can be updated to include that info.
Note: these kind definitions are based on the output from `ctags
--list-kinds=kotlin` which is slightly different than the definitions
provided in #632. So this may not be fully compatible with the custom
ctags configuration from that issue. The default definition for
univercal ctags should be used instead.
Closes#726
New option `g:tagbar_ignore_anonymous` to ignore any tags with __anon in
the tag name. CTAGS will print any unlabeled tags with the __anon###
name with a custom hash. This option will ignore those tags and they
will not be visible in the tagbar window. This could potentially result
in unknown behavior when a parent object has been ignored in this way.
However these tags should then fall under the default hierarchy for that
particular kind.
* Add option for g:tagbar_highlight_current_tag
Closes#708
Add option for g:tagbar_highlight_current_tag which will allow
highlighting of tags on the current line in addition to highlighting the
scoped tags. Reverts the behavior added in #638 to the default from
before that commit
* Rework to allow direct configuration of highlight method
* Address review comments
* Add g:tagbar_jump_lazy_scroll option.
When this option is on, a jump to a tag will only cause the
window to scroll if the tag line is not already visible on
the window. If it is visible, the cursor will simply move
to that line without scrolling the window. If the tagline
is not visible then the window will be scrolled as in current
behavior (according to the g:tagbar_jump_offset option).
Fixes#703
* Factor our new logic into a function.
* Add jump target line to doc.
* Add linenr protection into getPrototype
Closes#706
Add protection to not go beyond the last line in the file when calling the `s:getPrototype()` routine. This occurs when there is an `=` character in the tag prototype. For example in a python tag with a parameter line this: `some_function(arg1, optional_arg_2=False)`
* Fix issue with python prototypes that can include `=` character in the argument list
* Add support for scope
Closes#508, #516
Add --fields=e (end) to the ctags field types to look for the end of the scope.
Update the `s:GetNearbyTag()` routine to use this scope to look for the correct tag.
* Update comment to call out exuberant ctags not supporting the -e option
* Update autoload/tagbar.vim
Co-authored-by: Caleb Maclennan <caleb@alerque.com>
* Optimize nearesttag search, add option for scoped-stl search method
Co-authored-by: Caleb Maclennan <caleb@alerque.com>
Closes#680
Add `g:tagbar_show_data_type` field to show the tag datatype next to the tag in the tagbar window
This uses the `--fields=t` field to get the datatype from ctags. If not found, then it will attempt to derive the datatype by extracting all the output from the `pattern` preceeding the tag name.
More testing is needed on other languages. So far this has been stable with C / C++ files parsing the datatype from ctags output. It has also been tested with Java files for the inferred datatype by parsing the pattern line and pulling out everything prior to the tag.