Commit Graph

800 Commits

Author SHA1 Message Date
eab609f535 Accommodate packagers with tagged release; using HEAD still recommended v3.1.0 2022-11-04 12:44:55 +03:00
ccee72f1d1 Correct variable name in help docs, closes #809 2022-04-07 21:05:38 +03:00
2137c14370 Fixes #811, #799: Add language specific regex support for custom tag kinds (#812)
* Add language specific regex support for custom tag kinds

* Fix typo in example
2022-03-28 08:56:27 -05:00
69659cfc9d Don't show errors when opening preview window (#810)
* 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>
2022-03-15 07:06:21 -05:00
a0343f0090 Use tagbar_iconchars not present in emoji (#807) 2022-02-06 10:18:01 +03:00
88242397b4 Only set ballooneval while in tagbar window (#805)
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.
2022-01-20 10:51:39 -06:00
3188ab1ee8 use g:tagbar_highlight_method as default in tagbar#currenttag and forward search method from :TagbarCurrentTag (#803)
* allow to specify {search-method} in :TagbarCurrentTag command

* tagbar#currenttag now uses g:tagbar_highlight_method as default search method
2022-01-11 10:41:32 -06:00
as
0441c1c6d9 Add support of TagbarOpen arguments for TagbarToggle (#800) 2021-12-08 16:49:40 -06:00
dd2f46af80 Add support for powershell (#798) 2021-11-27 00:52:28 +03:00
253b6f2628 Fix for #783 - set colorcolumn to empty string (default) for local tagbar window (#797) 2021-11-23 14:36:33 -06:00
b6669c7c9d Clear old TagbarCleanupAutoCmds before redefining (#791) 2021-09-28 07:08:51 +03:00
bb8ca482a5 Highlight key-map options in help file (#788)
Signed-off-by: Daniel J. Perry <dperry45@gatech.edu>
2021-08-24 09:16:57 -05:00
ab6f2d5a68 feature: Add basic Crystal support (#787) 2021-08-06 07:23:55 -05:00
cd74f18d10 Add JumpToNearbyTag functionality (#780)
* 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.
2021-08-04 09:26:06 -05:00
23ea1961b9 Fix for #784 - add additional option for g:tagbar_wrap (#785)
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.
2021-08-02 09:59:38 -05:00
a0a5714910 Add ability to fold/unfold headers on <CR> in tagbar window (#781)
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.
2021-07-27 08:01:05 -05:00
2da3443f5f Better handling for typeinfo.deffile (#777)
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.
2021-06-24 09:37:26 -05:00
285afffc47 Fix perl definitions (#775)
Closes #774
2021-06-23 07:39:14 -05:00
225e6530c2 Fix for #750 to cleanup files once tagbar window closed (#769)
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.
2021-05-27 09:33:59 -05:00
19c0078f76 Merge pull request #767 from preservim/contributors 2021-05-25 10:38:07 +03:00
84afd8e802 Remove open buffer from known files on bdelete or bwipe (#768)
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.
2021-05-24 09:28:01 -05:00
4265c61aa1 Include Paypal link to tip @raven42 in sponsor config 2021-05-21 18:47:56 +03:00
0e832c54a6 Callout @raven42 as active maintainer 2021-05-21 18:47:19 +03:00
1919ee66df Update ballpark contributor count 2021-05-21 15:59:38 +03:00
3fa6c4e266 Add GitHub funding spec, add Caleb's preferred tipping channels 2021-05-21 15:58:36 +03:00
fd4bc0f0e4 Add html tags (#763)
* Added html tags in uctags.vim

* Added html tags in uctags.vim
2021-05-17 07:20:51 -05:00
bafd7c51e0 README: Name the recommended ctags impl first (#761)
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).
2021-05-15 23:03:12 +03:00
f6012cb65d Improve Markdown and add reStructured text support (#756)
Closes #754

Co-authored-by: Henrik Holst <hholst80@users.noreply.github.com>
2021-03-23 13:47:06 +03:00
51ff7a0540 Fix CI runs to actually run nvim instead of just claiming to (#616)
* Actually run CI tests using Neovim instead of just pretending

* Overhaul CI check workflow
2021-02-18 10:20:33 +03:00
ac8eafc9c0 Overhaul CI check workflow 2021-02-18 10:17:16 +03:00
83c573c0ec Actually run CI tests using Neovim instead of just pretending 2021-02-18 10:08:43 +03:00
45581e021c Add new language: CMake (#747) 2021-02-18 09:08:44 +03:00
77d7ddd683 Split PR review from branch check workflows 2021-02-18 09:01:03 +03:00
2fb3171ed7 Fix incorrect example for g:tagbar_status_func (#752) 2021-02-12 12:24:27 -06:00
7e8aeb6970 Use utf8 encoding to read ctags output, fixes #748 (#749)
Co-authored-by: Vivian De Smedt <Vivian.De-Smedt@tatasteeleurope.com>
2021-02-01 08:12:54 +03:00
7a968502d7 Fix CJK character decoding problem (#745) 2021-01-25 07:12:19 +03:00
16f3f9b77b Accommodate packagers with tagged release; using HEAD still recommended v3.0.0 2021-01-21 07:54:15 +03:00
59eef1364d Correct the name to properly escape out any special chars for the substitution (#740) 2021-01-15 06:14:27 -06:00
a52610c009 add a new language (#738)
* Update ctags.vim

* update uctags.vim with lpc
2021-01-14 08:30:49 -06:00
c7e7d5e565 Escape special characters in pattern searching (#737) 2021-01-12 20:45:53 +03:00
e6e6582739 Add g:tagbar_no_autocmds option to disable almost all autocmds (#688)
* Closed #578 - Add `g:tagbar_no_autocmds` option to disable almost all autocommands

* Rework to be more streamlined
2021-01-12 07:41:38 -06:00
2a36ad79a7 Add TagbarJump (#515)
Co-authored-by: Sundström Valter <mail@valter.nu>
Co-authored-by: David Hegland <david.hegland@broadcom.com>
2021-01-12 07:41:44 +03:00
6f02f1f852 Add g:tagbar_highlight_follow_insert option (#725)
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
2021-01-11 07:24:49 -06:00
778d41f437 Improve tag highlighting and signature matching (#735)
1. Correctly highlight tags that contain spaces.
2. Match function signature on special case: operator()(...).
2021-01-11 07:23:42 -06:00
978e1fe761 Fix the problem that the data type was unexpectedly displayed in the C++ destructor's tag. (#734)
* 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>
2021-01-07 07:31:45 -06:00
4c1a1a1bc6 Use universal_newlines for Popen call (#733)
Closes #629
2021-01-06 07:34:09 -06:00
f8e8f8cfb4 Add support for frames kind in tex file definition (#730)
Closes #654
2021-01-06 15:25:57 +03:00
5dd1102552 Add support for kotlin type (#731)
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.
2021-01-06 15:25:33 +03:00
52ec4e03f3 Feature Request: Ignore anonymous option (#727)
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.
2021-01-06 15:24:33 +03:00
7cf83a4330 Check for tilde in cpp destructor (#732) 2021-01-06 15:24:14 +03:00