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

Normal YAML does not have code folding option with this extension enabled #792

Open
2 tasks
hemangajmera opened this issue Oct 17, 2021 · 2 comments
Open
2 tasks

Comments

@hemangajmera
Copy link

Normal YAML does not have code folding option with this extension enabled

BUG report

Environment

  • Language Support for Apache Camel version: e.g. "v0.0.13" ?
    0.0.35

  • OS:

    • Linux (RHEL, Fedora, Ubuntu, ...)
    • [x ] Windows
    • macOS

Description of wrong behavior

I am opening non-camel project which contains yml file. I do not get code folding. If I disable the extension code folding for yaml works

Screenshot (optional)

When extension is enabled
image

When extension is disabled
image

@apupier
Copy link
Member

apupier commented Oct 18, 2021

The folding that we can see in the screenshot is the indentation-based one provided by VS Code. The yaml language server is nto providing one https://github.com/redhat-developer/yaml-language-server/blob/27daa94333f7c0567978d891dfa5dbd334f8af09/src/yamlServerInit.ts#L106
it sounds like a limitation of VS Code which doesn't allow to have indentation based and foldingRange provider used at the same time. In settings, there are only 2 options auto and indentation-based but not the mix of both of them.

Workaround without uninstalling VS Code Camel Language: File -> Preferences -> Settings -> Text Editor -> Folding Strategy -> Indentation

@apupier
Copy link
Member

apupier commented Oct 18, 2021

reported enhancement request microsoft/vscode#135279

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

2 participants