79 lines
1.7 KiB
Lua
79 lines
1.7 KiB
Lua
return {
|
|
'benlubas/molten-nvim',
|
|
commit = 'a286aa914d9a154bc359131aab788b5a077a5a99',
|
|
build = ':UpdateRemotePlugins',
|
|
lazy = false,
|
|
|
|
--cmd = {
|
|
-- 'MoltenInfo',
|
|
-- 'MoltenInit',
|
|
-- 'MoltenDeinit',
|
|
-- 'MoltenGoto',
|
|
-- 'MoltenNext',
|
|
-- 'MoltenPrev',
|
|
-- 'MoltenEvaluateLine',
|
|
-- 'MoltenEvaluateVisual',
|
|
-- 'MoltenEvaluateOperator',
|
|
-- 'MoltenEvaluateArgument',
|
|
-- 'MoltenReevaluateCell',
|
|
-- 'MoltenDelete',
|
|
-- 'MoltenShowOutput',
|
|
-- 'MoltenHideOutput',
|
|
-- 'MoltenEnterOutput',
|
|
-- 'MoltenInterrupt',
|
|
-- 'MoltenOpenInBrowser',
|
|
-- 'MoltenImagePopup',
|
|
-- 'MoltenRestart',
|
|
-- 'MoltenSave',
|
|
-- 'MoltenLoad',
|
|
-- 'MoltenExportOutput',
|
|
-- 'MoltenImportOutput',
|
|
--},
|
|
|
|
keys = {
|
|
{
|
|
'<leader>ji',
|
|
function()
|
|
vim.ui.input({
|
|
prompt = 'Enter Jupyter Server URL:',
|
|
}, function(input)
|
|
if input then
|
|
vim.print(input)
|
|
vim.cmd(':MoltenInit ' .. input)
|
|
end
|
|
end)
|
|
end,
|
|
desc = '[J]upyter [I]nitialize',
|
|
},
|
|
{
|
|
'<leader>jo',
|
|
':noautocmd MoltenEnterOutput<CR>',
|
|
silent = true,
|
|
desc = '[J]upyter [I]nitialize',
|
|
},
|
|
{
|
|
'<leader>jO',
|
|
':MoltenOpenInBrowser<CR>',
|
|
silent = true,
|
|
desc = '[J]upyter [I]nitialize',
|
|
},
|
|
},
|
|
|
|
init = function()
|
|
-- Configuration
|
|
if vim.g.neovide then
|
|
vim.g.molten_image_provider = 'none'
|
|
else
|
|
vim.g.molten_image_provider = 'image.nvim'
|
|
vim.g.molten_image_location = 'float'
|
|
end
|
|
vim.g.molten_output_win_max_height = 12
|
|
vim.g.molten_auto_open_output = false
|
|
vim.g.molten_auto_init_behavior = 'raise'
|
|
vim.g.molten_virt_text_output = true
|
|
vim.g.molten_virt_lines_off_by_1 = true
|
|
--vim.g.molten_output_show_more = true
|
|
vim.g.molten_use_border_highlights = true
|
|
end,
|
|
}
|