up
This commit is contained in:
@@ -4,6 +4,11 @@
|
||||
-- molten: https://github.com/benlubas/molten-nvim
|
||||
--
|
||||
|
||||
--local wh_status, wh = pcall(require, 'custom.plugins.window-helper')
|
||||
--if not wh_status then
|
||||
-- return
|
||||
--end
|
||||
|
||||
return {
|
||||
{
|
||||
'quarto-dev/quarto-nvim',
|
||||
@@ -17,10 +22,21 @@ return {
|
||||
lspFeatures = {
|
||||
enabled = true,
|
||||
chunks = 'curly',
|
||||
languages = { 'r', 'python', 'julia', 'bash', 'html' },
|
||||
diagnostics = {
|
||||
enabled = true,
|
||||
triggers = { 'BufWritePost' },
|
||||
},
|
||||
completion = {
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
codeRunner = {
|
||||
enabled = true,
|
||||
default_method = 'slime',
|
||||
default_method = 'slime', -- "molten", "slime", "iron" or <function>
|
||||
ft_runners = {}, -- filetype to runner, ie. `{ python = "molten" }`.
|
||||
-- Takes precedence over `default_method`
|
||||
never_run = { 'yaml' }, -- filetypes which are never sent to a code runner
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -37,16 +53,16 @@ return {
|
||||
vim.cmd [[
|
||||
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 && !(exists('b:quarto_is_r_mode') && b:quarto_is_r_mode)
|
||||
return ["%cpaste -q\n", g:slime_dispatch_ipython_pause, a:text, "--", "\n"]
|
||||
else
|
||||
if exists('b:quarto_is_r_mode') && b:quarto_is_r_mode && b:quarto_is_python_chunk
|
||||
return [a:text, "\n"]
|
||||
else
|
||||
return [a:text]
|
||||
end
|
||||
end
|
||||
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 && !(exists('b:quarto_is_r_mode') && b:quarto_is_r_mode)
|
||||
return ["%cpaste -q\n", g:slime_dispatch_ipython_pause, a:text, "--", "\n"]
|
||||
else
|
||||
if exists('b:quarto_is_r_mode') && b:quarto_is_r_mode && b:quarto_is_python_chunk
|
||||
return [a:text, "\n"]
|
||||
else
|
||||
return [a:text]
|
||||
end
|
||||
end
|
||||
endfunction
|
||||
]]
|
||||
|
||||
@@ -87,6 +103,12 @@ return {
|
||||
vim.g.molten_auto_open_output = true
|
||||
-- vim.g.molten_auto_open_html_in_browser = true
|
||||
vim.g.molten_tick_rate = 200
|
||||
vim.g.molten_output_win_col = math.floor((vim.o.columns - vim.o.columns * 0.9) / 2)
|
||||
vim.g.molten_output_win_max_width = math.floor(vim.o.columns * 0.9)
|
||||
vim.g.molten_output_win_border = { '╭', '─', '╮', '│', '╯', '─', '╰', '│' }
|
||||
vim.g.molten_use_border_highlights = true
|
||||
vim.g.molten_output_win_style = 'minimal' -- Style minimal pour la fenêtre
|
||||
vim.g.molten_output_win_hide_on_leave = false -- Garder la fenêtre visible après avoir quitté
|
||||
end,
|
||||
config = function()
|
||||
-- local init = function()
|
||||
@@ -108,7 +130,7 @@ return {
|
||||
end,
|
||||
opts = {
|
||||
auto_scroll = true,
|
||||
jupyter_command = '/home/jeff/.asdf/shims/jupyter',
|
||||
-- jupyter_command = '/home/jeff/.asdf/shims/jupyter',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -124,7 +146,7 @@ return {
|
||||
download_remote_images = true,
|
||||
only_render_image_at_cursor = false,
|
||||
only_render_image_at_cursor_mode = 'popup',
|
||||
floating_windows = false, -- if true, images will be rendered in floating markdown windows
|
||||
floating_windows = true, -- if true, images will be rendered in floating markdown windows
|
||||
filetypes = { 'markdown', 'vimwiki', 'quarto' }, -- markdown extensions (ie. quarto) can go here
|
||||
},
|
||||
neorg = {
|
||||
@@ -145,7 +167,7 @@ return {
|
||||
max_width = nil,
|
||||
max_height = nil,
|
||||
max_width_window_percentage = nil,
|
||||
max_height_window_percentage = 50,
|
||||
max_height_window_percentage = 70,
|
||||
window_overlap_clear_enabled = false, -- toggles images when windows are overlapped
|
||||
window_overlap_clear_ft_ignore = { 'cmp_menu', 'cmp_docs', 'snacks_notif', 'scrollview', 'scrollview_sign' },
|
||||
editor_only_render_when_focused = false, -- auto show/hide images when the editor gains/looses focus
|
||||
|
||||
Reference in New Issue
Block a user