Commit Graph

436 Commits

Author SHA1 Message Date
沈育霖
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
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
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
raven42
00841836b4
Add g:tagbar_scrolloff configuration (#692)
* Add g:tagbar_scroll_offset configuration
Closes #564

Add option for `g:tagbar_scrolloff` to issue a `setlocal scrolloff=#` during tagbar window init

* Address review comments
2020-10-29 10:36:47 -05:00
Shane-XB-Qian
8efec2509b
shane: compact tag line# should be good enough if user set it (#687) 2020-10-28 10:17:50 -05:00
raven42
aa8c592201
Help visibility (#686)
Closes #410

Add `g:tagbar_help_visibility` option to always show the help dialog
2020-10-27 14:14:39 -05:00
raven42
469c4b3188
Add g:tagbar_show_tag_count option (#685)
* Add g:tagbar_show_tag_count option

Closes #290

This option will show the tag kind count next to the kind label in the
tagbar window.

* Address review comments
2020-10-27 09:18:30 -05:00
raven42
0d1c6442d9
Add option to print the tag linenumber in the tagbar window (#684)
* Add option to print the tag linenumber in the tagbar window

* Update documentation markup

* Change variable name to g:tagbar_show_tag_linenumbers to be more consistent with other variables

* Fix documentation
2020-10-27 08:37:33 -05:00
raven42
bc48b8b84b
Scoped Highlighting (#683)
* Scoped highlighting fix
Attempt to change the scoped highlighting of the tagbar window. This
will now look only for 'stl' tag types when looking for the nearby tag
when looking to highlight. It does however take into account if the
cursor is on the same line as the tag and highlights it then as well.

* Add additional documentation

* Add documentation for tagbar#printfileinfo() debug routine
2020-10-26 10:19:14 -05:00
Shane-XB-Qian
2a9270cb24
sq: would mess if set key mapping to '' (#675)
Co-authored-by: Caleb Maclennan <caleb@alerque.com>
2020-10-24 10:17:11 +03:00
raven42
c26bf78a61
Merge pull request #676 from raven42/unknown-kinds
Add protection for unknown kinds
2020-10-20 07:54:10 -05:00
diegok
353701eb8c Undone changes on legacy exuberant-ctags types file 2020-10-20 12:01:37 +02:00
diegok
f9012df43b Add missing attributes and methods kinds on perl type 2020-10-20 11:11:29 +02:00
raven42
34a95983ed Add protection for unknown kinds
Perform a has_key() check prior to referencing the dictionary to ensure
the dictionary has a valid key for the specified kind.
Note: When an unknown kind is found, it can mess up the tag highlighting
in the tagbar window. Not sure why this is occurring.
2020-10-19 12:16:36 -05:00
maujim
f5abcd6f46 Allow more granular control of tagbar_compact option. 2020-10-16 14:16:19 -04:00
Josh French
5fc8a7a209 enumerators -> enumerations 2020-10-01 16:52:36 -04:00
Josh French
edb5d15f4d Add typescript mappings for universal ctags 2020-10-01 16:03:37 -04:00
Wenxuan
a1e0e7a571
Hide signcolumn in tagbar window (#666) 2020-09-29 13:01:42 +03:00
raven42
9e2e5d93b4
Merge branch 'master' into large-file-handling 2020-09-23 11:47:24 -05:00
David Hegland
64730d27a9 Added fsize calculation in fileinfo so better tracking can be used to display in tagbar window 2020-09-23 11:45:02 -05:00
Caleb Maclennan
259b47a691
Fix vimscript snafu from #660, closes #662 2020-09-23 17:09:39 +03:00
Luis Piloto
8d17340295
Add g:tagbar_visibility_symbols (#660) 2020-09-23 13:43:05 +03:00
Luis Piloto
5339b4e8bd
Add g:tagbar_scopestrs (#661)
Allows mapping scope suffixes (e.g. 'function') to user-defined values.
2020-09-23 13:02:34 +03:00
raven42
22df1b87af Fix for #647: Add g:tagbar_wrap option 2020-09-21 08:24:01 -05:00
raven42
6cb336d014 Update variable name 2020-09-16 12:17:21 -05:00
raven42
14a86de04b Update to use file size instead of line count 2020-09-16 12:15:48 -05:00
raven42
be67ff7ae7 Add option to not trigger update on large files 2020-09-14 15:15:39 -05:00
Caleb Maclennan
30fb229937
Update URLs to reflect repository migration (Closes #651) 2020-09-13 10:22:09 +03:00
raven42
e1c2c98922
Fixes #650 Correct window positioning defaults (#652)
* Fix for window positioning
With default case having multiple vertically split windows, the tagbar
window should open on the far right of the screen. When the feature in
pull-request 630 was added, this behavior changed to open the tagbar
window relative to the current window. This commit will fix that by
allowing direct usage of the vim split options.

Validated the following cases for the old default values. These all
still behave the same way as prior to pull-request 630 when the tagbar
is activated in the `active` window shown in the below examples:
```
	" No options
	+-----------------------------------+
	| preview                           |
	+--------+--------+--------+--------+
	| edit   | edit   | edit   | tagbar |
	|        | active |        |        |
	+--------+--------+--------+--------+

	" tagbar on left, preview above
	let g:tagbar_left = 1
	+-----------------------------------+
	| preview                           |
	+--------+--------+--------+--------+
	| tagbar | edit   | edit   | edit   |
	|        |        | active |        |
	+--------+--------+--------+--------+

	" tagbar on bottom, preview to right of tagbar
	let g:tagbar_vertical = 10
	+--------+---------------+--------+
	| edit   | edit          | edit   |
	|        | active        |        |
	|        +-----+---------+        |
	|        | tag | preview |        |
	+--------+-----+---------+--------+

	" tagbar on top, preview to the right of tagbar
	let g:tagbar_left = 1
	let g:tagbar_vertical = 10
	+--------+-----+---------+--------+
	| edit   | tag | preview | edit   |
	|        +-----+---------+        |
	|        | edit          |        |
	|        | active        |        |
	+--------+---------------+--------+

```

New values also all validated using the following:
```
" Behaves the same as no options
let g:tagbar_position = 'right'

" Behaves the same as g:tagbar_left = 1
let g:tagbar_position = 'left'

" Behaves the same as g:tagbar_vertical = <#>
let g:tagbar_position = 'bottom'

" Behaves the same as g:tagbar_left = 1 | g:tagbar_vertical = <#>
let g:tagbar_position = 'top'
```

* #650 - Fix typo in doc/tagbar.txt for g:tagbar_height option
2020-09-01 16:59:16 +03:00
bravestarr
e5c864738d
Fix issue with jumping to a tag with special characters (#649)
In C++, the name of the destructor of a class starts with a
tidle(~) which is special when the option 'magic' is set. This
will cause an error when jumping to a destructor. Call search()
in "very nomagic" environment can solve this problem no matter the
option 'magic' is set or not.
2020-08-29 17:59:53 +03:00
John Castronuovo
7dddde55b4
feat(dart_ctags): add inheritance tags 2020-08-27 09:54:54 +02:00
John Castronuovo
5e27cdb70b
feat(dart_ctags): create scope for imports for dart, pub. local package
tags
2020-08-26 21:55:51 +02:00
John Castronuovo
78c1612106
refactor(dart_ctags): improve tag order 2020-08-26 20:26:13 +02:00
John Castronuovo
29e3cef248
Merge branch 'master' into dart-ctags 2020-08-26 20:18:52 +02:00