dotfiles/.config/nvim/lua/plugins/jukit.lua

26 lines
1.4 KiB
Lua
Raw Normal View History

local opts = { noremap = true, silent = true, buffer = true }
-- Create new code cell below. Argument: Whether to create code cell (0) or markdown cell (1)
vim.keymap.set('n', '<leader>jco', '<cmd>call jukit#cells#create_below(0)<CR>', opts)
-- Create new code cell above. Argument: Whether to create code cell (0) or markdown cell (1)
vim.keymap.set('n', '<leader>jcO', '<cmd>call jukit#cells#create_above(0)<CR>', opts)
-- Create new text (markdown) cell below. Argument: Whether to create code cell (0) or markdown cell (1)
vim.keymap.set('n', '<leader>jct', '<cmd>call jukit#cells#create_below(1)<CR>', opts)
-- Create new text (markdown) cell above. Argument: Whether to create code cell (0) or markdown cell (1)
vim.keymap.set('n', '<leader>jcT', '<cmd>call jukit#cells#create_above(1)<CR>', opts)
-- Deletes the current cell
vim.keymap.set('n', '<leader>jcd', '<cmd>call jukit#cells#delete()<CR>', opts)
-- Send current section (argument: 0 indicates the current section)
vim.keymap.set('n', '<leader>jcc', '<cmd>call jukit#send#section(0)<CR>', opts)
-- Send all sections up to the current section
vim.keymap.set('n', '<leader>jcac', '<cmd>call jukit#send#until_current_section()<CR>', opts)
-- Send all sections
vim.keymap.set('n', '<leader>jca', '<cmd>call jukit#send#all()<CR>', opts)
-- Open an output split
vim.keymap.set('n', '<leader>jos', '<cmd>call jukit#splits#output()<CR>', opts)