luukvbaal / statuscol.nvim

Status column plugin that provides a configurable 'statuscolumn' and click handlers.
MIT License
534 stars 25 forks source link

Disable statuscol in neo-tree #123

Open hungvx-dev opened 6 months ago

hungvx-dev commented 6 months ago

i config

local M = {}

function M.setup()
  local present, statuscol = pcall(require, "statuscol")
  if not present then
    return
  end
  local builtin = require("statuscol.builtin")
  M.opts = {
    ft_ignore = { "neo-tree" },
    bt_ignore = { "neo-tree" },
    segments = {
      { text = { builtin.foldfunc }, click = "v:lua.ScFa" },
      { text = { "%s" }, click = "v:lua.ScSa" },
      {
        text = { "", builtin.lnumfunc, " " },
        condition = { true, builtin.not_empty },
        click = "v:lua.ScLa",
      },
    },
  }

  statuscol.setup(M.opts)
end
return M

not working

    ft_ignore = { "neo-tree" },
    bt_ignore = { "neo-tree" },
image
AbriCroco commented 3 months ago

Hello there,

it's been a while since you posted this issue so I'm not sure you didn't find a solution of your own but I personally made it work thanks to this comment.

I'm not great in lua so I literally just ripped off these lines. To make it work though I had to replace vim.cmd("setlocal statuscolumn=") by vim.cmd("setlocal foldcolumn=0")

as I set foldcolumn = 1 in my neovim config.

I hope it will help other people like it helped me :)