Added the formatting support#34
Conversation
|
Hey @jdesrosiers, opened the PR for the formatting support! Let me know if the changes look good to you. |
jdesrosiers
left a comment
There was a problem hiding this comment.
Looks good so far. I left a few notes. Please also include onDocumentRangeFormatting.
There's also onDocumentOnTypeFormatting, but I think that's a separate concern. I'm not entirely sure what that one is for.
I will include |
There was a problem hiding this comment.
hey @Suyog241005 could you please have a look at why the tests are failing on windows. thanks!
Yeah, the tests were failing on Windows CI because I wasn't using |
Fixes
Fixes #25
Description
This PR implements auto-formatting (
onDocumentFormatting) for JSON files using the existingjsonc-parserdependency.Changes
documentFormattingProvider: trueinside the server capabilities.Formattingfeature module that maps the editor's formatting options (tabSize,insertSpaces) tojsonc.format.