Skip to content

Commit

Permalink
Guide to opt-in to Notebook support in native server (#547)
Browse files Browse the repository at this point in the history
## Summary

This PR adds a new section in the README to guide users to opt-in for
Jupyter Notebook support for the native server. This is required
because, unlike `ruff-lsp`, the native server looks at the `include` /
`extend-include` setting.

Refer #546
  • Loading branch information
dhruvmanila authored Jul 22, 2024
1 parent a5ab3c0 commit 7896831
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,20 @@ code actions, and formatting.

This requires Ruff version `v0.1.3` or later.

### Native Server

The native server supports Jupyter Notebooks out of the box. Unlike `ruff-lsp`, the native server requires
the user to explicitly include Jupyter Notebooks in the set of files to lint and format. This can be done by
updating the [`extend-include`](https://docs.astral.sh/ruff/settings/#extend-include) setting in the Ruff configuration file.

```toml
[tool.ruff]
extend-include = ["*.ipynb"]
```

Refer to the [Jupyter Notebook discovery](https://docs.astral.sh/ruff/configuration/#jupyter-notebook-discovery) section
of the Ruff documentation for more information.

[notebook document synchronization]: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#notebookDocument_synchronization

## Untrusted Workspace
Expand Down

0 comments on commit 7896831

Please sign in to comment.