camel-lsp-client-vscode icon indicating copy to clipboard operation
camel-lsp-client-vscode copied to clipboard

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

Open hemangajmera opened this issue 3 years ago • 2 comments

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

hemangajmera avatar Oct 17 '21 06:10 hemangajmera

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 avatar Oct 18 '21 09:10 apupier

reported enhancement request https://github.com/microsoft/vscode/issues/135279

apupier avatar Oct 18 '21 09:10 apupier