* Add universal-ctags Haskell support
based on: Universal Ctags 5.9.0
* Update autoload/tagbar/types/uctags.vim
Co-authored-by: David Hegland <darth.gerbil@gmail.com>
---------
Co-authored-by: David Hegland <darth.gerbil@gmail.com>
* Fix for #825 - doc update
Closes#825
Doc update for `g:tagbar_ignore` to switch from `BufReadPost` to
`BufReadPre` for large files.
Also fix vint issue
* Fix merge issue
* Fix merge issue... again
* Fix merge issue... again
Closes#821
This will add the `autoclose_netrw` configuration option. If set to 1
this will close out of vim if tagbar and netrw (or nerdtree) are the
only remaining windows. If set to 0, then this will leave the netrw (or
nerdtree) window if that is the only remaining window once tagbar is
closed.
* Don't show errors when opening preview window (occurs when buffer has unsaved changes).
* Update autoload/tagbar.vim
Co-authored-by: David Hegland <darth.gerbil@gmail.com>
Co-authored-by: David Hegland <darth.gerbil@gmail.com>
ballooneval is a global option, so setting it while initialising tagbar
permanently enables ballooneval functionality for the GUI, overriding
the vim default (disabled) or a user explicitly setting noballooneval.
To address this, only set ballooneval when entering the tagbar window,
and restore the original ballooneval setting when leaving the window.
This is not perfect, but there is precedent, Netrw behaves like this.
* Add JumpToNearbyTag functionality
Closes#779
Updated functions:
`s:GetNearbyTag()` - Allow for a direction parameter to be passed into
the routine. This will allow for a forward or backward search. It will
default to a backward search line the current behavior if the
`a:direction` parameter is not used.
`s:JumpToTag()` - Allow for an optional parameter to be passed in to
specify the tag instead of using the tag under the cursor on the current
line. This also allows this routine to be executed from the file window
instead of the tagbar window. Assume `autoclose=0` if passing in the tag.
Add new functions:
`s:JumpToNearbyTag()` - This routine will do a forward or backward search
for the nearst tag using the `GetNearbyTag()` with the new direction
field, then call the `JumpToTag()` with the tag we found.
`tagbar#jumpToNextTag()` - New public facing wrapper routine around the
`JumpToNearbyTag()` routine. Optionally take in `a:lnum` and
`a:search_method` to be used in other routines. If `a:lnum` is not
present, then the line number will search from the next or previous line
depending on the `a:direction` value.
TODO:
- [ ] Still need to write up the documentation for this.
- [ ] Possibly look at providing default keymap. Currently this can be
done using a custom definition in `.vimrc`.
* Add documentation and fix lazy scroll
Added documentation for this feature
Corrected the lazy scroll behavior when the next/prev tag is visible
Use the existing `w:autoclose` if set, else default to 0.
* Fix argument ordering
Correct the argument ordering and numbering for the jumpToNearbyTag()
routine.
Add documentation example for the 'nearest' search-method.
Rename jumpToNextTag() to jumpToNearbyTag() to be more inline with the
other routines.
* remove debug
* Fix current line processing
In the event there is a tag on the immediately previous/next line, then
the GetNearbyTag will return that tag even if the scoped-stl
search-method is set.
* Cleanup optional argument initialization
* Update tagbar#jumpToNearbyTag() - remove lnum and add flags parameter
Changes to the tagbar#jumpToNearbyTag() routine to allow more
flexibility. Removing the optional lnum parameter as this likely will
not be needed and could actually cause confusion in its use. Add a flags
field so different options can be set such as the 's':'scroll_offset'
option.
Adding additional setting to `g:tagbar_wrap` to allow for more granular
control of the `linebreak` functionality. If set to 1, linebreak will
also be set. If set to 2, linebreak will be disabled.
Closes#778
Add to the `JumpToTag()` routine so if the current line does not contain
a valid tag, then it will check if the line is foldable, and if so will
either call the `OpenFold()` or `CloseFold()` as necessary. This allows
the `<Enter>` key to be used to toggle a foldable header in the tagbar
window.
Closes#776
Change the ordering of the --options field when executing ctags. This
allows overrides of things like the --<lang>-kinds definitions to omit
certain kinds.
Also add check to ensure the typeinfo.deffile exists before attempting
to use it in the ctags arguments.
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.
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