NotebookNavigator.nvim
NotebookNavigator.nvim copied to clipboard
New Feature: Run Cells Above
New Feature: Run Cells Above
This pull request introduces a new feature run_cells_above
to the NotebookNavigator plugin. This function allows users to execute all code cells above the current cell, which is similar to functionality seen in tools like Jupyter notebooks.
Implementation:
- The function calculates the current cell's position and executes each cell above it.
- Utilizes the existing infrastructure for running cells but adds logic to determine the scope of execution dynamically based on the cursor's position.
Usage:
Users can invoke this function via a command or keybinding in Neovim. Example usage might be via a mapped key in normal mode, such as below
...
keys = {
...
{ "[e", function() require("notebook-navigator").run_cells_above "" end },
},
...
Request for Feedback:
Please review the implementation details and functionality. I am open to suggestions for improvements or additional scenarios that should be considered.
Looking forward to your feedback and hoping for integration into the main project!