Open
Conversation
Collaborator
|
I'll test it out! 👁️ 👁️ |
| function suggestOutputExtension(): string { | ||
| const editor = window.activeTextEditor; | ||
| const header = editor.document.lineAt(0).text; | ||
| const ext = /output: \S*[.](?<ext>\S*)/i.exec(header)?.groups?.ext; |
Collaborator
There was a problem hiding this comment.
It does work but the Output: ... remains in the evaluated file which is a bit weird. Could it instead be a dialog option? (like the expression)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In using the plugin to generate non-JSON/YAML files, I found it frustrating to only be able to see the output as a single JSON string.
This PR adds two new commands, and one related feature.
I was unable to test the "Evaluate Expression (String)" variant, because I was unable to find an incantation for "Evaluate Expression" that did not give an error, for example, rejecting any simple input with a demand for an identifier. I don't know if this is an LSP bug or my misunderstanding, but Expression works the same as File so I believe my addition to be correct.