feat: add vscode subcommands for adding/removing txn schema from vscode #1862
+3,549
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for VSCode to recognize any file ending in
.stellar_txn.json
as a stellar transaction envelope (very open to renaming this!)vscode setup
- adds a json schema file in the folder of settings for VSCode. In the future we can publish it to an endpoint and then the link in the settings will be a url. It also uses jsonc-parser to parse and update thesettings.json
since it uses comments which need to preserved.vscode cleanup
- is unimplemented as it isn't needed in to complete the goal and is rather a nice feature to have, but leaving the setting in place does not impact any other settings. However, it would be nice to have this as it would allow for updating the schema (which if it was a url would be automatic)Note: Currently the schema is a fixture in the binary. However, it once the xdr cli makes the schema generation public, see: stellar/rs-stellar-xdr#409