neovim-confs/lua/plex/plugins/extras/coding/jupyter.lua

51 lines
1.1 KiB
Lua
Raw Permalink Normal View History

2023-11-21 15:41:14 +01:00
return {
{
"luk400/vim-jukit",
-- FIXME: this does not work
enabled = false,
keys = {
-- See https://github.com/machakann/vim-sandwich/blob/master/macros/sandwich/keymap/surround.vim
{ -- open output
"<leader>cno",
"call jukit#splits#output_and_history()",
silent = true,
},
{ -- close output
"<leader>cnc",
"call jukit#splits#close_output_and_history(1)",
silent = true,
},
{ -- execute current cell
"<leader>cn<space>",
"call jukit#send#section(0)",
silent = true,
},
{ -- execute all cells
"<leader>cnn",
"call jukit#send#all()",
silent = true,
},
{ -- create cell below
"<leader>cnj",
"call jukit#cells#create_below(0)",
silent = true,
},
{ -- create cell above
"<leader>cnj",
"call jukit#cells#create_above(0)",
silent = true,
},
{ -- delete cell
"<leader>cnx",
"call jukit#cells#delete()",
silent = true,
},
{ -- conversion between notebook and regular python
"<leader>cnp",
'call jukit#convert#notebook_convert("jupyter-notebook")',
silent = true,
},
},
},
}