Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/job.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ jobs:
nodejs: '>=18,<19.0.0.a0'
r: '>=4'
lab: '>=4.1.0,<5'
- python: '3.11'
- python: '3.12'
# Node 20 end-of-life: 2026-04-30
nodejs: '>=20,<21.0.0.a0'
r: '>=4'
Expand Down Expand Up @@ -345,7 +345,7 @@ jobs:
- python: '3.9'
dist: 'jupyter*lsp*.tar.gz'
lab: '>=4.1.0,<5'
- python: '3.11'
- python: '3.12'
dist: 'jupyter*lsp*.whl'
lab: '>=4.1.0,<5'
- python: 'pypy-3.9'
Expand All @@ -357,6 +357,13 @@ jobs:
py_cmd: python3
- os: 'ubuntu'
py_cmd: python
exclude:
# Exclude macOS with Python versions older than 3.11 as setup-python does not support it
# see https://github.com/actions/setup-python/issues/906
- os: macos
python: '3.9'
- os: macos
python: 'pypy-3.9'
steps:
- name: Install Python
uses: actions/setup-python@v5
Expand Down
3 changes: 3 additions & 0 deletions atest/_fixtures/overrides.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
}
}
}
},
"@jupyterlab/notebook-extension:tracker": {
"windowingMode": "none"
}
}
14 changes: 7 additions & 7 deletions atest/_resources/Keywords.resource
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
*** Settings ***
Library Collections
Library OperatingSystem
Library Process
Library String
Library Collections
Library SeleniumLibrary
Library ../_libraries/logcheck.py
Library ../_libraries/ports.py
Expand Down Expand Up @@ -37,12 +37,12 @@ Setup Server and Browser
... env:JUPYTER_NO_CONFIG=${EMPTY}
Set Global Variable ${SERVER} ${server}
IF ${wait_for_lsp_log}
Wait Until File Contains ${LAB LOG}
... The following Language Servers will be available
Wait Until File Contains ${LAB LOG}
... The following Language Servers will be available
ELSE
# Jupyter Server X.X.X is running at:
Wait Until File Contains ${LAB LOG}
... is running at:
Wait Until File Contains ${LAB LOG}
... is running at:
END
Open JupyterLab
Read Page Config
Expand Down Expand Up @@ -343,8 +343,8 @@ Enter Cell Editor
Click Element css:.jp-Cell:nth-child(${cell_nr}) .cm-line:nth-child(${line})
# So it should be focused after click right? Well, not when using this driver
# in JupyterLab 4.1 - we still need to press enter apparently.
${focused} Get Element Count css:.jp-Cell:nth-child(${cell_nr}) .cm-focused
Run Keyword If ${focused} == 0 Press Keys None ENTER
${focused} = Get Element Count css:.jp-Cell:nth-child(${cell_nr}) .cm-focused
IF ${focused} == 0 Press Keys None ENTER
Wait Until Page Contains Element css:.jp-Cell:nth-child(${cell_nr}) .cm-focused
# clicking on line does not appear sufficient in CM6 (but still useful because it ensures we have it in view
Execute JavaScript
Expand Down
2 changes: 1 addition & 1 deletion atest/suites/03_Notebook.robot
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Foreign Extractors
@{diagnostics} = Create List
... Double quote to prevent globbing and word splitting # bash, configured by spec.env
... ame 'valid' # python, mypy and pyflakes will fight over `(N|n)ame 'valid'`, just hope for the best
... Trailing whitespace is superfluous. # r
... Remove trailing whitespace. # r
... `frob` is misspelt # markdown
... Command terminated with space # latex
FOR ${diagnostic} IN @{diagnostics}
Expand Down
3 changes: 1 addition & 2 deletions atest/suites/07_Configuration.robot
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ LaTeX

*** Keywords ***
Settings Should Change Editor Diagnostics
[Arguments]
... ${language}
[Arguments] ${language}
... ${file}
... ${server}
... ${settings}
Expand Down
2 changes: 0 additions & 2 deletions binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ dependencies:
- robotframework >=7
- robotframework-lsp
- robotframework-robocop
- robotframework-tidy
# TODO: handle upstream
# - robotkernel
# - jupyterlab_robotmode
Expand All @@ -57,4 +56,3 @@ dependencies:
- mypy
- pip
- robotframework-robocop
- robotframework-tidy
20 changes: 14 additions & 6 deletions packages/jupyterlab-lsp/src/features/completion/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,23 +161,33 @@ export class CompletionProvider implements ICompletionProvider<CompletionItem> {
return false;
}

// do not show completer on deletions
if (sourceChange.some(delta => delta.delete != null)) {
return false;
}
const token = editor.getTokenAtCursor();

if (this.options.settings.composite.continuousHinting) {
// if token type is known and not ignored token type is ignored - show completer
// show completer if:
// - token type is known, and
// - is not an ignored token type, and
// - the source change includes a non-whitespace insertion
if (
token.type &&
!this.options.settings.composite.suppressContinuousHintingIn.includes(
token.type
) &&
sourceChange.some(
delta =>
delta.insert != null &&
!completerIsVisible &&
delta.insert.trim().length > 0
)
) {
return true;
}
// otherwise show it may still be shown due to trigger character
}
// completer may still be shown due to trigger character
if (
!token.type ||
this.options.settings.composite.suppressTriggerCharacterIn.includes(
Expand All @@ -187,11 +197,9 @@ export class CompletionProvider implements ICompletionProvider<CompletionItem> {
return false;
}

// show completer if the trigger character was inserted
return sourceChange.some(
delta =>
delta.insert != null &&
(triggerCharacters.includes(delta.insert) ||
(!completerIsVisible && delta.insert.trim().length > 0))
delta => delta.insert != null && triggerCharacters.includes(delta.insert)
);
}

Expand Down
1 change: 0 additions & 1 deletion requirements/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ dependencies:
- robotframework >=7
- robotframework-lsp
- robotframework-robocop
- robotframework-tidy
# TODO: handle upstream
# - robotkernel
# - jupyterlab_robotmode
Expand Down
1 change: 0 additions & 1 deletion requirements/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ dependencies:
- mypy
- pip
- robotframework-robocop
- robotframework-tidy
10 changes: 6 additions & 4 deletions scripts/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
"missing-doc-suite",
"missing-doc-test-case",
"missing-doc-resource-file",
"no-global-variable",
"no-suite-variable",
"replace-create-with-var",
"replace-set-variable-with-var",
"todo-in-comment",
Expand All @@ -69,11 +71,11 @@
"wrong-case-in-keyword-name",
]

ROBOCOP_CONFIGS = ["line-too-long:line_length:200"]
ROBOCOP_CONFIGS = ["line-too-long.line_length=200"]

ROBOCOP = sum(
[
*[["--exclude", e] for e in ROBOCOP_EXCLUDES],
*[["--ignore", e] for e in ROBOCOP_EXCLUDES],
*[["--configure", c] for c in ROBOCOP_CONFIGS],
],
[],
Expand Down Expand Up @@ -119,8 +121,8 @@ def lint(*args):
"--console",
"dotted",
],
robot_tidy=["robotidy", *ALL_ROBOT],
robot_cop=["robocop", *ROBOCOP, *ALL_ROBOT],
robot_tidy=["robocop", "format", *ALL_ROBOT],
robot_cop=["robocop", "check", *ROBOCOP, *ALL_ROBOT],
)

if filters:
Expand Down
18 changes: 2 additions & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16799,7 +16799,7 @@ __metadata:
languageName: node
linkType: hard

"vscode-jsonrpc@npm:8.0.2":
"vscode-jsonrpc@npm:8.0.2, vscode-jsonrpc@npm:^8.0.2":
version: 8.0.2
resolution: "vscode-jsonrpc@npm:8.0.2"
checksum: 9d055fd4c87ef1093b0eecb5370bfaf3402179b6639149b6d0f7e0bde60cf580091c7e07b0caff868f10f90331b17e7383c087217c077fdd1b5ae7bc23b72f77
Expand All @@ -16820,13 +16820,6 @@ __metadata:
languageName: node
linkType: hard

"vscode-jsonrpc@npm:^8.0.2":
version: 8.2.0
resolution: "vscode-jsonrpc@npm:8.2.0"
checksum: f302a01e59272adc1ae6494581fa31c15499f9278df76366e3b97b2236c7c53ebfc71efbace9041cfd2caa7f91675b9e56f2407871a1b3c7f760a2e2ee61484a
languageName: node
linkType: hard

"vscode-languageclient@npm:^6.1.3":
version: 6.1.4
resolution: "vscode-languageclient@npm:6.1.4"
Expand Down Expand Up @@ -16956,7 +16949,7 @@ __metadata:
languageName: node
linkType: hard

"vscode-languageserver-types@npm:3.17.2":
"vscode-languageserver-types@npm:3.17.2, vscode-languageserver-types@npm:^3.13.0, vscode-languageserver-types@npm:^3.16.0, vscode-languageserver-types@npm:^3.17.0-next.3, vscode-languageserver-types@npm:^3.7.2":
version: 3.17.2
resolution: "vscode-languageserver-types@npm:3.17.2"
checksum: ef2d862d22f622b64de0f428773d50a5928ec6cdd485960a7564ebe4fd4a3c8bcd956f29eb15bc45a0f353846e62f39f6c764d2ab85ce774b8724411ba84342f
Expand All @@ -16970,13 +16963,6 @@ __metadata:
languageName: node
linkType: hard

"vscode-languageserver-types@npm:^3.13.0, vscode-languageserver-types@npm:^3.16.0, vscode-languageserver-types@npm:^3.17.0-next.3, vscode-languageserver-types@npm:^3.7.2":
version: 3.17.5
resolution: "vscode-languageserver-types@npm:3.17.5"
checksum: 79b420e7576398d396579ca3a461c9ed70e78db4403cd28bbdf4d3ed2b66a2b4114031172e51fad49f0baa60a2180132d7cb2ea35aa3157d7af3c325528210ac
languageName: node
linkType: hard

"vscode-languageserver@npm:8.0.0-next.8":
version: 8.0.0-next.8
resolution: "vscode-languageserver@npm:8.0.0-next.8"
Expand Down
Loading