diff --git a/ftplugin/quarto.lua b/ftplugin/quarto.lua index 742f5d0..3efa56b 100644 --- a/ftplugin/quarto.lua +++ b/ftplugin/quarto.lua @@ -1,4 +1,5 @@ vim.b.slime_cell_delimiter = "```" +vim.b["quarto_is_r_mode"] = nil -- wrap text, but by word no character -- indent the wrappped line diff --git a/lua/plugins/quarto.lua b/lua/plugins/quarto.lua index 47533c5..b270770 100644 --- a/lua/plugins/quarto.lua +++ b/lua/plugins/quarto.lua @@ -647,7 +647,7 @@ return { let g:slime_dispatch_ipython_pause = 100 function SlimeOverride_EscapeText_quarto(text) call v:lua.Quarto_is_in_python_chunk() - if exists('g:slime_python_ipython') && len(split(a:text,"\n")) > 1 && b:quarto_is_python_chunk && !b:quarto_is_r_mode + if exists('g:slime_python_ipython') && len(split(a:text,"\n")) > 1 && b:quarto_is_python_chunk || (exists('b:quarto_is_r_mode') && !b:quarto_is_r_mode) return ["%cpaste -q\n", g:slime_dispatch_ipython_pause, a:text, "--", "\n"] else return a:text