Skip to content

Help with highlighting statuscol/status column icon background #16

@Ajaymamtora

Description

@Ajaymamtora

When I use statuscol.nvim to define extra columns, the extra ones are highlighted:

image

https://github.com/luukvbaal/statuscol.nvim

I've just used the default setup and am unsure how I'd go about setting these highlights?

This is my statuscol config:

function config.statuscol()
  local builtin = require("statuscol.builtin")

  local opts = {
    -- setopt = true,
    thousands = false,
    relculright = true,
    foldfunc = "builtin",
    ft_ignore = { "Outline", "terminal", "toggleterm", "qf", "Trouble", "help", "neo-tree", "oil" },
    bt_ignore = { "terminal", "help", "nofile", "prompt", "toggleterm", "qf", "Trouble" },
    segments = { -- {
      --  sign = { name = { "LightBulb" }, fillchar=" ", maxwidth = 1, auto = false, wrap=false },
      {
        text = { " ", builtin.foldfunc, " " },
        condition = { builtin.not_empty, true, builtin.not_empty },
        click = "v:lua.ScFa",
      },
      {
        sign = {
          name = { "Dap" },
          maxwidth = 1,
          colwidth = 1,
          auto = false,
          fillchar = " ",      -- character used to fill a segment with less signs than maxwidth
          fillcharhl = "NONE",
        },
        condition = { builtin.not_empty },
        click = "v:lua.ScSa",
      },
      {
        sign = {
          namespace = { "diagnostic" },
          maxwidth = 1,
          colwidth = 1,
          auto = true,
          fillchar = " ",      -- character used to fill a segment with less signs than maxwidth
          fillcharhl = "NONE",
        },
        condition = { builtin.not_empty },
        click = "v:lua.ScSa",
      }, --
      {
        text = { " " },
      }, -- Spacing before gitsigns
      {
        sign = {
          name = { ".*" },
          namespace = { ".*" },
          maxwidth = 1,
          colwidth = 2,
          fillchar = " ",      -- character used to fill a segment with less signs than maxwidth
          fillcharhl = "NONE",
        },
        click = "v:lua.ScSa",
      }, -- lightbulb or bookmark or other?
      {
        text = { builtin.lnumfunc },
      }, -- line number col
      {
        text = { " " },
      }, -- Spacing before gitsigns
      {
        sign = {
          namespace = { "gitsigns" },
          maxwidth = 1,
          colwidth = 2,
          wrap = true,
          fillchar = " ",      -- character used to fill a segment with less signs than maxwidth
          fillcharhl = "NONE",
        },
      },
    },
    clickmod = "c",
    clickhandlers = {
      Lnum = builtin.lnum_click,
      FoldClose = builtin.foldclose_click,
      FoldOpen = builtin.foldopen_click,
      FoldOther = builtin.foldother_click,
      DapBreakpointRejected = builtin.toggle_breakpoint,
      DapBreakpoint = builtin.toggle_breakpoint,
      DapBreakpointCondition = builtin.toggle_breakpoint,
      DiagnosticSignError = builtin.diagnostic_click,
      DiagnosticSignHint = builtin.diagnostic_click,
      DiagnosticSignInfo = builtin.diagnostic_click,
      DiagnosticSignWarn = builtin.diagnostic_click,
      GitSignsTopdelete = builtin.gitsigns_click,
      GitSignsUntracked = builtin.gitsigns_click,
      GitSignsAdd = builtin.gitsigns_click,
      GitSignsChange = builtin.gitsigns_click,
      GitSignsChangedelete = builtin.gitsigns_click,
      GitSignsDelete = builtin.gitsigns_click,
      gitsigns_extmark_signs_ = builtin.gitsigns_click,
      LightBulbSign = function(args)
        vim.lsp.buf.code_action()
      end,
    },
  }

  require("statuscol").setup(opts)
end

Its the components defines with sign = {.. that don't get highlighted

Any help would be much appreciated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions