Skip to content

signcolumn

Zeioth edited this page Apr 3, 2024 · 3 revisions

You can add this component to the statuscolumn section of heirline opts.

require("heirline-components.all").component.signcolumn()

On the left side of the image you can see it displays a vertical highlight indicating the lines that have been modified since the last commit (hunk). screenshot_2024-02-24_01-12-46_770072633

Available providers

These are the available providers for this component and its options.

signcolumn = {},
condition = condition.signcolumn_enabled,
on_click = {
  name = "sign_click",
  callback = function(...)
    local args = core_utils.statuscolumn_clickargs(...)
    if
      args.sign
      and args.sign.name
      and env.sign_handlers[args.sign.name]
    then
      env.sign_handlers[args.sign.name](args)
    end
      -- vim.cmd(":silent! Gitsigns preview_hunk") -- Show hunk on click
  end,
},

More info

This component won't display if you don't have the plugin gitsigns.

Clone this wiki locally