Skip to content

Add statusline and tabline component functions #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 30, 2022
Merged

Conversation

lambdalisue
Copy link
Owner

CleanShot 2022-03-31 at 03 25 24

Now following component functions are available

  • gin#component#branch#ascii()
  • gin#component#branch#unicode()
  • gin#component#traffic#ascii()
  • gin#component#traffic#unicode()
  • gin#component#worktree#full()
  • gin#component#worktree#name()

Use those like

set statusline+=\ %{gin#component#worktree#name()}
set statusline+=\ (%{gin#component#branch#unicode()})
set statusline+=\ [%{gin#component#traffic#unicode()}]

Or with lightline.vim

let g:lightline = {
	\ 'colorscheme': 'wombat',
	\ 'active': {
	\   'left': [['mode', 'paste'], ['gitbranch']],
	\ },
	\ 'component_function': {
	\   'gitbranch': 'gin#component#branch#unicode',
	\ },
	\}

@lambdalisue lambdalisue merged commit 2986b4b into main Mar 30, 2022
@lambdalisue lambdalisue deleted the add-components branch March 30, 2022 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant