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

json format need use @theia/json or @theia/vscode-builtin-json-language-feature? #7341

Closed
502647092 opened this issue Mar 15, 2020 · 5 comments
Labels
json issues related to the json language question user / developer questions

Comments

@502647092
Copy link
Contributor

Description

json format need use @theia/json or @theia/vscode-builtin-json-language-feature?
I can't format json file use @theia/json

Reproduction Steps

    "dependencies": {
        "keytar": "latest",
        "@theia/getting-started": "next",
        "@theia/preview": "next",
        "@theia/editor-preview": "next",
        "@theia/plugin-dev": "next",
        "@theia/plugin-ext-vscode": "next",
        "@theia/json": "next",
        "@theia/git": "next"
    },

OS and Theia version:
Microsoft Edge Dev 82.0.446.0
Theia 0.17.0-next.9457f808
Windows 10

Diagnostics:

@vince-fugnitto vince-fugnitto added json issues related to the json language question user / developer questions labels Mar 15, 2020
@vince-fugnitto
Copy link
Member

@502647092 I believe you’ve already opened a similar issue #6758. I think it’d be better to continue the discussion on the past issue.

@vince-fugnitto
Copy link
Member

@502647092

To answer your question:

  1. Formatting is supported by the @theia/json extension, and it works correctly from sources.
    If it does not work, it is likely fixed with resolutions as you mentioned [json] JSON file can't format #6758 (comment).
  2. Formatting from the vscode-builtin-json-language-features builtin is not yet supported (there is compatibility still missing from the framework). Moreover, there are other compatibility issues with the extension, for example Implement SelectionRange and SelectionRangeProvider #6623, which is part of the reason why it has yet to be used in this repo to replace @theia/json.

@akosyakov
Copy link
Member

But we should start working on deprecating @theia/json and switching to VS Code counterpart.

@502647092
Copy link
Contributor Author

vscode-json-languageserver is update
@theia/json work after I remove the following parameters

    "resolutions": {
        "vscode-languageserver-protocol": "3.15.0-next.9",
        "vscode-languageserver-types": "3.15.0-next.5",
        "**/vscode-json-languageserver/**/vscode-languageserver": "6.0.0-next.1"
    },

@502647092
Copy link
Contributor Author

@theia/json now can work don't have resolutions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
json issues related to the json language question user / developer questions
Projects
None yet
Development

No branches or pull requests

3 participants