829 Commits

Author SHA1 Message Date
2ef4ecba94 Allow custom language definitions (#876)
* Add second --option directive

* Only add first --options for custom language

* Save supported_types to avoid extra ctags calls

---------

Co-authored-by: Andy McAliley <AndyMcAliley@users.noreply.github.com>
Co-authored-by: Andy McAliley <wmcaliley@usgs.gov>
2025-06-11 07:58:49 -05:00
b72250e9d7 Update check action to use ubuntu-latest (#902) 2025-06-03 12:17:02 -05:00
feadb3b3a6 Quick Typo Fix. (#901) 2025-06-03 08:41:55 -05:00
8de7694c0a Fixes 845: Call init on update (#897)
If tagbar is not yet initialized, then initialize it upon call to `Update() | jump() | jumpToNearbyTag()`. This will ensure that we have loaded the file.
2024-12-27 07:24:17 -06:00
5e090da54b Running tagbar with airline ... (golang methods support) (#896)
- Complete prior golant fix #894 with methods support

Signed-off-by: <rampxxxx@gmail.com>
Co-authored-by: Javier Garcia <javier.martin.garcia@ibm.com>
2024-11-11 11:20:58 -06:00
1d22809dbe Higher tolerance for splitting tag line (#895) 2024-11-11 07:22:14 -06:00
4a1c46d8dc Running tagbar with airline broke TagbarCurrent (#894)
- It seems that airline initialize with uctags kinds table but
after that call InitTypes but there has wrong values.

Signed-off-by: <rampxxxx@gmail.com>
Co-authored-by: Javier Garcia <javier.martin.garcia@ibm.com>
2024-11-07 09:09:38 -06:00
1c5a358f0b This adds support for controlling display of suffix/prefix (#893)
* This adds support for controlling display of suffix/prefix

This adds the `g:tagbar_show_prefix` and `g:tagbar_show_suffix` options. These will help control if the prefix info and/or suffix info is printed in the tagbar window for the tag.

This is just test code for now.

* Correct the `show_prefix` behavior so it has proper whitespacing
2024-11-05 08:10:19 -06:00
d55d454bd3 Add Device Tree Source(DTS) support (#890) 2024-08-05 10:28:31 -05:00
bc087d88de Add program, package and interface to systemverilog scopes (#888) 2024-07-27 11:31:10 -05:00
1690b19ea6 Update uctags.vim (#887)
* Update uctags.vim

Add for systemverilog.  Accdording to https://docs.ctags.io/en/latest/man/ctags-lang-verilog.7.html

* Update autoload/tagbar/types/uctags.vim

Incorporating review comments as per note from submitter

---------

Co-authored-by: David Hegland <darth.gerbil@gmail.com>
2024-07-24 11:01:19 -05:00
0815b5455c Correct the behavior of the custom ctagsbin override (#881)
In the event the user has defined a custom ctagsbin for a specific type, and they have also defined the `kinds`, then we do not want to override that choice. Instead only override the `kinds` if the custom ctagsbin is set without the `kinds` being provided.
2024-06-06 07:30:43 -05:00
12edcb5944 Update tagbar.txt to fix typo (#868)
Fixes #867
2024-01-26 12:46:24 -06:00
fcd31ec145 Update vint.yml (#865)
It looks like the vint package is not correct with python 3.12.  Need to test with a different python version.
2023-12-21 07:16:04 -06:00
ce59bebcf8 Should use s:shell_error not v:shell_error (#864) 2023-12-21 07:00:18 -06:00
5d6990e4fc Merge bibtex and biblatex as much as possible (#862)
Closes #856

The universal-ctags update includes both the bibtex and biblatex parser
when processing a .bib file even when language is forced. This will merge
the two as much as possible. There are a number of conflicts and will
use the bibtex standard type in that instance.
2023-09-25 13:08:39 -05:00
a98d4f07c9 Add support for biblatex (#861)
Fixes #856

Note: VIM does not have a known file extension to differentiate between .bib and a BibLaTeX file. From what I can see, there is no common file-extension for a BibLaTeX file, so a custom filetype configuration will be needed in vim to differentiate between the two.
2023-09-21 09:27:46 -05:00
402e3e117f Add native bibtex support (#857) 2023-08-15 15:21:44 -05:00
be56353975 Add universal-ctags Haskell support (#849)
* 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>
2023-04-05 09:36:00 -05:00
af3ce7c3ce Replace easytags link with gutentags (#842) 2022-11-29 22:20:35 +03:00
6c3e15ea4a Accommodate packagers with tagged release; using HEAD still recommended v3.1.1 2022-11-04 14:08:31 +03:00
8afd6797e8 Merge remote-tracking branch 'origin/master' 2022-11-04 14:06:02 +03:00
eab609f535 Accommodate packagers with tagged release; using HEAD still recommended v3.1.0 2022-11-04 12:44:55 +03:00
83933d5574 Update uctags for pandoc support (#836) 2022-09-26 09:56:06 +03:00
72cb0995d6 Add rust constant support to fix #818 (#834) 2022-09-20 07:25:07 -05:00
87afc291ee Update the autoclose_netrw default value based on community feedback (#827)
Changing the default value of g:tagbar_autoclose_netrw to 0 based on community feedback. More people seem to be in favor of having this value as false as a default.
2022-08-09 08:51:45 -05:00
a398dca223 Doc update for #825 - BufReadPre instead of BufReadPost for g:tagbar_ignore (#826)
* 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
2022-08-08 08:23:46 -05:00
8e97021f74 Add autoclose_netrw configuration option (#822)
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.
2022-08-08 07:50:28 -05:00
0243b19920 Allow autocmds in the host window when s:JumpToTag() leaves the tagbar (#820)
This fixes cursor splashing in wrong places when plugin
https://github.com/DanilaMihailov/beacon.nvim is enabled.
2022-06-09 09:03:47 -05:00
Han
a577ee4d65 Add 'on' for mixin to dart tag map (#816) 2022-05-02 13:52:48 +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