@@ -5,22 +5,22 @@ Table of Contents *neopyter-table-of-contents*
5
5
6
6
1. Introduction | neopyter-introduction |
7
7
- How does it work? | neopyter-introduction-how-does-it-work? |
8
+ - Specifications | neopyter-introduction-specifications |
8
9
2. Requirements | neopyter-requirements |
9
10
3. Installation | neopyter-installation |
10
11
- JupyterLab Extension | neopyter-installation-jupyterlab-extension |
11
12
- Neovim Plugin | neopyter-installation-neovim-plugin |
12
13
4. Usage | neopyter-usage |
13
- 5. Configuration | neopyter-configuration |
14
- 6. Available Vim Commands | neopyter-available-vim-commands |
15
- 7. Integration | neopyter-integration |
14
+ 5. Available Vim Commands | neopyter-available-vim-commands |
15
+ 6. Integration | neopyter-integration |
16
16
- neoconf.nvim | neopyter-integration-neoconf.nvim |
17
17
- nvim-cmp | neopyter-integration-nvim-cmp |
18
18
- textobjects | neopyter-integration-textobjects |
19
- 8 . API | neopyter-api |
19
+ 7 . API | neopyter-api |
20
20
- Async | neopyter-api-async |
21
- 9 . Features | neopyter-features |
22
- 10 . Acknowledges | neopyter-acknowledges |
23
- 11 . Configuration Types | neopyter-configuration-types |
21
+ 8 . Features | neopyter-features |
22
+ 9 . Acknowledges | neopyter-acknowledges |
23
+ 10 . Configuration Types | neopyter-configuration-types |
24
24
25
25
==============================================================================
26
26
1. Introduction *neopyter-introduction*
@@ -55,6 +55,12 @@ Ultimately, `Neopyter` can control `Juppyter lab`. `Neopyter` can implement
55
55
abilities like jupynium.nvim <https://github.com/kiyoon/jupynium.nvim >.
56
56
57
57
58
+ SPECIFICATIONS *neopyter-introduction-specifications*
59
+
60
+ Please refer to doc/specification.ipynb <doc/specification.ipynb> and
61
+ doc/specification.ju.py <doc/specification.ju.py>
62
+
63
+
58
64
==============================================================================
59
65
2. Requirements *neopyter-requirements*
60
66
@@ -92,9 +98,6 @@ NEOVIM PLUGIN *neopyter-installation-neovim-plugin*
92
98
93
99
- With 💤lazy.nvim:
94
100
95
- For all config, ref to | neopyter-configuration | and
96
- | neopyter-configuration-types |
97
-
98
101
>lua
99
102
{
100
103
"SUSTech-data/neopyter",
@@ -110,45 +113,6 @@ For all config, ref to |neopyter-configuration| and
110
113
}
111
114
<
112
115
113
- Suggest keymaps(`neopyter` don’t provide default keymap):
114
-
115
- >lua
116
- on_attach = function(buf)
117
- local function map(mode, lhs, rhs, desc)
118
- vim.keymap.set(mode, lhs, rhs, { desc = desc, buffer = buf })
119
- end
120
- -- same, recommend the former
121
- map("n", "<C-Enter> ", "<cmd> Neopyter execute notebook:run-cell<cr> ", "run selected")
122
- -- map("n", "<C-Enter> ", "<cmd> Neopyter run current<cr> ", "run selected")
123
-
124
- -- same, recommend the former
125
- map("n", "<space> X", "<cmd> Neopyter execute notebook:run-all-above<cr> ", "run all above cell")
126
- -- map("n", "<space> X", "<cmd> Neopyter run allAbove<cr> ", "run all above cell")
127
-
128
- -- same, recommend the former, but the latter is silent
129
- map("n", "<space> nt", "<cmd> Neopyter execute kernelmenu:restart<cr> ", "restart kernel")
130
- -- map("n", "<space> nt", "<cmd> Neopyter kernel restart<cr> ", "restart kernel")
131
-
132
- map("n", "<S-Enter> ", "<cmd> Neopyter execute runmenu:run<cr> ", "run selected and select next")
133
- map("n", "<M-Enter> ", "<cmd> Neopyter execute run-cell-and-insert-below<cr> ", "run selected and insert below")
134
-
135
- map("n", "<F5> ", "<cmd> Neopyter execute notebook:restart-run-all<cr> ", "restart kernel and run all")
136
- end
137
- <
138
-
139
-
140
- ==============================================================================
141
- 4. Usage *neopyter-usage*
142
-
143
- - Open JupyterLab `jupyter lab`, there is a sidebar named `Neopyter` , which display neopyter ip+port
144
- - Open a `* .ju .py ` file in neovim
145
- - Now you can type `# %%` in Neovim to create a code cell.
146
- - You’ll see everything you type below that will be synchronised in the browser
147
-
148
-
149
- ==============================================================================
150
- 5. Configuration *neopyter-configuration*
151
-
152
116
Default configuration ~
153
117
154
118
>lua
@@ -197,11 +161,46 @@ Default configuration ~
197
161
}
198
162
<
199
163
200
- See | neopyter-configuration-types | for all type description.
164
+ See | neopyter-configuration-types | for all option type description.
165
+
166
+ Suggest keymaps(`neopyter` don’t provide default keymap):
167
+
168
+ >lua
169
+ on_attach = function(buf)
170
+ local function map(mode, lhs, rhs, desc)
171
+ vim.keymap.set(mode, lhs, rhs, { desc = desc, buffer = buf })
172
+ end
173
+ -- same, recommend the former
174
+ map("n", "<C-Enter> ", "<cmd> Neopyter execute notebook:run-cell<cr> ", "run selected")
175
+ -- map("n", "<C-Enter> ", "<cmd> Neopyter run current<cr> ", "run selected")
176
+
177
+ -- same, recommend the former
178
+ map("n", "<space> X", "<cmd> Neopyter execute notebook:run-all-above<cr> ", "run all above cell")
179
+ -- map("n", "<space> X", "<cmd> Neopyter run allAbove<cr> ", "run all above cell")
180
+
181
+ -- same, recommend the former, but the latter is silent
182
+ map("n", "<space> nt", "<cmd> Neopyter execute kernelmenu:restart<cr> ", "restart kernel")
183
+ -- map("n", "<space> nt", "<cmd> Neopyter kernel restart<cr> ", "restart kernel")
184
+
185
+ map("n", "<S-Enter> ", "<cmd> Neopyter execute runmenu:run<cr> ", "run selected and select next")
186
+ map("n", "<M-Enter> ", "<cmd> Neopyter execute run-cell-and-insert-below<cr> ", "run selected and insert below")
187
+
188
+ map("n", "<F5> ", "<cmd> Neopyter execute notebook:restart-run-all<cr> ", "restart kernel and run all")
189
+ end
190
+ <
191
+
192
+
193
+ ==============================================================================
194
+ 4. Usage *neopyter-usage*
195
+
196
+ - Open JupyterLab `jupyter lab`, there is a sidebar named `Neopyter` , which display neopyter ip+port
197
+ - Open a `* .ju .py ` file in neovim
198
+ - Now you can type `# %%` in Neovim to create a code cell.
199
+ - You’ll see everything you type below that will be synchronised in the browser
201
200
202
201
203
202
==============================================================================
204
- 6 . Available Vim Commands *neopyter-available-vim-commands*
203
+ 5 . Available Vim Commands *neopyter-available-vim-commands*
205
204
206
205
- Status
207
206
- `:Neopyter status` alias to `:checkhealth neopyter` currently
@@ -226,7 +225,7 @@ See |neopyter-configuration-types| for all type description.
226
225
227
226
228
227
==============================================================================
229
- 7 . Integration *neopyter-integration*
228
+ 6 . Integration *neopyter-integration*
230
229
231
230
232
231
NEOCONF.NVIM *neopyter-integration-neoconf.nvim*
@@ -350,7 +349,7 @@ Supported captures in `textobjects` query group
350
349
351
350
352
351
==============================================================================
353
- 8 . API *neopyter-api*
352
+ 7 . API *neopyter-api*
354
353
355
354
`Neopyter` provides rich lua APIs, you could use below code as initialization:
356
355
@@ -368,8 +367,8 @@ Supported captures in `textobjects` query group
368
367
current_notebook:run_all_below()
369
368
<
370
369
371
- - | neopyter-notebook-api |
372
- - | neopyter-jupyterlab-api-api |
370
+ - Notebook API: | neopyter-notebook-api |
371
+ - JupyterLab API | neopyter-jupyterlab-api-api |
373
372
374
373
375
374
ASYNC *neopyter-api-async*
@@ -397,7 +396,7 @@ ASYNC *neopyter-api-async*
397
396
398
397
399
398
==============================================================================
400
- 9 . Features *neopyter-features*
399
+ 8 . Features *neopyter-features*
401
400
402
401
- Neovim
403
402
- ☒ Full sync
@@ -445,7 +444,7 @@ ASYNC *neopyter-api-async*
445
444
446
445
447
446
==============================================================================
448
- 10 . Acknowledges *neopyter-acknowledges*
447
+ 9 . Acknowledges *neopyter-acknowledges*
449
448
450
449
- jupynium.nvim <https://github.com/kiyoon/jupynium.nvim >: Selenium-automated Jupyter Notebook that is synchronised with Neovim in real-time.
451
450
- snacks.nvim <https://github.com/folke/snacks.nvim >: The `zen` highlight is inspired by `snacks.zen`
0 commit comments