Commit Graph

181 Commits

Author SHA1 Message Date
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
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
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
raven42
7a54a7d4ae
Document how to use relative sizes in g:tagbar_width (#689) 2020-10-28 22:24:17 +03: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
maujim
05bc912c76 Update doc to reflect new possible values for tagbar_compact. 2020-10-16 14:16:54 -04: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
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
88be6d9a4c Fix syntax in example text for new option 2020-09-21 08:25:57 -05:00
raven42
22df1b87af Fix for #647: Add g:tagbar_wrap option 2020-09-21 08:24:01 -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
raven42
40413d8760
Add user facing function to get tag near line number (#643) 2020-08-26 12:18:05 +03:00
raven42
5bb0ef3576
Add more flexible options for window positioning (#630)
New configuration option for g:tagbar_position that will supercede g:tagbar_left. This option allows for new values for 'top', 'bottom', 'left' and 'right' (default:'right') to position the Tagbar window.

New configuration option for g:tagbar_height that will supercede g:tagbar_vertical. This option is used to set the Tagbar window height when the window is split using the 'top' or 'bottom' position.

New configuration option for g:tagbar_no_status_line. This option will disable any Tagbar status line updates in the event another plugin is controlling the status line. This prevents Tagbar from changing the status line when Tagbar is not the active window.

Co-authored-by: David Hegland <david.hegland@broadcom.com>
2020-07-29 21:18:17 +03:00
Aaron Toderash
56399f446c
Document extra languages supported by universal-ctags (#621)
Co-authored-by: Caleb Maclennan <caleb@alerque.com>
2020-06-12 00:04:31 +03:00
Caleb Maclennan
92752b89ce
Add option to disable use of tmp file cache 2020-05-29 21:02:31 +03:00
Roman Dobosz
d864a44a3d Additional function for displaying type of a current tag.
Introducing small function for displaying type (kind) of a current tag.
Useful for putting it in the status bar.
2020-01-17 10:26:47 +01:00
zhmars
86ab45aba7 Fix document syntax highlight (#587) 2020-01-16 11:41:04 +02:00
mars
524aa93372 Add g:tagbar_show_balloon option 2020-01-03 10:53:56 +03:00
Caleb Maclennan
bd810fd1a6
Merge pull request #502 from chocoladisco/master
fixed the deprecated --extra to --extras
2019-10-21 19:38:27 +03:00
Caleb Maclennan
a8e050f448
Merge pull request #493 from fievel/master 2019-10-21 19:37:10 +03:00
Caleb Maclennan
3b7d19e0a1
Merge pull request #476 from goerz/ctags_options
Add g:tagbar_ctags_options
2019-10-21 18:40:26 +03:00
chocoladisco
db1b710289 fixed the deprecated --extra to --extras 2018-08-15 13:34:35 +02:00
fievel
44f114a7cb Add map to allow pausing/unpausing tagbar 2018-06-15 10:27:33 +02:00
Michael Goerz
9c60e7f6c6 Accept a list, allowing 'NONE' to avoid duplicates 2018-02-03 20:14:37 -05:00
Michael Goerz
df960e8b9c Add g:tagbar_ctags_options 2018-02-03 17:54:44 -05:00
Daniel Hahler
b8065cfee4 Add tagbar#StopAutoUpdate
This is useful to stop updating information, after using
`tagbar#currenttag` manually/temporarily only.
2018-01-11 17:13:51 +01:00
Jan Larres
3e417256e8 Clarify project-specific behaviour a bit in docs 2017-09-13 17:59:35 +12:00
AdnoC
e3732091bf Add ability to open or close folds a single level 2017-07-26 10:18:18 -04:00
Jan Larres
aab5f214c5 Save ctags output in separate file when debugging 2017-02-11 17:40:24 +13:00
Jan Larres
53e9cb030e Version 2.7 2017-01-09 17:26:17 +13:00
Jan Larres
3a4ea1234f Clarify debug procedure in docs 2016-12-24 16:46:53 +13:00
Anmol Sethi
b99e103258 Silent option
If the silent option is set, tagbar doesn't echo out information about
the tag the cursor is on in the tagbar window.
2016-10-19 12:58:40 +13:00
Jan Larres
d81333e055 Merge pull request #315 from niloct/master
Fixed sentence about pseudo-tags
2016-10-10 22:20:34 +13:00
Martin Vuille
7fbd1ad375 Add case-insensitive sort option 2016-08-27 18:14:10 -04:00
Nilo César Teixeira
931cb37e6b Fixed sentence about pseudo-tags 2016-03-16 20:30:34 -03:00
Jan Larres
7b36c46d17 Change mentions of GNU ctags to BSD ctags 2015-06-19 11:42:35 +12:00
Jan Larres
1773059756 Mention :messages command in troubleshooting section 2015-04-05 18:56:08 +12:00