File tree 4 files changed +9
-9
lines changed
4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 2
2
3
3
![ Github Actions Status] ( https://github.com/QuantStack/jupyterlab-snippets/workflows/Build/badge.svg )
4
4
5
- Code Snippets Extension for JupyterLab.
5
+ Snippets Extension for JupyterLab.
6
6
7
7
This extension is composed of a Python package named ` jupyterlab-snippets `
8
8
for the server extension and a NPM package named ` jupyterlab-snippets `
@@ -22,11 +22,11 @@ jupyter lab build
22
22
23
23
## Usage
24
24
25
- Add snippets in ` [jupyter_data_dir]/code_snippets ` (see: https://jupyter.readthedocs.io/en/latest/projects/jupyter-directories.html#id2 )
25
+ Add snippets in ` [jupyter_data_dir]/snippets ` (see: https://jupyter.readthedocs.io/en/latest/projects/jupyter-directories.html#id2 )
26
26
27
- In JupyterLab, use the "Code Snippets" menu to select the snippet:
27
+ In JupyterLab, use the "Snippets" menu to select the snippet:
28
28
29
- <img width =" 398 " alt =" Schermafbeelding 2020-03-26 om 13 16 34 " src =" https://user-images.githubusercontent.com/46192475/77646139-40a21c00-6f64 -11ea-9073-fe2d1052928f .png " >
29
+ <img width =" 570 " alt =" Schermafbeelding 2020-03-30 om 17 25 31 " src =" https://user-images.githubusercontent.com/46192475/77930697-8257fd00-72ab -11ea-8a77-36f45d6442d9 .png " >
30
30
31
31
32
32
## Troubleshoot
Original file line number Diff line number Diff line change 9
9
10
10
class SnippetsLoader :
11
11
def __init__ (self ):
12
- self .snippet_paths = jupyter_path ("code_snippets " )
12
+ self .snippet_paths = jupyter_path ("snippets " )
13
13
14
14
def collect_snippets (self ):
15
15
snippets = []
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " jupyterlab-snippets" ,
3
3
"version" : " 0.1.0" ,
4
- "description" : " Code Snippets Extension for JupyterLab" ,
4
+ "description" : " Snippets Extension for JupyterLab" ,
5
5
"keywords" : [
6
6
" jupyter" ,
7
7
" jupyterlab" ,
Original file line number Diff line number Diff line change @@ -22,10 +22,10 @@ import {
22
22
import { listSnippets , Snippet , fetchSnippet } from "./snippets" ;
23
23
24
24
/**
25
- * The command IDs used by the code snippets plugin.
25
+ * The command IDs used by the snippets plugin.
26
26
*/
27
27
namespace CommandIDs {
28
- export const open = "code- snippets:open" ;
28
+ export const open = "snippets:open" ;
29
29
}
30
30
31
31
/**
@@ -130,7 +130,7 @@ const extension: JupyterFrontEndPlugin<void> = {
130
130
if ( menu ) {
131
131
const list = await listSnippets ( ) ;
132
132
const snippetsMenu = createMenu ( commands , toTree ( list ) ) ;
133
- snippetsMenu . title . label = 'Code Snippets' ;
133
+ snippetsMenu . title . label = 'Snippets' ;
134
134
menu . addMenu ( snippetsMenu ) ;
135
135
}
136
136
}
You can’t perform that action at this time.
0 commit comments