]> xn--ix-yja.es Git - alex.git/commitdiff
Switch from elpy to eglot + basedpyright
authorAlex <alex.corcoles@veecle.io>
Tue, 29 Apr 2025 14:31:41 +0000 (16:31 +0200)
committeralexpdp7 <alex@corcoles.net>
Tue, 29 Apr 2025 14:34:49 +0000 (16:34 +0200)
emacs/emacs.el

index 59d18153f8a99163f518a93c0370c20dbca16767..a09582be4cd9b7c13f627a2f8a8f4f273933dd24 100644 (file)
 ;; Untar the archive and symlink the jdtls binary in ~/.local/bin
 (add-hook 'java-mode-hook 'eglot-ensure)
 
-;; Did not manage to make eglot work :(
-(use-package elpy
-  :ensure t
-  :init
-  (elpy-enable))
+;; pipx install basedpyright
+(add-hook 'python-mode-hook 'eglot-ensure)
+
+;; The default setting is higher than strict, and complains (amongst others) about missing type annotations
+(setq-default eglot-workspace-configuration
+              '(:basedpyright (:typeCheckingMode "strict")))
 
 ;; YAML support
 (use-package yaml-mode :ensure t)