Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't play well when kevinhwang91/nvim-ufo is installed #37

Open
rafi opened this issue Jun 29, 2023 · 3 comments
Open

Doesn't play well when kevinhwang91/nvim-ufo is installed #37

rafi opened this issue Jun 29, 2023 · 3 comments

Comments

@rafi
Copy link

rafi commented Jun 29, 2023

I'm using kevinhwang91/nvim-ufo, and together with yaml-companion.nvim, I'm receiving these kind of errors:

Error executing vim.schedule lua callback: UnhandledPromiseRejection with the reason:
RPC[Error] code_name = InternalError, message = "Request textDocument/foldingRange failed with message: Cannot read properties of undefined (reading 'lineFoldingOnly')"
Error executing vim.schedule lua callback: UnhandledPromiseRejection with the reason:
RPC[Error] code_name = InternalError, message = "Request textDocument/foldingRange failed with message: Cannot read properties of undefined (reading 'lineFoldingOnly')"
[ERROR 12:07:03] .../yaml-companion.nvim/lua/yaml-companion/context/init.lua:18: bufnr=3 client_id=2 doesn't exists
[ERROR 12:07:03] .../yaml-companion.nvim/lua/yaml-companion/context/init.lua:18: bufnr=4 client_id=2 doesn't exists
[ERROR 12:07:03] .../yaml-companion.nvim/lua/yaml-companion/context/init.lua:18: bufnr=5 client_id=2 doesn't exists
[ERROR 12:07:03] .../yaml-companion.nvim/lua/yaml-companion/context/init.lua:18: bufnr=3 client_id=2 doesn't exists
[ERROR 12:07:03] .../yaml-companion.nvim/lua/yaml-companion/context/init.lua:18: bufnr=4 client_id=2 doesn't exists
[ERROR 12:07:03] .../yaml-companion.nvim/lua/yaml-companion/context/init.lua:18: bufnr=5 client_id=2 doesn't exists
@windowsrefund
Copy link

Seeing the same thing as I'm running Astronvim which uses nvim-ufo.

@szechp
Copy link

szechp commented Dec 18, 2023

same, i disabled ufo for this to work.

@kapral18
Copy link

kapral18 commented May 1, 2024

resolved by explicitly adding folding capabilities. For example with lazy.nvim

    opts = {
      lspconfig = {
        capabilities = {
          textDocument = {
            foldingRange = {
              dynamicRegistration = false,
              lineFoldingOnly = true,
            },
          },
        },
      },
    },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants