Skip to content

Commit

Permalink
Add sql-language-server config for LanguageServerManager (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
kumarnzt authored Apr 1, 2024
1 parent 58e9920 commit e5b0c93
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions template/v1/dirs/etc/jupyter/jupyter_server_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,16 @@
# Enable `allow_hidden` by default, so hidden files are accessible via Jupyter server
# Related documentation: https://jupyterlab.readthedocs.io/en/stable/user/files.html#displaying-hidden-files
c.ContentsManager.allow_hidden = True

# This will set the LanguageServerManager.extra_node_roots setting if amazon_sagemaker_sql_editor exists in the
# environment. Ignore otherwise, don't fail the JL server start
# Related documentation: https://jupyterlab-lsp.readthedocs.io/en/v3.4.0/Configuring.html
try:
import os
module = __import__("amazon_sagemaker_sql_editor")
module_location = os.path.dirname(module.__file__)
c.LanguageServerManager.extra_node_roots = [
f'{module_location}/sql-language-server'
]
except:
pass

0 comments on commit e5b0c93

Please sign in to comment.