Skip to content

Commit c0fee5d

Browse files
committed
restore bash-language-server highlighting default
1 parent de32569 commit c0fee5d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

atest/03_Notebook.robot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ Python
1414
Foreign Extractors
1515
${file} = Set Variable Foreign extractors.ipynb
1616
Configure JupyterLab Plugin
17-
... {"language_servers": {"texlab": {"serverSettings": {"latex.lint.onChange": true}}}}
17+
... {"language_servers": {"texlab": {"serverSettings": {"latex.lint.onChange": true}}, "bash-langauge-server": {"bashIde.highlightParsingErrors": true}}}
1818
Capture Page Screenshot 10-configured.png
1919
Reset Application State
2020
Setup Notebook Python ${file}
2121
@{diagnostics} = Create List
22-
... Failed to parse expression # bash
22+
... Failed to parse expression # bash, configured by spec.env
2323
... ame 'valid' # python, mypy and pyflakes will fight over `(N|n)ame 'valid'`, just hope for the best
2424
... Trailing whitespace is superfluous. # r
2525
... `frob` is misspelt # markdown

py_src/jupyter_lsp/specs/bash_language_server.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from .config import load_config_schema
22
from .utils import NodeModuleSpec
33

4+
import os
45

56
class BashLanguageServer(NodeModuleSpec):
67
node_module = key = "bash-language-server"
@@ -20,4 +21,8 @@ class BashLanguageServer(NodeModuleSpec):
2021
jlpm="jlpm add --dev {}".format(key),
2122
),
2223
config_schema=load_config_schema(key),
24+
# required as of bash-language-server 1.17.0, can't be configured. sigh.
25+
env=dict(
26+
HIGHLIGHT_PARSING_ERRORS=os.environ.get("HIGHLIGHT_PARSING_ERRORS", "true")
27+
)
2328
)

0 commit comments

Comments
 (0)