Commit Graph

783 Commits

Author SHA1 Message Date
raven42
98bf0b00ce Potential fix for #772 - InitWindow issue
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.
2021-06-18 08:41:44 -05:00
David Hegland
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
Caleb Maclennan
19c0078f76
Merge pull request #767 from preservim/contributors 2021-05-25 10:38:07 +03:00
David Hegland
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
Caleb Maclennan
4265c61aa1
Include Paypal link to tip @raven42 in sponsor config 2021-05-21 18:47:56 +03:00
Caleb Maclennan
0e832c54a6
Callout @raven42 as active maintainer 2021-05-21 18:47:19 +03:00
Caleb Maclennan
1919ee66df Update ballpark contributor count 2021-05-21 15:59:38 +03:00
Caleb Maclennan
3fa6c4e266 Add GitHub funding spec, add Caleb's preferred tipping channels 2021-05-21 15:58:36 +03:00
prizelk
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
Stefan Huber
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
Henrik Holst
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
Caleb Maclennan
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
Caleb Maclennan
ac8eafc9c0
Overhaul CI check workflow 2021-02-18 10:17:16 +03:00
Caleb Maclennan
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
Caleb Maclennan
77d7ddd683
Split PR review from branch check workflows 2021-02-18 09:01:03 +03:00
Mukund Mauji
2fb3171ed7
Fix incorrect example for g:tagbar_status_func (#752) 2021-02-12 12:24:27 -06:00
Vivian De Smedt
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
Linwei
7a968502d7
Fix CJK character decoding problem (#745) 2021-01-25 07:12:19 +03:00
Caleb Maclennan
16f3f9b77b
Accommodate packagers with tagged release; using HEAD still recommended 2021-01-21 07:54:15 +03:00
raven42
59eef1364d
Correct the name to properly escape out any special chars for the substitution (#740) 2021-01-15 06:14:27 -06:00
lasorda
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
raven42
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
Valter Sundström
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
pacien
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
raven42
4c1a1a1bc6
Use universal_newlines for Popen call (#733)
Closes #629
2021-01-06 07:34:09 -06:00
raven42
f8e8f8cfb4
Add support for frames kind in tex file definition (#730)
Closes #654
2021-01-06 15:25:57 +03:00
raven42
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
raven42
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
raven42
7cf83a4330
Check for tilde in cpp destructor (#732) 2021-01-06 15:24:14 +03:00
raven42
5f912e6ad0
Add tagbar#IsOpen() helper routine (#728)
Closes #717

Add a `tagbar#IsOpen()` helper routine to check if the tagbar window is open or not.
2021-01-06 15:23:55 +03:00
raven42
eaadf90b61
Add mapping for arduino filetypes (#722)
Closes #721
2020-12-21 13:25:16 -06:00
Caleb Maclennan
b63e8cb83f
Merge pull request #638 from jrc2139/dart-ctags 2020-11-30 21:31:45 +03:00
Pascal Bakker
ed1bbe554d
Use the same example hotkey in docs as in README.md (#712) 2020-11-23 12:55:24 +03:00
Chi Cao Minh
9b8619bab5
Fix typo in help (#711) 2020-11-20 11:20:11 +03:00
raven42
68a77323cb
Add option for g:tagbar_highlight_method (#709)
* 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
2020-11-13 07:29:07 -06:00
David P. Sicilia
6eadc15054
Add g:tagbar_jump_lazy_scroll option. (#705)
* 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.
2020-11-10 16:07:57 -06:00
raven42
10a4a9bc38
Add linenr protection into getPrototype (#707)
* 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
2020-11-10 07:49:36 -06:00
raven42
53c8e19676
Cleanup the PrintHelp() routine (#702)
Closes #681
2020-11-03 11:33:33 +03:00
Caleb Maclennan
92e2a0c5a8
Merge pull request #701 from Shane-XB-Qian/master 2020-11-03 11:15:37 +03:00
shane.xb.qian
7261ab5f92 Update .gitignore 2020-11-03 11:12:13 +03:00
shane.xb.qian
bd0c32242d Setup syntax highlighting group for tag line numbers 2020-11-03 11:12:13 +03:00
raven42
55b8ffa85c
Scoped kinds (#696)
* 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>
2020-11-02 15:15:55 -06:00
raven42
601b5c0073
Add tag datatype (#698)
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.
2020-11-02 15:06:40 -06:00
raven42
99c22f1bb2
Fix the scrolloff local setting in RenderKeepView (#697) 2020-10-30 23:56:36 +03:00
raven42
30b20fc87d
Fix issue with tagbar changing the global scrolloff value. (#694)
Co-authored-by: Caleb Maclennan <caleb@alerque.com>
2020-10-29 21:21:52 +03:00
raven42
d55c16e875
Add g:tagbar_jump_offset configuration (#695)
Closes #504

Add a new `g:tagbar_jump_offset` value which will control the tag jump location relative to the center of the screen.
2020-10-29 12:58:17 -05:00