kevinhwang91 / nvim-ufo

Not UFO in the sky, but an ultra fold in Neovim.
BSD 3-Clause "New" or "Revised" License
2.18k stars 38 forks source link

removing numbers in fold icon column #92

Closed NoamMuallem closed 1 year ago

NoamMuallem commented 1 year ago

Neovim version (nvim -v | head -n1)

NVIM v0.8.0

Operating system/version

macOS Monterey 12.6.1

How to reproduce the issue

-- Setting vim.o.foldcolumn = '1' vim.o.foldlevel = 99 vim.o.foldlevelstart = -1 vim.o.foldenable = true

local ufo = require('ufo') ufo.setup() vim.keymap.set('n', 'zR', ufo.openAllFolds) vim.keymap.set('n', 'zM', ufo.closeAllFolds)


`nvim --clean +'so mini.lua'`

1.
2.
3.
...

### Expected behavior

like in read me only fold icons

### Actual behavior

numbers on the lines where fold is not available
<img width="88" alt="Screen Shot 2022-11-02 at 13 00 29" src="https://user-images.githubusercontent.com/40291455/199410981-5c3e5710-5399-4103-8ee5-b54ad08d9246.png">
kevinhwang91 commented 1 year ago

https://github.com/kevinhwang91/nvim-ufo/issues/4

D00mch commented 1 year ago

If someone finds it and don't want to read 100 comments on #4.

To remove it completely: vim.o.foldcolumn = "0"

To have foldcolumn like in demo video: vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]

dattlab commented 1 year ago

If someone finds it and don't want to read 100 comments on #4.

To remove it completely: vim.o.foldcolumn = "0"

To have foldcolumn like in demo video: vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]

But the side folding arrows/lines won't show up if the foldcolumn is 0

shalawfatah commented 3 months ago

If someone still looks for an answer, this config in this plugin statuscol.nvim removes the numbers while the arrows are still there on the same column:

  {
    'luukvbaal/statuscol.nvim',
    opts = function()
      local builtin = require('statuscol.builtin')
      return {
        setopt = true,
        -- override the default list of segments with:
        -- number-less fold indicator, then signs, then line number & separator
        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',
          },
        },
      }
    end,
  }