Skip to content

Commit

Permalink
fix: set quato_r_mode buffer variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbuhr committed Feb 21, 2024
1 parent e718c76 commit cb64ee7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ftplugin/quarto.lua
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lua/plugins/quarto.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cb64ee7

Please sign in to comment.