Skip to content

Commit 2810db2

Browse files
committed
check chktex tech with robot, further clarify robot
1 parent 21ddb6c commit 2810db2

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
### `jupyter-lsp 0.9.x` (unreleased)
44

5-
- autodetects the `texlab` language server for LaTeX ([#288][])
6-
- diagnostics are provided by `chktex`, and must be configured separately
5+
- autodetects the `texlab` language server for `.tex` files ([#288][])
6+
- diagnostics _should_ be provided by `chktex` on save, but don't yet appear,
7+
but can be configured through the Advanced Settings Editor to appear on save or change
78

89
[#288]: https://github.com/krassowski/jupyterlab-lsp/issues/288
910

atest/07_Configuration.robot

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,37 +26,47 @@ Markdown
2626
... `Color` is misspelt
2727
... `Colour` is misspelt
2828

29+
LaTeX
30+
[Tags] FOO
31+
[Documentation] diagnostics only appear if configured
32+
Settings Should Change Editor Diagnostics LaTeX example.tex texlab
33+
... {"latex.lint.onChange": true}
34+
... ${EMPTY}
35+
... Command terminated with space. (chktex)
36+
... Save File
37+
2938
*** Keywords ***
3039
Clean Up After Working with File and Settings
3140
[Arguments] ${file}
3241
Clean Up After Working With File ${file}
3342
Reset Plugin Settings
3443

3544
Settings Should Change Editor Diagnostics
36-
[Arguments] ${language} ${file} ${server} ${settings} ${before} ${after}
45+
[Arguments] ${language} ${file} ${server} ${settings} ${before} ${after} ${save command}=${EMPTY}
3746
${before diagnostic} = Set Variable ${CSS DIAGNOSTIC}\[title^="${before}"]
3847
${after diagnostic} = Set Variable ${CSS DIAGNOSTIC}\[title^="${after}"]
3948
${tab} = Set Variable ${JLAB XP DOCK TAB}\[contains(., '${file}')]
4049
${close icon} = Set Variable *[contains(@class, 'm-TabBar-tabCloseIcon')]
50+
${save command} = Set Variable If "${save command}" ${save command} Save ${language} File
4151
Prepare File for Editing ${language} config ${file}
4252
Open in Advanced Settings ${LSP PLUGIN ID}
4353
Drag and Drop By Offset ${tab} 0 100
4454
Wait Until Fully Initialized
4555
Open Diagnostics Panel
4656
Drag and Drop By Offset ${JLAB XP DOCK TAB}\[contains(., 'Diagnostics Panel')] 600 -200
4757
Click Element ${JLAB XP DOCK TAB}\[contains(., 'Launcher')]/${close icon}
48-
Wait Until Page Contains Element ${before diagnostic} timeout=30s
58+
Run Keyword If "${before}" Wait Until Page Contains Element ${before diagnostic} timeout=30s
4959
Page Should Not Contain ${after diagnostic}
5060
Capture Page Screenshot 01-default-diagnostics-and-settings.png
5161
Set Editor Content {"language_servers": {"${server}": {"serverSettings": ${settings}}}} ${CSS USER SETTINGS}
5262
Wait Until Page Contains No errors found
53-
Capture Page Screenshot 01-default-diagnostics-and-settings.png
63+
Capture Page Screenshot 02-default-diagnostics-and-unsaved-settings.png
5464
Click Element css:button[title\='Save User Settings']
5565
Click Element ${JLAB XP DOCK TAB}\[contains(., 'Settings')]/${close icon}
5666
Drag and Drop By Offset ${tab} 0 100
57-
Lab Command Save ${language} File
67+
Lab Command ${save command}
5868
Ensure Sidebar Is Closed
59-
Capture Page Screenshot 02-settings-changed.png
69+
Capture Page Screenshot 03-settings-changed.png
6070
Wait Until Page Contains Element ${after diagnostic} timeout=30s
61-
Capture Page Screenshot 03-configured-diagnostic-found.png
71+
Capture Page Screenshot 04-configured-diagnostic-found.png
6272
[Teardown] Clean Up After Working with File and Settings ${file}

atest/examples/example.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
\begin{document}
44
\label{foo}
55
\ref{foo}
6+
\foo This is an error.
67
\end{document}
7-

0 commit comments

Comments
 (0)