luukvbaal / statuscol.nvim

Status column plugin that provides a configurable 'statuscolumn' and click handlers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to prioritize displaying diagnostic signs?

waynerv opened this issue · comments

I am using one column space to display both diagnostic and gitsigns, when both present gitsigns are always displayed, can I make diagnostic sign to display first?

Here is my config:

  {
    "luukvbaal/statuscol.nvim",
    commit = "ab959d5853f3880c2c56277e32a05381721e3c6d",
    config = function()
      local builtin = require "statuscol.builtin"
      require("statuscol").setup {
        relculright = true,
        segments = {
          { sign = { name = { ".*" }, namespace = { "gitsigns" }, colwidth = 1 }, click = "v:lua.ScSa" },
          { text = { builtin.lnumfunc, " " }, click = "v:lua.ScLa" },
          { text = { builtin.foldfunc }, click = "v:lua.ScFa" },
        },
        ft_ignore = require("utils").ignore_filetypes,
        bt_ignore = require("utils").ignore_buftypes,
      }
    end,
  }

Both gitsigns and statuscol are using latest version.

I'm having this problem too, since gitsigns started using extsigns I can't seem to be able to display the gitsigns and diagnostics in the same column.
I've tried using this:
{ text = { "%s" }, click = "v:lua.ScSa" }
But this makes it take up two columns instead of one.
With the solution above it shows only the gitsigns and not the diagnostics.

Should now place signs by priority when combining both extmark and legacy signs.