quarto-dev / quarto-dev/quarto

VS Code visual editor: Inherit the first used language type for subsequent code chunks

Open
#170 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
645
Forks
62
Avg merge
17h 42m
Merged PRs (30d)
13

Description

Problem: when inserting new code chunks using the VS Code visual editor. The language of the code chunk is always set to python. I have to change the language of the code chunk after inserting.

Desired behavior: insert a code chunk. Change the language of the code chunk to R. Create another code chunk which auto-populates the language to R instead of python.

To repro:

  1. Open a new document in VS Code.
  2. Save it to a location so that visual editing can be enabled.
  3. Enter visual editor
  4. Cmd + Shift + i to insert code chunk.
  5. change language to {r}
  6. Run library(stats)
  7. Navigate cursor outside of the code chunk
  8. Press cmd + shift + i to insert code chunk
  9. this code chunk will be python again.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior in the VS Code visual editor using the documented steps: insert a Python chunk, change it to R, then insert another chunk. Trace how the editor chooses the language for new chunks. Done means subsequent inserted chunks inherit the first explicitly selected language instead of defaulting to Python.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.