Skip to content

Quarto runner and iron not using the same repl instance #188

Answered by AlexTabble
AlexTabble asked this question in Q&A
Discussion options

You must be logged in to vote

Got it working after a few more hours.
Otter has a function get_lines_around_cursor() which excludes the quarto fences which allows the code to run.
My after/ftplugin/quarto.lua looks like this now:

-- Insert code chunk keybindings
vim.keymap.set("n", "<leader>qir", "<Esc>O```{r}<Esc>o```<Esc>O", { desc = "[I]nsert [R] chunk" })
vim.keymap.set("n", "<leader>qip", "<Esc>O```{python}<Esc>o```<Esc>O", { desc = "[I]nsert [P]ython chunk" })
vim.keymap.set("n", "<leader>qij", "<Esc>O```{julia}<Esc>o```<Esc>O", { desc = "[I]nsert [J]ulia chunk" })
vim.keymap.set("n", "<leader>qic", "<Esc>O```<Esc>o```<Esc>O", { desc = "[I]nsert [C]ode chunk" })

require("otter").activate()
require("quarto").acti…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by AlexTabble
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant