Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use user's selected language for next code cell #540

Merged
merged 2 commits into from
Sep 16, 2024

Conversation

DavisVaughan
Copy link
Collaborator

@DavisVaughan DavisVaughan commented Sep 13, 2024

Closes #425

With this PR, we more aggressively use the "remembered" language. We now just straight up insert that language in the code cell rather than just putting it 1st in the order of potential languages to use. This allows us to put the user's cursor directly into the code cell when they hit the keyboard shortcut.

Note this does not apply to Visual Editor, which I guess uses a very different path.

Screen.Recording.2024-09-13.at.4.54.46.PM.mov

The downside of this approach is that it isn't easily possible to get the list of potential languages to pop back up if you need to switch languages. They are basically hard coded in this one code path that now corresponds to "we don't know what language you want, so please pick one".

There do seem to be some completions that pop up inside the {} (see the video), so in a separate PR maybe we can hook into that completion engine to get the list of language names to pop back up?

@jjallaire jjallaire merged commit 39f110d into quarto-dev:main Sep 16, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

With VS Code extension, "Quarto: Insert Code Cell" requires user to choose language for each new chunk
2 participants