Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add completion settings (Hinterland mode, documentation, suppression) #315

Merged
merged 133 commits into from
Aug 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
49bd4ee
Add completion settings (Hinterland mode, documentation, suppression)
krassowski Aug 11, 2020
128d275
Lint typescript changes
krassowski Aug 11, 2020
a6985c5
Add changelog entry
krassowski Aug 11, 2020
01c9f56
Add settings descriptions (though they do not show up yet)
krassowski Aug 12, 2020
1b66629
Lint plugin
krassowski Aug 12, 2020
6ccd932
Initial work for feature system refactor
krassowski Aug 13, 2020
c9fa9ca
Minor fixes
krassowski Aug 13, 2020
f829fcb
Lint
krassowski Aug 13, 2020
2fcb08d
Refactor completer and signature features
krassowski Aug 13, 2020
0eddcee
Refactor highlights, rename and hover
krassowski Aug 13, 2020
45dc5b1
Refactor diagnostics, split commands into respective files
krassowski Aug 13, 2020
170c573
Fix minor typos and spec files
krassowski Aug 13, 2020
267e615
Fix schema files
krassowski Aug 14, 2020
b700cf2
Implement adapterDisposed and make PLUGIN_ID discoverable
krassowski Aug 14, 2020
05fbf60
Fix autostart, settings, registration & commands
krassowski Aug 14, 2020
7e02a15
Finish notebook completion, clean up document bits
krassowski Aug 14, 2020
6a159ca
Lint everything
krassowski Aug 14, 2020
4d4ccbe
Implement diagnostics message filtering
krassowski Aug 14, 2020
778f9bf
Add feature icons, rename settings
krassowski Aug 14, 2020
114f3c2
Groundwork for token-based adapters (refactor extension and command m…
krassowski Aug 15, 2020
d62ce1f
Split adapters registration into separate plugins
krassowski Aug 15, 2020
ebe1eb4
Remove hard-coded entry-point definitions
krassowski Aug 15, 2020
6f0780b
Split adapters and adapter manager off index, move files around
krassowski Aug 15, 2020
0ae9120
VirtualEditor cleanup: (1) move document creation to adapter (it know…
krassowski Aug 16, 2020
7c476aa
Separate the responsibilities of VirtualEditor & WidgetAdapter,
krassowski Aug 18, 2020
3eb9c4e
Cleanup index.ts
krassowski Aug 18, 2020
c1ebf10
Solve some refactor issues
krassowski Aug 18, 2020
eb50752
Rename the CodeMirror implementation
krassowski Aug 19, 2020
e7c4015
Minor cleanup after renames/refactor fixes
krassowski Aug 19, 2020
49209e7
Refactor some of the tests to adapt to the architectural changes
krassowski Aug 19, 2020
01d99a0
Introduce extension interface, fix a few jest tests
krassowski Aug 19, 2020
25e806f
Restore more jest tests to working condition
krassowski Aug 19, 2020
f269e26
Implement settings mocks for tests
krassowski Aug 19, 2020
efb7e22
Finish fixing jest tests, fix diagnostics message filter
krassowski Aug 19, 2020
032b81d
Add tests for diagnostics filtering settings
krassowski Aug 19, 2020
08618d2
Lint everything
krassowski Aug 19, 2020
54b21fe
Remove CM import in VirtualEditor, correct FileEditor plugin id
krassowski Aug 19, 2020
110c1c5
Fix extension activation, add missing signal
krassowski Aug 19, 2020
75111cf
Register the extension with the adapter manager
krassowski Aug 19, 2020
f6a1533
Connect the feature manager with the adapter manager to restore commands
krassowski Aug 19, 2020
f8c11a8
Polish document updates, command connection and completer connections
krassowski Aug 20, 2020
4421ce7
Lint and improve out-of-range diagnostics guard
krassowski Aug 20, 2020
4e5b2ad
Solve the root cause of #310
krassowski Aug 20, 2020
5e80e49
Port the collapse/expand (caret) and doc icons
krassowski Aug 20, 2020
42b5474
Refactor diagnostics to follow widget adapter-virtual editor responsi…
krassowski Aug 20, 2020
bacc006
Use DocumentLocator in status popover rather than the document id.
krassowski Aug 20, 2020
4537855
Add icon to the feature command interface
krassowski Aug 20, 2020
00448d0
Improve handling of jump targets
krassowski Aug 20, 2020
8798f2d
Fix status message implementation
krassowski Aug 20, 2020
0934d06
Fix rename status handling, only rename if confirmed, improve messages
krassowski Aug 20, 2020
a0bbe11
Make the timer private
krassowski Aug 20, 2020
9caecd8
Remove "additionalProperties:false" following the https://github.com/…
krassowski Aug 20, 2020
15f14fb
Improve rename tests and messages
krassowski Aug 20, 2020
56919c5
Change rename icon, improve command ranks
krassowski Aug 20, 2020
9da6fed
Add highlight icons
krassowski Aug 20, 2020
9f7a3bc
Improve colors of the status icon
krassowski Aug 20, 2020
55a662b
Create directories for diagnostics and completions
krassowski Aug 20, 2020
47cc6fb
Create IFeatureEditorIntegration, document feature-related interfaces
krassowski Aug 20, 2020
4758719
Document the added extension points, update roadmap
krassowski Aug 20, 2020
0ddf1f3
Fix notebooks with markdown/raw cells (filter before mapping)
krassowski Aug 20, 2020
ec38679
Add CHANGELOG entry
krassowski Aug 20, 2020
a06adc4
Simplify and document IVirtualEditor
krassowski Aug 20, 2020
d0aaa0d
Add a note on API being subject to change
krassowski Aug 20, 2020
7136e10
Document IVirtualEditorType
krassowski Aug 20, 2020
1d240ea
Update the icon and title in the jump schema
krassowski Aug 20, 2020
61f69be
Run Azure Pipelines on all PRs
krassowski Aug 21, 2020
5a01ef9
Use escaped wildcard to build CI on all PRs
krassowski Aug 21, 2020
70352bb
Fix jumping in files (correctly infer the current widget id)
krassowski Aug 21, 2020
53c868f
Restore after change to prevent errors, handle the failures
krassowski Aug 21, 2020
ca4e4b3
Fix the language for JavaScript extractor
krassowski Aug 21, 2020
62cc728
Remove CodeMirror import in Virtual document, expose the foreign docu…
krassowski Aug 21, 2020
e2f4895
Try to freeze tectonic
krassowski Aug 21, 2020
b1bbe85
Comment on the pin
krassowski Aug 21, 2020
4b1c47a
Merge pull request #320 from krassowski/tex-ci-experiments
krassowski Aug 22, 2020
d7d555e
Improve syntax highlighting in editors covered by foreign extractors
krassowski Aug 21, 2020
a87bd4d
Fix syntax highlighting settings
krassowski Aug 21, 2020
07a3bf9
Improve the syntax highlight icons composition
krassowski Aug 21, 2020
196242f
Clean up and add changelog entry
krassowski Aug 22, 2020
ea45f0f
Add ILSPCodeExtractorsManager token
krassowski Aug 21, 2020
b447d93
Implement completion icons support
krassowski Aug 22, 2020
78274c9
Lint and clean up
krassowski Aug 22, 2020
c692086
Add icons cache to prevent re-defining lab icons
krassowski Aug 22, 2020
af3dfd2
Attempt to add material icons
krassowski Aug 22, 2020
dd0ea83
Add icon theme id, improve contrast for active items
krassowski Aug 24, 2020
1cb59e3
Implement theme display, improve themes
krassowski Aug 24, 2020
c23266f
Equate icons margin to list padding in the themes dialog
krassowski Aug 24, 2020
090abfb
Split themes into manager package and theme packages
krassowski Aug 25, 2020
85d3db6
Commit updated package.json and yarn.lock
krassowski Aug 26, 2020
666107c
Remove jp-icon-selectable from material icons
krassowski Aug 26, 2020
012b7d2
Use a superposition of alpha-t and code-tags for the TypeParameter icon
krassowski Aug 26, 2020
549c20a
Improve styling in about dialog
krassowski Aug 26, 2020
6a18738
Further improvements to the TypeParameter icon
krassowski Aug 26, 2020
b817a1c
Enforce 16x16 size for all vscode icons (some are 24x24)
krassowski Aug 26, 2020
ed417f5
Hide the text with transparent color, not hidden...
krassowski Aug 26, 2020
2701904
Add completer themes acceptance tests
krassowski Aug 26, 2020
12c1cd6
Lint
krassowski Aug 26, 2020
0064113
Add documentation on adding completer icon themes
krassowski Aug 26, 2020
67b1cc2
Try to use the most recent build of tectonic again
krassowski Aug 26, 2020
edc6e3c
Add new packages to linked packages for CI
krassowski Aug 26, 2020
f989a2b
Add Changelog entry for the icons
krassowski Aug 26, 2020
56d6b05
Try to make dark theme completer test more reliable
krassowski Aug 27, 2020
9aa8f76
Fix the link in the changelog
krassowski Aug 27, 2020
fb90252
Test the completer in FileEditor (& fix related setup issue)
krassowski Aug 27, 2020
f0b1ced
Add a test for syntax highlighting
krassowski Aug 27, 2020
eb85f38
Address review comments
krassowski Aug 28, 2020
83075bb
Rename icons_manager in one last place
krassowski Aug 28, 2020
a60ee5b
Don't show scrollbars when not needed for the completion item documen…
krassowski Aug 28, 2020
ded7c46
Extractors: split defaults, implement ipython-sql, fix html --isolated
krassowski Aug 28, 2020
b849b64
Add ILSPCodeOverridesManager, move implementations to transclusions/
krassowski Aug 29, 2020
b9799e6
Merge pull request #322 from krassowski/completer-icons
krassowski Aug 30, 2020
dfc65f7
Merge branch 'master' into features-refactor
krassowski Aug 30, 2020
3e1afc8
Retry tectonic cache warm up on failures
krassowski Aug 30, 2020
807aae3
Fix race in VirtualDocument.dispose() / async update_documents()
krassowski Aug 30, 2020
b4e91cb
Fix statusbar message pooling data from all editors
krassowski Aug 30, 2020
4236a1c
Update changelog
krassowski Aug 30, 2020
f2ee5eb
Merge branch 'features-refactor' into syntax_higlighting
krassowski Aug 30, 2020
b8f0cc6
Lint cache
krassowski Aug 30, 2020
b9b97b1
Merge pull request #319 from krassowski/syntax_higlighting
krassowski Aug 30, 2020
f3c73ca
Merge branch 'features-refactor' into fix-statusbar-status
krassowski Aug 30, 2020
19123a1
Fix document test file after merge conflict
krassowski Aug 30, 2020
e6e76f9
Merge branch 'features-refactor' into fix-statusbar-status
krassowski Aug 30, 2020
86e696e
Merge branch 'features-refactor' into transclusion-refactor
krassowski Aug 30, 2020
d69b102
Add example.plain file
krassowski Aug 30, 2020
01ea6a9
Merge pull request #329 from krassowski/fix-statusbar-status
krassowski Aug 31, 2020
e6e8c07
Export CODE_OVERRIDES_MANAGER with other plugins
krassowski Aug 31, 2020
a852e87
Merge branch 'features-refactor' into transclusion-refactor
krassowski Aug 31, 2020
8c380f6
Document preferred language ids and register() methods
krassowski Aug 31, 2020
6559be9
Document code replacements and code extractors
krassowski Aug 31, 2020
dbdf2aa
Fix typos in Extending docs
krassowski Aug 31, 2020
c4257b5
Merge pull request #321 from krassowski/transclusion-refactor
krassowski Aug 31, 2020
2b2c115
Merge branch 'features-refactor' into test-new-tectonic-build
krassowski Aug 31, 2020
fab0feb
Merge pull request #323 from krassowski/test-new-tectonic-build
krassowski Aug 31, 2020
d400629
Merge pull request #318 from krassowski/features-refactor
krassowski Aug 31, 2020
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
30 changes: 29 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,47 @@

[#328]: https://github.com/krassowski/jupyterlab-lsp/pull/328

### `@krassowski/jupyterlab-lsp 1.2.0` (unreleased)
### `@krassowski/jupyterlab-lsp 2.0.0` (unreleased)

- features

- support for JupyterLab 2.2 ([#301][])
- completer now displays server-provided documentation,
and a kernel icon for kernel suggestions without type information ([#301][])
- add two icons themes for the completer (material and vscode) ([#322])
- the documentation by the completer can be turned on or off ([#315])
- continuous hinting (Hinterland mode) can be enabled in settings ([#315])
- tokens in which the completer should not be triggered can be changed ([#315])
- configuration for the following features is now exposed in the settings editor ([#318]):
- diagnostics (display, filtering)
- hover (modifier key)
- rename operation status reporting got improved ([#318])
- replaced the generic status icons with code check icon (coloured differently according to the status) ([#318])
- added icons for all the features and their commands ([#318])
- refactored the codebase with a new architecture which allows dynamic feature, document widget adapter, and code editor registration ([#318])
- the document in the connections list in the statusbar popover are now represented by easy-to-understand DocumentLocator (breadcrumbs) widget rather than an internal id ([bacc006])
- syntax highlighting mode is adjusted to the language with the majority of the code in an editor ([#319])

- bug fixes

- path-autocompletion issues were resolved upstream an this release adopts these changes
- missing caret and document connection icons were restored in the statusbar popover ([#318])
- pressing "Cancel" rename during rename now correctly aborts the rename operation ([#318])
- when a language server for a foreign document is not available an explanation is displayed (rather than the "Connecting..." status as before) ([4e5b2ad])
- when jump target is not found a message is now shown instead of raising an exception ([00448d0])
- fixed status message expiration and replacement ([8798f2d]), ([#329])
- fixed some context command rank issues introduced after an attempt of migration to nulls ([#318])

[#301]: https://github.com/krassowski/jupyterlab-lsp/pull/301
[#315]: https://github.com/krassowski/jupyterlab-lsp/pull/315
[#318]: https://github.com/krassowski/jupyterlab-lsp/pull/318
[#319]: https://github.com/krassowski/jupyterlab-lsp/pull/319
[#322]: https://github.com/krassowski/jupyterlab-lsp/pull/322
[#329]: https://github.com/krassowski/jupyterlab-lsp/pull/329
[00448d0]: https://github.com/krassowski/jupyterlab-lsp/pull/318/commits/00448d0c55e7f9a1e7e0a5322f17610daac47dfe
[bacc006]: https://github.com/krassowski/jupyterlab-lsp/pull/318/commits/bacc0066da0727ff7397574914bf0401e4d8f7cb
[4e5b2ad]: https://github.com/krassowski/jupyterlab-lsp/pull/318/commits/4e5b2adf655120458cc8be4b453fe9a78c98e061
[8798f2d]: https://github.com/krassowski/jupyterlab-lsp/pull/318/commits/8798f2dcfd28da10a2b8d8f648974111caa52307

### `@krassowski/jupyterlab-lsp 1.1.2` (2020-08-05)

Expand Down
17 changes: 17 additions & 0 deletions atest/04_Interface/Statusbar.robot
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,20 @@ Statusbar Popup Opens
Element Should Contain ${POPOVER} python
Element Should Contain ${POPOVER} initialized
[Teardown] Clean Up After Working With File Python.ipynb

Status Changes Correctly Between Editors
Prepare File for Editing Python status example.py
Wait Until Fully Initialized
Open File example.plain
Wait Until Element Contains ${STATUSBAR} Initialized (additional servers needed) timeout=60s
Capture Page Screenshot 01-both-open.png
Switch To Tab example.py
Wait Until Fully Initialized
Switch To Tab example.plain
Wait Until Element Contains ${STATUSBAR} Initialized (additional servers needed) timeout=60s
[Teardown] Clean Up After Working With File example.plain

*** Keywords ***
Switch To Tab
[Arguments] ${file}
Click Element ${JLAB XP DOCK TAB}\[contains(., '${file}')]
67 changes: 67 additions & 0 deletions atest/05_Features/Completion.robot
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ Works When Kernel Is Shut Down
# this comes from kernel:
Completer Should Not Suggest %%timeit

Works In File Editor
Prepare File for Editing Python completion completion.py
Place Cursor In File Editor At 9 2
Capture Page Screenshot 01-editor-ready.png
Trigger Completer
Completer Should Suggest add
[Teardown] Clean Up After Working With File completion.py

Autocompletes If Only One Option
Enter Cell Editor 3 line=1
Press Keys None cle
Expand Down Expand Up @@ -113,6 +121,61 @@ Triggers Completer On Dot
Wait Until Page Contains Element ${COMPLETER_BOX} timeout=35s
Completer Should Suggest append

Material Theme Works
Configure JupyterLab Plugin {"theme": "material"} plugin id=${COMPLETION PLUGIN ID}
Capture Page Screenshot 01-configured.png
Enter Cell Editor 1 line=2
Trigger Completer
Capture Page Screenshot 02-completions-shown.png
# TabError is a builtin exception which is a class in Python,
# so we should get lsp:material-class-light icon:
Completer Should Suggest TabError
Completer Should Include Icon lsp:material-class-light

VSCode Theme Works
Configure JupyterLab Plugin {"theme": "vscode"} plugin id=${COMPLETION PLUGIN ID}
Capture Page Screenshot 01-configured.png
Enter Cell Editor 1 line=2
Trigger Completer
Capture Page Screenshot 02-completions-shown.png
Completer Should Suggest TabError
Completer Should Include Icon lsp:vscode-class-light

VSCode Dark Theme Works
${file} = Set Variable Completion.ipynb
Lab Command Use JupyterLab Dark Theme
Wait For Splash
Capture Page Screenshot 00-theme-changed.png
Configure JupyterLab Plugin {"theme": "vscode"} plugin id=${COMPLETION PLUGIN ID}
Capture Page Screenshot 01-configured.png
Open ${file} in ${MENU NOTEBOOK}
Enter Cell Editor 1 line=2
Wait Until Fully Initialized
Trigger Completer
Capture Page Screenshot 02-completions-shown.png
Completer Should Suggest TabError
Completer Should Include Icon lsp:vscode-class-dark
Lab Command Use JupyterLab Light Theme
Wait For Splash

Works Without A Theme
Configure JupyterLab Plugin {"theme": null} plugin id=${COMPLETION PLUGIN ID}
Capture Page Screenshot 01-configured.png
Enter Cell Editor 1 line=2
Trigger Completer
Capture Page Screenshot 02-completions-shown.png
Completer Should Suggest TabError
Wait Until Page Contains Element ${COMPLETER_BOX} .jp-Completer-monogram

Works With Incorrect Theme
Configure JupyterLab Plugin {"theme": "a-non-existing-theme"} plugin id=${COMPLETION PLUGIN ID}
Capture Page Screenshot 01-configured.png
Enter Cell Editor 1 line=2
Trigger Completer
Capture Page Screenshot 02-completions-shown.png
Completer Should Suggest TabError
Wait Until Page Contains Element ${COMPLETER_BOX} .jp-Completer-monogram

*** Keywords ***
Setup Completion Test
Setup Notebook Python Completion.ipynb
Expand All @@ -139,6 +202,10 @@ Completer Should Suggest
Wait Until Page Contains Element ${COMPLETER_BOX} .jp-Completer-item[data-value="${text}"]
Capture Page Screenshot ${text.replace(' ', '_')}.png

Completer Should Include Icon
[Arguments] ${icon}
Wait Until Page Contains Element ${COMPLETER_BOX} svg[data-icon="${icon}"]

Completer Should Not Suggest
[Arguments] ${text}
Wait Until Page Does Not Contain Element ${COMPLETER_BOX} .jp-Completer-item[data-value="${text}"]
Expand Down
36 changes: 36 additions & 0 deletions atest/05_Features/Syntax_highlighting.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
*** Settings ***
Suite Setup Setup Suite For Screenshots syntax_highlighting
Test Setup Setup Highlighting Test
Test Teardown Clean Up After Working With File Syntax highlighting.ipynb
Force Tags feature:syntax_highlighting
Resource ../Keywords.robot

*** Test Cases ***
Syntax Highlighting Mode Stays Normal In Normal Cells
${mode} = Get Mode Of A Cell 1
should be equal ${mode['name']} ipython

Syntax Highlighting Mode Changes In Cells Dominated By Foreign Documents
${mode} = Get Mode Of A Cell 2
should be equal ${mode['name']} markdown
${mode} = Get Mode Of A Cell 3
should be equal ${mode['name']} xml
${mode} = Get Mode Of A Cell 4
should be equal ${mode['name']} javascript

Highlighing Mode Works For Multiple Documents
${mode} = Get Mode Of A Cell 4
should be equal ${mode['name']} javascript
${mode} = Get Mode Of A Cell 6
should be equal ${mode['name']} javascript

*** Keywords ***
Get Mode Of A Cell
[Arguments] ${cell_nr}
Click Element css:.jp-Cell:nth-child(${cell_nr})
Wait Until Page Contains Element css:.jp-Cell:nth-child(${cell_nr}) .CodeMirror-focused
${mode} = Execute JavaScript return document.querySelector('.jp-Cell:nth-child(${cell_nr}) .CodeMirror').CodeMirror.getMode()
[Return] ${mode}

Setup Highlighting Test
Setup Notebook Python Syntax highlighting.ipynb
15 changes: 14 additions & 1 deletion atest/Keywords.robot
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,15 @@ Place Cursor In Cell Editor At
Enter Cell Editor ${cell_nr} ${line}
Execute JavaScript return document.querySelector('.jp-Cell:nth-child(${cell_nr}) .CodeMirror').CodeMirror.setCursor({line: ${line} - 1, ch: ${character}})

Enter File Editor
Click Element css:.jp-FileEditor .CodeMirror
Wait Until Page Contains Element css:.jp-FileEditor .CodeMirror-focused

Place Cursor In File Editor At
[Arguments] ${line} ${character}
Enter File Editor
Execute JavaScript return document.querySelector('.jp-FileEditor .CodeMirror').CodeMirror.setCursor({line: ${line} - 1, ch: ${character}})

Wait Until Fully Initialized
Wait Until Element Contains ${STATUSBAR} Fully initialized timeout=60s

Expand All @@ -276,8 +285,12 @@ Prepare File for Editing
[Arguments] ${Language} ${Screenshots} ${file}
Set Tags language:${Language.lower()}
Set Screenshot Directory ${OUTPUT DIR}${/}screenshots${/}${Screenshots}${/}${Language.lower()}
Copy File examples${/}${file} ${OUTPUT DIR}${/}home${/}${file}
Try to Close All Tabs
Open File ${file}

Open File
[Arguments] ${file}
Copy File examples${/}${file} ${OUTPUT DIR}${/}home${/}${file}
Open ${file} in ${MENU EDITOR}
Capture Page Screenshot 00-opened.png

Expand Down
1 change: 1 addition & 0 deletions atest/Variables.robot
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ ${CM CURSOR} css:.CodeMirror-cursor
${CM CURSORS} css:.CodeMirror-cursors:not([style='visibility: hidden'])
# settings
${LSP PLUGIN ID} @krassowski/jupyterlab-lsp:plugin
${COMPLETION PLUGIN ID} @krassowski/jupyterlab-lsp:completion
${LSP PLUGIN SETTINGS FILE} @krassowski${/}jupyterlab-lsp${/}plugin.jupyterlab-settings
${CSS USER SETTINGS} .jp-SettingsRawEditor-user
${JLAB XP CLOSE SETTINGS} ${JLAB XP DOCK TAB}\[contains(., 'Settings')]/*[contains(@class, 'm-TabBar-tabCloseIcon')]
Expand Down
108 changes: 108 additions & 0 deletions atest/examples/Syntax highlighting.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"variable = 1\n",
"\n",
"def function():\n",
" return\n",
"\n",
"# note print is highlighted in Python but function is not\n",
"print(variable, function)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%%markdown\n",
"# header\n",
"**bold**, *italic*\n",
"\n",
"### Heading with wrong level"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%%html\n",
"<html style=\"color: green\">\n",
" <!-- this is a comment -->\n",
" <head>\n",
" <title>HTML Example</title>\n",
" </head>\n",
" <body>\n",
" The indentation tries to be <em>somewhat &quot;do what\n",
" I mean&quot;</em>... but might not match your style.\n",
" </body>\n",
"</html>"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%%javascript\n",
"// \"print\" is NOT highlighted in javascript, while \"function\" is\n",
"function add_together(a, b) {\n",
" return a + b\n",
"}\n",
"\n",
"print('A')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"It should work for the same language of virtual document with multiple occurrences:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%%javascript \n",
"function add_together(a, b) {\n",
" return a + b\n",
"}\n",
"\n",
"print('A')"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.5"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
9 changes: 9 additions & 0 deletions atest/examples/completion.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
addition = ''


def add(a: int, b: int):
"""Adds a and b together"""
return a, b


ad
2 changes: 2 additions & 0 deletions atest/examples/example.plain
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
There is nothing interesting in here.
It is here just to test how the extension works with files for which there is no associated language support.
7 changes: 6 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ trigger:
- refs/tags/v*

pr:
- master
branches:
include:
- '*'

variables:
PYTHONUNBUFFERED: 1
Expand All @@ -23,6 +25,9 @@ variables:
LINKED_EXTENSIONS: >-
packages/lsp-ws-connection
packages/jupyterlab-go-to-definition
packages/completion-theme
packages/theme-vscode
packages/theme-material
jobs:
- template: ci/job.lint.yml
Expand Down
4 changes: 2 additions & 2 deletions docs/Configuring.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Configuring"
"## Configuring backend"
]
},
{
Expand Down Expand Up @@ -206,7 +206,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
"version": "3.7.5"
}
},
"nbformat": 4,
Expand Down
Loading