Skip to content

Commit f305ab4

Browse files
authored
Merge pull request #301 from krassowski/kiteco-completion-items
Support JupyterLab 2.2
2 parents cefda11 + cb5ad3e commit f305ab4

File tree

15 files changed

+3861
-2677
lines changed

15 files changed

+3861
-2677
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
## CHANGELOG
22

3+
### `@krassowski/jupyterlab-lsp 1.2.0` (unreleased)
4+
5+
- features
6+
7+
- support for JupyterLab 2.2 ([#301][])
8+
- completer now displays server-provided documentation,
9+
and a kernel icon for kernel suggestions without type information ([#301][])
10+
11+
- bug fixes
12+
13+
- path-autocompletion issues were resolved upstream an this release adopts these changes
14+
15+
[#301]: https://github.com/krassowski/jupyterlab-lsp/pull/301
16+
317
### `@krassowski/jupyterlab-lsp 1.1.2` (2020-08-05)
418

519
- bug fixes

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Open it searching for "Show diagnostics panel" in JupyterLab commands palette or
7676

7777
Either:
7878

79-
- JupyterLab >=2.1.0,<3.0.0a0
79+
- JupyterLab >=2.2.0,<3.0.0a0
8080

8181
And:
8282

@@ -99,9 +99,9 @@ Use of a python `virtualenv` or a conda env is also recommended.
9999
1. install JupyterLab
100100

101101
```bash
102-
conda install -c conda-forge 'jupyterlab>=2.1,<3.0.0a0'
102+
conda install -c conda-forge 'jupyterlab>=2.2,<3.0.0a0'
103103
# or
104-
pip install 'jupyterlab>=2.1,<3.0.0a0'
104+
pip install 'jupyterlab>=2.2,<3.0.0a0'
105105
```
106106

107107
1. install the server extension:

atest/05_Features/Completion.robot

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,27 @@ Autocompletes If Only One Option
4343
Enter Cell Editor 3 line=1
4444
Press Keys None cle
4545
Wait Until Fully Initialized
46+
# First tab brings up the completer
4647
Press Keys None TAB
48+
Completer Should Suggest clear
49+
# Second tab inserts the only suggestion
50+
Press Keys None TAB
51+
# depends on Python list type having only one method with prefix "cle"
4752
Wait Until Keyword Succeeds 40x 0.5s Cell Editor Should Equal 3 list.clear
4853

54+
Does Not Autocomplete If Multiple Options
55+
Enter Cell Editor 3 line=1
56+
Press Keys None c
57+
Wait Until Fully Initialized
58+
# First tab brings up the completer
59+
Press Keys None TAB
60+
Completer Should Suggest copy
61+
# Second tab inserts should not insert the first of many choices.
62+
Press Keys None TAB
63+
# depends on Python list type having multiple methods with prefix "c"
64+
# in this case "Completer Should Suggest" means that the completer is still shown!
65+
Completer Should Suggest copy
66+
4967
User Can Select Lowercase After Starting Uppercase
5068
# `from time import Tim<tab>` → `from time import time`
5169
Enter Cell Editor 5 line=1
@@ -58,12 +76,16 @@ Mid Token Completions Do Not Overwrite
5876
# `disp<tab>data` → `display_table<cursor>data`
5977
Place Cursor In Cell Editor At 9 line=1 character=4
6078
Capture Page Screenshot 01-cursor-placed.png
61-
Press Keys None TAB
79+
Trigger Completer
80+
Completer Should Suggest display_table
81+
Select Completer Suggestion display_table
6282
Capture Page Screenshot 02-completed.png
6383
Wait Until Keyword Succeeds 40x 0.5s Cell Editor Should Equal 9 display_tabledata
6484
# `disp<tab>lay` → `display_table<cursor>`
6585
Place Cursor In Cell Editor At 11 line=1 character=4
66-
Press Keys None TAB
86+
Trigger Completer
87+
Completer Should Suggest display_table
88+
Select Completer Suggestion display_table
6789
Wait Until Keyword Succeeds 40x 0.5s Cell Editor Should Equal 11 display_table
6890

6991
Completion Works For Tokens Separated By Space
@@ -108,6 +130,7 @@ Cell Editor Should Equal
108130
Select Completer Suggestion
109131
[Arguments] ${text}
110132
${suggestion} = Set Variable css:.jp-Completer-item[data-value="${text}"]
133+
Wait Until Element Is Visible ${suggestion} timeout=10s
111134
Mouse Over ${suggestion}
112135
Click Element ${suggestion} code
113136

binder/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ channels:
77
dependencies:
88
# runtime dependencies
99
- python >=3.7,<3.8.0a0
10-
- jupyterlab >=2.1.0,<3.0.0a0
10+
- jupyterlab >=2.2.0,<3.0.0a0
1111
- notebook >=4.3.1
1212
# build dependencies
1313
- nodejs >=10,<14

ci/job.test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ parameters:
1212
pythons:
1313
- name: ThreeSix
1414
spec: '=3.6'
15-
lab: '>=2.1.0,<3.0.0a0'
15+
lab: '>=2.2.0,<3.0.0a0'
1616
nodejs: '>=10,<11.0.0.a0'
1717
- name: ThreeSeven
1818
spec: '=3.7'
19-
lab: '>=2.1.0,<3.0.0a0'
19+
lab: '>=2.2.0,<3.0.0a0'
2020
nodejs: '>=12,<13.0.0a0'
2121
- name: ThreeEight
2222
spec: '=3.8'
23-
lab: '>=2.1.0,<3.0.0a0'
23+
lab: '>=2.2.0,<3.0.0a0'
2424
nodejs: '>=13,<14.0.0a0'
2525
js_cov_packages:
2626
- jupyterlab-go-to-definition

ci/steps.conda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
parameters:
22
name: Linux
33
packages: ''
4-
install_cmd: conda install -yn base -c conda-forge conda python-libarchive-c
4+
install_cmd: conda install -yn base conda
55

66
steps:
77
- ${{ if eq(parameters.name, 'Linux') }}:

docs/Releasing.ipynb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050
"- `packages/jupyterlab-lsp/package.json` > `devDependencies` >\n",
5151
" `@jupyterlab/application` (canonical)\n",
5252
"- `binder/environment.yml`\n",
53+
"- `requirements/lab.txt`\n",
54+
"- `ci/job.test.yml`\n",
5355
"- `README.md`\n",
5456
"\n",
5557
"### Releasing:\n",

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
"bash-language-server": "^1.6.1",
77
"dictionary-en": "^3.0.0",
88
"dockerfile-language-server-nodejs": "^0.0.22",
9+
"eslint": "^6.8.0",
910
"eslint-config-prettier": "^6.7.0",
1011
"eslint-plugin-jest": "^23.8.2",
1112
"eslint-plugin-prettier": "^3.1.1",
1213
"eslint-plugin-react": "^7.19.0",
13-
"eslint": "^6.8.0",
1414
"husky": "^3.0.9",
1515
"javascript-typescript-langserver": "^2.11.3",
1616
"lerna": "^3.13.2",
@@ -25,7 +25,6 @@
2525
},
2626
"husky": {
2727
"hooks": {
28-
"pre-commit": "precise-commits"
2928
}
3029
},
3130
"prettier": {

packages/jupyterlab-go-to-definition/package.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -30,37 +30,37 @@
3030
"test": "jlpm jest --coverage --coverageReporters=cobertura --coverageReporters=html --coverageReporters=text-summary"
3131
},
3232
"peerDependencies": {
33-
"@jupyterlab/application": "~2.0.0",
34-
"@jupyterlab/apputils": "~2.0.0",
35-
"@jupyterlab/codeeditor": "~2.0.0",
36-
"@jupyterlab/codemirror": "~2.0.0",
37-
"@jupyterlab/coreutils": "~4.0.0",
38-
"@jupyterlab/docmanager": "~2.0.0",
39-
"@jupyterlab/docregistry": "~2.0.0",
40-
"@jupyterlab/fileeditor": "~2.0.0",
41-
"@jupyterlab/notebook": "~2.0.0",
42-
"@jupyterlab/observables": "~3.0.0",
43-
"@jupyterlab/services": "~5.0.0",
33+
"@jupyterlab/application": "~2.2.0",
34+
"@jupyterlab/apputils": "~2.2.0",
35+
"@jupyterlab/codeeditor": "~2.2.0",
36+
"@jupyterlab/codemirror": "~2.2.0",
37+
"@jupyterlab/coreutils": "~4.2.0",
38+
"@jupyterlab/docmanager": "~2.2.0",
39+
"@jupyterlab/docregistry": "~2.2.0",
40+
"@jupyterlab/fileeditor": "~2.2.0",
41+
"@jupyterlab/notebook": "~2.2.0",
42+
"@jupyterlab/observables": "~3.2.0",
43+
"@jupyterlab/services": "~5.2.0",
4444
"@lumino/algorithm": "*",
4545
"codemirror": "*",
4646
"react": "*"
4747
},
4848
"devDependencies": {
49-
"@jupyterlab/application": "~2.0.0",
50-
"@jupyterlab/apputils": "~2.0.0",
51-
"@jupyterlab/codeeditor": "~2.0.0",
52-
"@jupyterlab/codemirror": "~2.0.0",
49+
"@jupyterlab/application": "~2.2.0",
50+
"@jupyterlab/apputils": "~2.2.0",
51+
"@jupyterlab/codeeditor": "~2.2.0",
52+
"@jupyterlab/codemirror": "~2.2.0",
5353
"@jupyterlab/coreutils": "~4.0.0",
54-
"@jupyterlab/docmanager": "~2.0.0",
55-
"@jupyterlab/docregistry": "~2.0.0",
56-
"@jupyterlab/fileeditor": "~2.0.0",
57-
"@jupyterlab/notebook": "~2.0.0",
58-
"@jupyterlab/observables": "~3.0.0",
59-
"@jupyterlab/services": "~5.0.0",
54+
"@jupyterlab/docmanager": "~2.2.0",
55+
"@jupyterlab/docregistry": "~2.2.0",
56+
"@jupyterlab/fileeditor": "~2.2.0",
57+
"@jupyterlab/notebook": "~2.2.0",
58+
"@jupyterlab/observables": "~3.2.0",
59+
"@jupyterlab/services": "~5.2.0",
6060
"@lumino/algorithm": "*",
6161
"codemirror": "*",
6262
"react": "*",
63-
"@jupyterlab/testutils": "~2.0.0",
63+
"@jupyterlab/testutils": "~2.2.0",
6464
"@types/codemirror": "^0.0.74",
6565
"@types/chai": "^4.1.7",
6666
"@types/jest": "^23.3.11",

packages/jupyterlab-go-to-definition/src/jumpers/jumper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const system_keys = [
6565
'F2',
6666
'F3',
6767
'F4',
68-
' F5',
68+
'F5',
6969
'F6',
7070
'F7',
7171
'F8',

0 commit comments

Comments
 (0)