kevinhwang91 / nvim-ufo

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

Ufo Decorator Table Index Is Nil #201

Closed darmawan01 closed 4 months ago

darmawan01 commented 4 months ago

Neovim version (nvim -v | head -n1)

NVIM v0.9.1

Operating system/version

WSL 2 - Terminal

How to reproduce the issue

Lazyvim config:

return {
  {
    "kevinhwang91/nvim-ufo",
    event = "BufRead",
    dependencies = {
      { "kevinhwang91/promise-async" },
      {
        "luukvbaal/statuscol.nvim",
        config = function()
          local builtin = require("statuscol.builtin")
          require("statuscol").setup({
            -- foldfunc = "builtin",
            -- setopt = true,
            relculright = true,
            segments = {
              { text = { builtin.foldfunc }, click = "v:lua.ScFa" },
              { text = { "%s" }, click = "v:lua.ScSa" },
              { text = { builtin.lnumfunc, " " }, click = "v:lua.ScLa" },
            },
          })
        end,
      },
    },
    config = function()
      -- Fold options
      vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
      vim.o.foldcolumn = "1" -- '0' is not bad
      vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
      vim.o.foldlevelstart = 99
      vim.o.foldenable = true

      require("ufo").setup()
    end,
  },
}

Expected behavior

No Error

Actual behavior

Got an error when open nvim

image

darmawan01 commented 4 months ago

I was followed this config https://github.com/kevinhwang91/nvim-ufo/issues/117#issuecomment-1465111276 . it's work, but the error always popup

darmawan01 commented 4 months ago

Solved, use the latest of Neovim 0.9.5