From 2bfa0c8be1dbb1c3234bb210fe0ff8cbb5b4dc94 Mon Sep 17 00:00:00 2001 From: Chris Rose Date: Tue, 3 Feb 2026 12:25:24 -0800 Subject: [PATCH] tweak(python): use toml mode for uv.lock files When +uv is set, find the right toml mode for the configuration and use that. --- modules/lang/python/config.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/lang/python/config.el b/modules/lang/python/config.el index 440127d19..26303e1cd 100644 --- a/modules/lang/python/config.el +++ b/modules/lang/python/config.el @@ -220,6 +220,13 @@ :when (modulep! +uv) :after python :config + ;; open uv.lock files in toml-mode + (add-to-list 'auto-mode-alist + (cons "/uv\\.lock\\'" + (if (and (modulep! :tools tree-sitter) + (fboundp 'toml-ts-mode)) + 'toml-ts-mode + 'conf-toml-mode))) ;; HACK: A faster (cached) version of the mode-line segment. See ;; `+python-uv-mode-set-auto-h'. (setq uv-mode-mode-line-format '(+python--uv-version ("UV:" +python--uv-version " ")))