summaryrefslogtreecommitdiff
path: root/modules/prog-python.el
diff options
context:
space:
mode:
Diffstat (limited to 'modules/prog-python.el')
-rw-r--r--modules/prog-python.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/prog-python.el b/modules/prog-python.el
index a4c662e4..5f9a4175 100644
--- a/modules/prog-python.el
+++ b/modules/prog-python.el
@@ -21,6 +21,8 @@
(defvar python-ts-mode-map)
+(require 'system-lib) ; for cj/executable-find-or-warn
+
;; Forward declarations for LSP
(declare-function lsp-deferred "lsp-mode")
@@ -38,6 +40,10 @@ Install with: pip install pyright")
"Path to mypy static type checker.
Install with: pip install mypy")
+;; Warn at load time if pyright is missing rather than waiting for the
+;; first LSP attach to fail with a confusing connection error.
+(cj/executable-find-or-warn pyright-path "pyright LSP" 'prog-python)
+
;; -------------------------------- Python Setup -------------------------------
;; preferences for Python programming