kevinhwang91 / nvim-ufo

Not UFO in the sky, but an ultra fold in Neovim.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error executing vim.schedule lua callback: .../.local/share/nvim/lazy/nvim-ufo/lua/ufo/wffi.lua:39: dlsym(RTLD_DEFAULT, clearFolding): symbol not found

Velrok opened this issue · comments

Neovim version (nvim -v | head -n1)

NVIM v0.9.2

Operating system/version

macOS 14.1 Beta (23B5046f)

How to reproduce the issue

Just happens after saving a file. Seams to be one of the auto commands.

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
vim.o.fillchars = [[eob: ,fold: ,foldopen:▼,foldsep:┃,foldclose:▶]]

-- Using ufo provider need remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself
-- vim.keymap.set('n', 'zR', require('ufo').openAllFolds)
-- vim.keymap.set('n', 'zM', require('ufo').closeAllFolds)

-- Option 2: nvim lsp as LSP client
-- Tell the server the capability of foldingRange,
-- Neovim hasn't added foldingRange to default capabilities, users must add it manually
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.foldingRange = {
  dynamicRegistration = false,
  lineFoldingOnly = true
}
local language_servers = require("lspconfig").util.available_servers() -- or list servers manually like {'gopls', 'clangd'}
for _, ls in ipairs(language_servers) do
  require('lspconfig')[ls].setup({
    capabilities = capabilities
    -- you can add other fields for setting up lsp server in this table
  })
end

-- local ftMap = {
--   vim = 'indent',
--   ruby = { 'indent' },
--   -- python = { 'indent' },
--   git = ''
-- }

require('ufo').setup({
  close_fold_kinds = { 'imports', 'comment' },
  preview = {
    win_config = {
      border = { '', '─', '', '', '', '─', '', '' },
      -- border = { '', '', '', '', '', '', '', '' },
      winhighlight = 'Normal:Folded',
      winblend = 0
    },
    mappings = {
      scrollU = '<C-u>',
      scrollD = '<C-d>',
      jumpTop = '[',
      jumpBot = ']'
    }
  },
})

Expected behavior

No errors.

Actual behavior

Error executing vim.schedule lua callback: ...rschwan/.local/share/nvim/lazy/nvim-ufo/lua/ufo/wffi.lua:39: dlsym(RTLD_DEFAULT, clearFolding): symbol not fou
nd
stack traceback:
[C]: in function '__index'
...rschwan/.local/share/nvim/lazy/nvim-ufo/lua/ufo/wffi.lua:39: in function 'clearFolds'
.../.local/share/nvim/lazy/nvim-ufo/lua/ufo/fold/driver.lua:42: in function 'winCall'
.../.local/share/nvim/lazy/nvim-ufo/lua/ufo/fold/driver.lua:39: in function 'createFolds'
....local/share/nvim/lazy/nvim-ufo/lua/ufo/fold/manager.lua:206: in function 'applyFoldRanges'
...an/.local/share/nvim/lazy/nvim-ufo/lua/ufo/fold/init.lua:66: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>

For reference, the original issue is #162