hanspinckaers / kitty.nvim

Slime-like REPL for Neovim in Lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

kitty.nvim

Slime-like REPL for Neovim in Lua

This is a very simple, single file plugin.

I might get more organized but right now the scope is only to be able to send either

- selected text
- "# %%" formatted jupyter notebook cells
- whole files
- lines
- current word

To the last recently focused kitty pane.

This is pretty much all I need - but PR's welcome

requirements

brew install jq

Also you need this little bad boy in your kitty.conf

listen_on unix:/tmp/mykitty

key mappings

You do you, but these are mine

nnoremap <space>k :lua require'kitty'.send_cell()<cr>
nnoremap <space>l :lua require'kitty'.send_current_line()<cr>
vnoremap <space>l :lua require'kitty'.send_selected_lines()<cr>
nnoremap <space>h :lua require'kitty'.send_current_word()<cr>

Highlights

autocmd BufEnter,InsertLeave,TextChanged *.pynb,*.py call luaeval("require'kitty'.highlight_cell_delimiter()")

Credits

Highlighting idea stolen from https://github.com/luk400/vim-jukit

About

Slime-like REPL for Neovim in Lua

License:GNU General Public License v3.0


Languages

Language:Lua 94.2%Language:Shell 4.5%Language:Python 1.3%