From 4eeea363a133e0e7ed7c02a5e2f1f7b63a78c3f4 Mon Sep 17 00:00:00 2001 From: Whiskeybear <39905290+christophermadsen@users.noreply.github.com> Date: Wed, 27 Nov 2024 15:34:47 +0100 Subject: [PATCH] Update README.md Add help for adding languages to lazy-ruff-org-src-languages --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 1581aac..361872c 100644 --- a/README.md +++ b/README.md @@ -210,3 +210,16 @@ We can also add these changes immediately when calling `use-package` with the (setq lazy-ruff-only-format-region t) ;; Don't lint in marked regions (setq lazy-ruff-only-format-buffer t)) ;; Don't lint in Python major mode buffers ``` + +### Multiple Python 'languages' in Org Source Blocks + +By default lazy-ruff only checks for the "python" language in org src blocks, but you may want to include other python types, e.g. jupyter-python, to be considered for formatting/linting. You can do this by adding the desired language to the `lazy-ruff-org-src-languages` list of languages. Here are some examples with "jupyter-python": +``` emacs-lisp +(add-to-list 'lazy-ruff-org-src-languages "jupyter-python") +``` +Or you may want to add it directly during the use-package call. +``` emacs-lisp +(use-package lazy-ruff + :config + (add-to-list 'lazy-ruff-org-src-languages "jupyter-python")) +```