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

Error in latest for `treesitter` provider #203

Closed ctrlplusb closed 4 months ago

ctrlplusb commented 4 months ago

Neovim version (nvim -v | head -n1)

NVIM 0.9.5

Operating system/version

macOS 14.3.1

How to reproduce the issue

-- Lazy nvim config
return {
  "kevinhwang91/nvim-ufo",
  dependencies = { "kevinhwang91/promise-async" },
  init = function()
    vim.o.foldcolumn = "0" -- '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
  end,
  config = function()
    require("ufo").setup({
      provider_selector = function()
        return { "treesitter" }
      end,
    })
  end,
}
  1. Ensure latest version of nvim and treesitter are installed
  2. Use above config
  3. Open neovim. Observer error message. ...

Expected behavior

No error on starting Neovim.

Actual behavior

When I open Neovim I get the following error message:

image
mehalter commented 4 months ago

This seems to be related to the merging of https://github.com/kevinhwang91/promise-async/pull/6

kevinhwang91 commented 4 months ago

Shouldn't expose the inner error of promise-async, fixed. Now, should revert the latest commit from ufo.