You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on an extension that lets users compile Jsonnet files and view them as read-only JSON files.
I would like to add support for JSON Schema to the JSON outputs so that if the output is not valid, VSCode highlights the errors in the output created as a virtual document by the custom content provider.
However; VSCode doesn't seem to validate read-only files so JSON schema validator doesn't work on virtual documents. When I convert the scheme to untitled, the validation does work but since the JSON outputs are idempotent (generated from Jsonnet files), I don't want to give the users the ability to edit/save the JSON output as the output is irrelevant.
I believe that the validation is useful for the read-only files as well. It would be great if we can disable the code actions and make the validation at least optional depending on how the extension creates the virtual documents.
I see, thanks for the info Martin Aeschlimann (@aeschli). That explains why I started seeing the errors when I installed the extension usernamehw.errorlens.
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Activity
[-]Make validation work in virtual documents[/-][+]Make the validation work in virtual documents[/+]aeschli commentedon Jan 23, 2020
The JSON language server validates all documents of language id
jsonandjsonc.The problem view shows the errors, but not the editor.
[-]Make the validation work in virtual documents[/-][+]Let read-only editors show problems[/+]buremba commentedon Jan 23, 2020
I see, thanks for the info Martin Aeschlimann (@aeschli). That explains why I started seeing the errors when I installed the extension
usernamehw.errorlens.vscodebot commentedon Jan 24, 2020
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
bpasero commentedon Jan 24, 2020
I wouldn't even know where to start looking to do this, I have no clue how the editor decides to show errors or not. Back to other folks.
9 remaining items
Fix editor validation decorations (#89057)
alexdima commentedon Jan 24, 2020
Benjamin Pasero (@bpasero) Sorry about that, I had my boolean logic wrong :D
bpasero commentedon Jan 24, 2020
Nice. This is now enabled for all text editors, but not for these which always had custom editor config overrides:
buremba commentedon Jan 24, 2020
Wow! I didn't expect you to fix the issue that fast. Thanks, folks. :)
bpasero commentedon Jan 24, 2020
Burak Emre Kabakcı (@buremba) would be great if you could verify this fix on next week Monday when we have an insiders build out with this included.
buremba commentedon Jan 24, 2020
Sure Benjamin Pasero (@bpasero) !
bpasero commentedon Jan 28, 2020
Burak Emre Kabakcı (@buremba) You can give our preview releases a try from: https://code.visualstudio.com/insiders/
buremba commentedon Jan 30, 2020
Benjamin Pasero (@bpasero) thanks for checking in, it works just fine!