Skip to content

Commit a06e806

Browse files
authored
Merge pull request #481 from krassowski/add-julia-and-jedi
Add Julia and Jedi server auto-detection
2 parents 9d8af89 + 6600108 commit a06e806

File tree

19 files changed

+103
-13
lines changed

19 files changed

+103
-13
lines changed

.github/workflows/job.test.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ jobs:
6262
installer-url: ${{ env.MAMBAFORGE_URL }}-Linux-x86_64.sh
6363
condarc-file: .github/.condarc
6464

65-
- name: install base conda dependencies
65+
- name: Install base conda dependencies
6666
run: mamba env update -n test --file requirements/github-actions.yml
6767

68-
- name: install linting dependencies
68+
- name: Install linting dependencies
6969
run: mamba env update -n test --file requirements/lint.yml
7070

71-
- name: check integrity of package versions
71+
- name: Check integrity of package versions
7272
run: python scripts/integrity.py
7373

7474
- name: Cache node_modules
@@ -228,6 +228,11 @@ jobs:
228228
steps:
229229
- uses: actions/checkout@v2
230230

231+
- uses: julia-actions/setup-julia@v1
232+
233+
- name: Install Julia language server
234+
run: julia -e 'using Pkg; Pkg.add("LanguageServer")'
235+
231236
- name: Set JupyterLab and Node versions
232237
uses: cschleiden/replace-tokens@v1
233238
with:

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- features
66

7+
- added experimental detection of Julia and Jedi language servers ([#481])
78
- make the extension work with `jupyterlab-classic` - experimental, not all features are functional yet ([#465])
89
- new status "Server extension missing" and a dialog with advice was added to help users with atypical configurations ([#476])
910
- for developers: the verbosity of console logs is now controllable from settings and set to warn by default ([#480])
@@ -21,6 +22,7 @@
2122
[#476]: https://github.com/krassowski/jupyterlab-lsp/pull/476
2223
[#478]: https://github.com/krassowski/jupyterlab-lsp/pull/478
2324
[#480]: https://github.com/krassowski/jupyterlab-lsp/pull/480
25+
[#481]: https://github.com/krassowski/jupyterlab-lsp/pull/481
2426

2527
### `jupyter-lsp 1.0.1` (unreleased)
2628

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,3 +439,9 @@ python setup.py sdist bdist_wheel
439439
## Debugging
440440

441441
Adjust `loggingLevel` in the `Advanced Settings Editor` -> `Language Server` to see more log messages.
442+
443+
For robot tests set:
444+
445+
```robot
446+
Configure JupyterLab Plugin {"loggingConsole": "floating", "loggingLevel": "debug"}
447+
```

atest/01_Editor.robot

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ JSON
2727
JSX
2828
${def} = Set Variable xpath:(//span[contains(@class, 'cm-variable')][contains(text(), 'hello')])[last()]
2929
Editor Shows Features for Language JSX example.jsx Diagnostics=Expression expected Jump to Definition=${def} Rename=${def}
30+
#Julia
31+
# ${def} = Set Variable xpath:(//span[contains(@class, 'cm-builtin')][contains(text(), 'add_together')])[last()]
32+
# Editor Shows Features for Language Julia example.jl Jump to Definition=${def} Rename=${def}
3033

3134
LaTeX
3235
[Tags] language:latex
@@ -70,7 +73,9 @@ YAML
7073
Editor Shows Features for Language
7174
[Arguments] ${Language} ${file} &{features}
7275
Prepare File for Editing ${Language} editor ${file}
76+
# Run Keyword If "${Language}" == "Julia" Sleep 35s
7377
Wait Until Fully Initialized
78+
# Run Keyword If "${Language}" == "Julia" Sleep 5s
7479
FOR ${f} IN @{features}
7580
Run Keyword If "${f}" == "Diagnostics" Editor Should Show Diagnostics ${features["${f}"]}
7681
... ELSE IF "${f}" == "Jump to Definition" Editor Should Jump To Definition ${features["${f}"]}

atest/03_Notebook.robot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,6 @@ Code Overrides
6868
Setup Notebook Python ${file}
6969
${virtual_path} = Set Variable ${VIRTUALDOCS DIR}${/}Code overrides.ipynb
7070
Wait Until Created ${virtual_path}
71+
Wait Until Keyword Succeeds 10x 1s File Should Not Be Empty ${virtual_path}
7172
${document} = Get File ${virtual_path}
7273
Should Be Equal ${document} get_ipython().run_line_magic("ls", "")\n\n\nget_ipython().run_line_magic("pip", " freeze")\n

atest/04_Interface/BackendFailure.robot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
*** Settings ***
22
Suite Setup Setup Server and Browser server_extension_enabled=${False}
3+
Suite Teardown Setup Server and Browser server_extension_enabled=${True}
34
Resource ../Keywords.robot
45

56
*** Variables ***

atest/05_Features/Completion.robot

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ Completes Large Namespaces
223223
[Setup] Prepare File for Editing R completion completion.R
224224
Place Cursor In File Editor At 6 7
225225
Wait Until Fully Initialized
226-
Trigger Completer
226+
Wait Until Keyword Succeeds 3x 2s Trigger Completer timeout=45s
227227
Completer Should Suggest abs timeout=30s
228228
[Teardown] Clean Up After Working With File completion.R
229229

@@ -272,5 +272,6 @@ Completer Should Not Suggest
272272
Wait Until Page Does Not Contain Element ${COMPLETER_BOX} .jp-Completer-item[data-value="${text}"]
273273

274274
Trigger Completer
275+
[Arguments] ${timeout}=35s
275276
Press Keys None TAB
276-
Wait Until Page Contains Element ${COMPLETER_BOX} timeout=35s
277+
Wait Until Page Contains Element ${COMPLETER_BOX} timeout=${timeout}

atest/05_Features/Highlights.robot

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,15 @@ Highlights are modified after typing
4545
Should Highlight Token testa
4646

4747
Highlights are removed when no cell is focused
48-
Enter Cell Editor 1 line=2
4948
# Remove when turned on
5049
Configure JupyterLab Plugin {"removeOnBlur": true} plugin id=${HIGHLIGHTS PLUGIN ID}
50+
Enter Cell Editor 1 line=2
5151
Should Highlight Token test
5252
Blur Cell Editor 1
5353
Should Not Highlight Any Tokens
5454
# Do not remove when turned off
5555
Configure JupyterLab Plugin {"removeOnBlur": false} plugin id=${HIGHLIGHTS PLUGIN ID}
56+
Enter Cell Editor 1 line=2
5657
Should Highlight Token test
5758
Blur Cell Editor 1
5859
Should Highlight Token test

atest/05_Features/Jump.robot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Python Jumps between Files
1616
Jump To Definition ${sel}
1717
Wait Until Page Contains ANOTHER_CONSTANT
1818
Capture Page Screenshot 10-jumped.png
19+
Clean Up After Working With File jump_b.py
1920

2021
Ctrl Click And Jumping Back Works
2122
[Setup] Prepare File for Editing Python editor jump.py

atest/examples/example.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
add_together(x,y) = x + y
2+
3+
4+
add_together(1)

0 commit comments

Comments
 (0)