Cannot change language mode
- Dominant language
- JavaScript
- Stars
- 177
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
As mentioned in the comments of issue #14 by @martin-tarjanyi:
I would like to have a macro to change the language mode to Json and format the document according to that. However, I'm not able to provide an input for this command automatically.
```javascript
"macros": {
"formatJson": [
{"command": "workbench.action.editor.changeLanguageMode", "args": {"id": "json"}},
"editor.action.formatDocument"
]
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the supplied VS Code macro using workbench.action.editor.changeLanguageMode with the json id, followed by editor.action.formatDocument. Trace how macro commands pass arguments to VS Code commands and compare this behavior with issue #14. Done means the macro changes the document language mode to JSON and then formats it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100