@@ -16,6 +16,7 @@ INTERFACE |gin-interface|
16
16
COMMANDS | gin-commands |
17
17
VARIABLES | gin-variables |
18
18
FUNCTIONS | gin-functions |
19
+ COMPONENTS | gin-components |
19
20
MAPPINGS | gin-mappings |
20
21
ACTIONS | gin-actions |
21
22
@@ -347,6 +348,40 @@ gin#action#list_actions()
347
348
gin#action#gather_candidates({range} )
348
349
Gather and return candidates of the current buffer in {range} .
349
350
351
+ -----------------------------------------------------------------------------
352
+ COMPONENTS *gin-components*
353
+
354
+ Components are | Function | that return a string for | statusline | and | tabline | .
355
+ The function will never throw errors and fail silently unless the denops is
356
+ running as debug mode. Note that the result of function is cached shortly to
357
+ keep performance.
358
+ If no {worktree} is specified or an empty string, gin tries to find one like
359
+ ++worktree option explained in | gin-command-options | .
360
+
361
+ *gin#component#branch#ascii()*
362
+ *gin#component#branch#unicode()*
363
+ gin#component#branch#ascii([{worktree} ])
364
+ gin#component#branch#unicode([{worktree} ])
365
+ Return an indicator string of a current and upstream branches.
366
+ >
367
+ set statusline+=(%{gin#component#branch#ascii()})
368
+ <
369
+ *gin#component#traffic#ascii()*
370
+ *gin#component#traffic#unicode()*
371
+ gin#component#traffic#ascii([{worktree} ])
372
+ gin#component#traffic#unicode([{worktree} ])
373
+ Return an indicator string of the number of ahead and behind commits.
374
+ >
375
+ set statusline+=[%{gin#component#traffic#ascii()}]
376
+ <
377
+ *gin#component#worktree#full()*
378
+ *gin#component#worktree#name()*
379
+ gin#component#worktree#full([{worktree} ])
380
+ gin#component#worktree#name([{worktree} ])
381
+ Return an indicator string of the current worktree.
382
+ >
383
+ set statusline+=%{gin#component#worktree#name()}
384
+ <
350
385
-----------------------------------------------------------------------------
351
386
MAPPINGS *gin-mappings*
352
387
0 commit comments