Skip to content

Add metals_status to statusline without lua #236

Answered by ckipp01
gnfisher asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @gnfisher, you should be able to define a function that grabs the variable like this:

function! metals#status() abort
  return get(g:, 'metals_status', '')
endfunction

Then when you put together your statusline you should be able to just include %{metals#status()}. Keep in mind that by default metals_status is off, so if you're using it make sure to turn it on in your init_options.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ckipp01
Comment options

@gnfisher
Comment options

Answer selected by gnfisher
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants