Commit Graph

54 Commits

Author SHA1 Message Date
Simon Truscott 8fd91eaca9 hunks: prevent selecting GitGutter when its loaded but not enabled 2023-01-22 09:03:56 +11:00
Simon Truscott 029797db1c hunks: use gitsigns_status_dict instead of gitsigns_status
- Gitsigns also provides status as a dictionary. Use that rather than
  parsing a decorated string

- Fix indentation
2023-01-08 15:37:43 +11:00
Simon Truscott 46f0a12bae hunks: add support for gitsigns.nvim
Refactor s:get_hunks_coc() so that parsing the hunk status can be reused
by s:get_hunks_gitsigns().

Reorder s:get_hunks_coc() for consistent ordering with related code.

Give gitsigns.nvim priority over coc-git when selecting b:source_func in
hunks#get_raw_hunks().
2023-01-01 11:46:28 +11:00
Yang Tian 0dd6f5e711 remove gitgutter dependecy on branch 2021-11-03 00:24:08 -07:00
Bailey Ling 5601c0928e Happy new year! 2021-01-01 12:57:00 +00:00
Christian Brabandt f655add4e9 hunks: do not add trailing whitespace when branch extension is disabled
fixes #2177
2020-07-14 14:03:17 +02:00
kazukazuinaina fab1ee3117 [update] license's year in airline's extension 2020-06-11 05:26:04 +09:00
Christian Brabandt 96d37d2fbe hunks: fix missing line continue character 2020-04-29 17:17:58 +02:00
Christian Brabandt 48064e24d5 hunks: only enable coc-git extension, if explicitly enabled by the user
As requested by the coc maintainer, this is explicitly disabled, unless
the user configures vim-airline to use it for the branch extension. This
is done, because the `CocAction('extensionStats')` function is known to
be slow and this may cause a slow startup.
2020-04-29 16:59:37 +02:00
Christian Brabandt adf2afae7c hunks: still some problems with coc-git integration
Fix remaining problems, test correctly for enabled coc-git plugin.
2020-04-01 10:49:00 +02:00
Christian Brabandt 74ca43a9b6 [hunks] also cache coc git status 2020-03-29 19:37:44 +02:00
Christian Brabandt 5a490dd9ac hunks: remove test for empty branch for changes plugin
Because changes plugin does not rely on git
Also remove the test of the local variable for the changes plugin
whether it is enabled or not, this is taken care of in the changes
plugin
2020-03-29 19:37:44 +02:00
Christian Brabandt c05fff8504 hunks: add abort keyword to function definitions 2020-03-29 17:30:29 +02:00
Christian Brabandt a13bed2f51 hunks: integrate coc-git extension
The coc-git extension to coc does show similar statistics as e.g.
gitgutter, therefore, integrate the coc-git interface into the hunk
extension.

closes #2094
2020-03-29 17:30:29 +02:00
Christian Brabandt 664426be21 doc: mention all supported plugins
Also, in the extensions mention the required vim plugin
2019-11-08 20:18:04 +01:00
Christian Brabandt c8a36e14e9 Updated Copyright Statements 2019-03-25 12:29:47 +01:00
Max Nordlund gmail 5f769dbed9 Expose get_hunks for advanced customization 2019-02-21 11:59:04 +01:00
Max Nordlund gmail 45ff435378 Honor minwidth for hunks and branch parts
This removes the hardcoded minwidth limits for both the `hunks` and
`branch` parts. It replaces these with safe accesses to the `minwidth`
setting as done by `airline#parts#define_minwidth`.
2019-02-20 12:36:40 +01:00
Christian Brabandt fd5bde1a3a allow to show the statusline on top
This is an experimental feature that allows to display the statusline in
the tabline. It might still be a bit rough, but seems to work so far.

Remaining problem:
- Mode changes are not immediately detected, only after moving the
  cursor

fixes #1388
closes #1867
2019-02-03 17:30:55 +01:00
Christian Brabandt 5db4c408bd Update copyright notifications 2018-01-05 10:37:59 +01:00
Christian Brabandt d8eb12845f hunks: do not cache for changes plugin 2017-08-14 08:13:19 +02:00
d10n b6eaa60a88 Fix typo 2017-07-01 12:11:27 -04:00
Christian Brabandt 174b7e1962 hunks: Make hunk extension slightly faster
do not call airline#extensions#branch#head() but instead use the cached
variable b:airline_head.

Note: it looks like GitGutterGetHunkSummary() could need some cacheing
2017-06-27 14:16:28 +02:00
thawk 45d77ca909 Add 'scriptencoding utf-8' to all scripts 2016-09-24 08:16:30 +08:00
Christian Brabandt 43e3ef5428 Do not cache gitgutter values
fixes #1230
2016-08-24 21:22:28 +02:00
Julien Pivard 53dcd8a49c Hunks won't appear if g:airline_skip_empty_sections = 1 2016-07-24 21:15:10 +02:00
Christian Brabandt 8fda614d0d Cache hunk values, shorten for small windows
Cache the hunk values. In case of short windows, shorten the hunk string
a little bit and make the branch extension take the hunk value into
account when deciding how much to shorten it.
2016-07-03 20:44:05 +02:00
Marco Hinz d85d697b5f Hunks: make s:source_func local to buffer
Prior to this change airline set the function for getting hunks only once,
which works as long as you don't use simlar plugins for different VCS at the
same time.

If that was the case, only one plugin would have won, depending on the first
buffer handled by these plugins. And although the code for the other plugin
was run every time, you would never see the actual line changes, since airline
didn't even bother checking.

Now these plugins can be used side-by-side in the same Vim instance, e.g.
gitgutter for, well, git and signify for the rest.
2016-01-15 13:05:01 +01:00
Bailey Ling 048b24a916 happy 2016! 2016-01-14 21:38:38 -05:00
Daniel Hahler f22fbfd41d hunks: add support for quickfixsigns
Closes: https://github.com/bling/vim-airline/pull/754
2015-05-03 19:50:11 +02:00
Bailey Ling 1ca6ffb6d0 happy 2015
resolves #692.
2015-02-13 21:47:43 -05:00
Christian Brabandt f2ae2bd7d0 integrate changesPlugin for displaying hunks 2014-05-27 20:22:59 +02:00
Bailey Ling baed8ac063 happy 2014 2014-01-19 23:44:44 -05:00
Bailey Ling ce32405105 fix possibility of the branch extension being unavailable. resolves #366. 2013-12-03 20:01:26 -05:00
Bailey Ling 0966b693d9 expose cleaner api to determine empty head. 2013-12-03 05:32:54 +00:00
Dmitry Kruglov 08a57d0227 Hide hunks when Git Gutter is enabled, but current file is NOT under git version control 2013-12-02 17:29:04 -08:00
Bailey Ling 3a5a40730a check guard for all extensions. resolves #241. 2013-09-10 15:40:54 +00:00
Bailey Ling 6689aca82b fixes wrong echoing behavior on stock osx vim. resolves #209. 2013-09-02 20:12:03 -04:00
Bailey Ling 60cc5a5ca1 hide hunks for inactive windows. 2013-09-02 14:48:03 +00:00
Bailey Ling ded2c2ff7e remove temp fix for vim-signify. resolves #188. 2013-08-31 16:23:53 -04:00
Bailey Ling fa517238c7 introduce parts metadata. 2013-08-30 21:51:10 +00:00
Bailey Ling bdd758dd38 convert branch/hunks/bufferline to function names. 2013-08-29 00:15:07 +00:00
Bailey Ling 2708951715 place hunks and branch extension into parts. 2013-08-27 23:22:26 +00:00
Bailey Ling 9194a9f02d add temporary fix for vim-signify integration (#188). 2013-08-26 13:46:49 +00:00
Bailey Ling 41159bfbc2 improve vim-signify integration (#169). 2013-08-21 23:24:56 +00:00
Bailey Ling a04d7c277a support vim-signify as a hunk source. 2013-08-20 15:43:26 +00:00
Bastian Winkler bbe077037e hunks: Display the hunks summary only if Git Gutter is enabled 2013-08-20 16:53:29 +02:00
Bailey Ling fa62cbb5f6 simplify, no globals unless necessary. 2013-08-20 03:44:24 +00:00
Benjamin Bergman a5f084dc4e Use extension local variables, and expose hunk_symbols to user 2013-08-19 22:32:14 -05:00
Benjamin Bergman 4d9a0e257f Add option to show only non-zero hunks 2013-08-19 17:28:42 -05:00