-
Notifications
You must be signed in to change notification settings - Fork 49
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
YAML folds not working #72
Comments
-- 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
} |
That does not work. Have you opened a yaml file yourself with that setup (with yamlls installed and attached to the buffer)? |
Work for me. Debug yourself to make sure |
Acttually, I had exactly same error with exactly same yaml langserver. Problem was exactly in the fact that I missed to pass FYI, @windowsrefund |
If you added the capabilities but still experience the issue, most like you have another plugin that overwrites your lsp config like Issue here someone-stole-my-name/yaml-companion.nvim#37. For like {
"someone-stole-my-name/yaml-companion.nvim",
ft = { "yaml" },
dependencies = {
{ "neovim/nvim-lspconfig" },
{ "nvim-lua/plenary.nvim" },
{ "nvim-telescope/telescope.nvim" },
},
opts = {
lspconfig = {
capabilities = {
textDocument = {
foldingRange = {
dynamicRegistration = false,
lineFoldingOnly = true,
},
},
},
},
},
} |
Neovim version (nvim -v | head -n1)
0.7.2
Operating system/version
Who cares
How to reproduce the issue
Open any YAML file
Expected behavior
Expect folds to work
Actual behavior
Tried every configuration example I can find on this site including #21 but nothing works.
The text was updated successfully, but these errors were encountered: