Add support for ruff extension
option to enable jupyterlab-lsp
#59
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
EDIT: Following the comment below #59 (comment), removed the option for the
--extension ipynb:python
flag and enabled it in all cases.Since ruff version 0.0.285, python-lsp-ruff no longer works with
jupyterlab-lsp
. I previously raised the issue on the ruff project here: astral-sh/ruff#6847. Another user had the same issue and raised it in the jupyterlab-lsp project here: jupyter-lsp/jupyterlab-lsp#1003.As of ruff version 0.1.5 there is a way to override this. Namely add
--extension ipynb:python
, to the CLI options which causes ruff to treat the content as python code.I am not familiar with the integrations other than jupyterlab-lsp, so I'm not certain whether adding this cli option to the ruff call will have unwanted effects on the other integrations, so please let me know if this is the wrong approach
Changes in this PR
--extension ipynb:python
to the call to ruffAddedextension
to configuration which allows mapping file extensions to languagesOther approaches
--extension
to the CLI callAdd--extension ipynb:python
regardless of configuration