With this week's launch of JupyterLab v3 for SageMaker studio (🥳), and as detailed with screenshots on the accompanying blog post (👏), users are now able to enjoy advanced IDE code assistance tools like autocomplete, hover tips and so on - via the jupyterlab-lsp extension.
There's a snippet in the blog showing how to set this up via Studio lifecycle configurations, but:
The environments (conda setup and helpers like restart-jupyter-server) seem quite different between JLv1 and JLv3 apps, and domains can have both versions active... So it seems useful to have a version of the script that runs without error whichever version a user starts (but skips LSP setup on v1).
There are other closely related LSP tweaks and tool setups users could be interested in that we may be able to demonstrate: like installing non-Python language servers and setting tool configurations.
This repo gives space to extend a bit more over the initial intro covered in the blog, and ability for users to raise issues & improve the example setup.
Therefore proposing to add a sample to this repo covering the theme of LSP-based coding assistance tool installation and setup.
Testing done:
The current draft script sets up LSP with Python and Bash support, configures continuous hinting to give a more IDE-like behaviour, and increases the default max-line-width of the pycodestyle linter.
Tested on a new domain in us-east-1 that the features get set up correctly when a JLabv3 server is launched, and skipped with an info message in CloudWatch when a JLabv1 server is launched.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Issue #, if available: N/A
Description of changes:
With this week's launch of JupyterLab v3 for SageMaker studio (🥳), and as detailed with screenshots on the accompanying blog post (👏), users are now able to enjoy advanced IDE code assistance tools like autocomplete, hover tips and so on - via the jupyterlab-lsp extension.
There's a snippet in the blog showing how to set this up via Studio lifecycle configurations, but:
restart-jupyter-server
) seem quite different between JLv1 and JLv3 apps, and domains can have both versions active... So it seems useful to have a version of the script that runs without error whichever version a user starts (but skips LSP setup on v1).Therefore proposing to add a sample to this repo covering the theme of LSP-based coding assistance tool installation and setup.
Testing done:
The current draft script sets up LSP with Python and Bash support, configures continuous hinting to give a more IDE-like behaviour, and increases the default max-line-width of the pycodestyle linter.
Tested on a new domain in us-east-1 that the features get set up correctly when a JLabv3 server is launched, and skipped with an info message in CloudWatch when a JLabv1 server is launched.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.