posit-dev / posit-dev/positron
Create new command to interpolate text into code, to run in the console
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 195
Description
In https://github.com/posit-dev/positron/discussions/5747 we've got a feature request for a command similar to workbench.action.executeCode.console that would allow someone to interpolate a selection into a bit of code, to run in the console. Something like this:
{
"key": "Cmd+Shift+S",
"command": "workbench.action.executeSelection.console",
"when": "editorTextFocus",
"args": {
"langId": "r",
"code": "str(${selectedText})",
"focus": true
}
}
You can already run selected code, but this is about selecting code and then constructing/interpolating a new bit of code to run.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the requested command with workbench.action.executeCode.console and reviewing discussion 5747. Trace how the example's selectedText, langId, code, and focus arguments should be handled. Done means a command like workbench.action.executeSelection.console can interpolate the selection into code and run it in the console.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, typescript
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100