https://github.com/atinylittleshell/comment-repl.nvim
A neovim plugin that allows you to run code in a REPL without ever leaving your buffer.
https://github.com/atinylittleshell/comment-repl.nvim
jupyter jupyter-notebook neovim notebook python repl
Last synced: 4 months ago
JSON representation
A neovim plugin that allows you to run code in a REPL without ever leaving your buffer.
- Host: GitHub
- URL: https://github.com/atinylittleshell/comment-repl.nvim
- Owner: atinylittleshell
- License: mit
- Created: 2024-04-07T19:55:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-14T00:14:30.000Z (over 1 year ago)
- Last Synced: 2025-02-27T23:28:12.224Z (5 months ago)
- Topics: jupyter, jupyter-notebook, neovim, notebook, python, repl
- Language: Lua
- Homepage:
- Size: 264 KB
- Stars: 19
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Comment-REPL.nvim

A neovim plugin that allows you to run code in a REPL without ever leaving your buffer. Output from the REPL is printed as a comment below the executed code.
Can be used as an extremely simplified Jupyter Notebook experience.
## How does it work
`:CommentREPLExecute` will run the code cell at your cursor and print the output as a comment. That's it!

## Installation
Using lazy.nvim:
```lua
{
'atinylittleshell/comment-repl.nvim',
opts = {},
}
```## Configuration
See [config.lua](lua/comment-repl/config.lua) for config schema and default values.
Python is the only language supported by default, but you can add support for other REPLs through configuration.
## Commands
`:CommentREPLExecute` - Run the code cell at the cursor and print the output as a comment.
`:CommentREPLLog` - View logs from Comment-REPL.nvim.
```lua
-- By default the plugin will not enable any key bindings.
-- Your can define your own keybind behavior like below.
vim.keymap.set('n', 'ce', 'CommentREPLExecute')
vim.keymap.set('n', 'cl', 'CommentREPLLog')
```