Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 19 days 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 (7 months ago)
- Default Branch: main
- Last Pushed: 2024-04-14T00:14:30.000Z (7 months ago)
- Last Synced: 2024-04-14T11:55:28.415Z (7 months ago)
- Topics: jupyter, jupyter-notebook, neovim, notebook, python, repl
- Language: Lua
- Homepage:
- Size: 264 KB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Comment-REPL.nvim
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/atinylittleshell/comment-repl.nvim/lint_test.yml?branch=main&style=for-the-badge)
![Lua](https://img.shields.io/badge/Made%20with%20Lua-blueviolet.svg?style=for-the-badge&logo=lua)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!
![Screenshot](doc/screenshot.png?raw=true)
## 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')
```