aboutsummaryrefslogtreecommitdiffstats
path: root/emacs.el
diff options
context:
space:
mode:
authorVaino Kauppila <vaino@vke.fi>2026-09-10 14:58:07 +0300
committerVaino Kauppila <vaino@vke.fi>2026-09-10 14:58:07 +0300
commite459fea00e71717df0ece58989986c641c4a2ff2 (patch)
treeddc50b1daaf226f38df4ff9707fb3e94bc30ae79 /emacs.el
parente1b2af4e400ecae38fc8890879b91515ba3c2451 (diff)
downloademacs_setup-e459fea00e71717df0ece58989986c641c4a2ff2.tar.gz
emacs_setup-e459fea00e71717df0ece58989986c641c4a2ff2.zip
Python LSP via per-project micromamba envs; silence native-comp warnings
- Drop python-mode from the global eglot hook: mode hooks run before .dir-locals.el applies, so it would always grab the system pylsp. Python eglot now starts per-project from .dir-locals.el pointing at the project's micromamba env (interpreter, exec-path, pylsp). - templates/python-project-dir-locals.el: copy+edit recipe for new projects. vkeHF is already wired to env vkehf. - Suppress (native-compiler) warnings: go-mode and friends reference lsp/eglot functions they don't require; harmless noise. Verified in a GUI session: opening vkeHF/superhet.py connects eglot and spawns ~/.local/share/mamba/envs/vkehf/bin/pylsp.
Diffstat (limited to 'emacs.el')
-rw-r--r--emacs.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/emacs.el b/emacs.el
index 9cd984b..748f44c 100644
--- a/emacs.el
+++ b/emacs.el
@@ -262,8 +262,12 @@
;;; ============================================================================
(use-package eglot
+ ;; NOTE: python-mode is deliberately NOT hooked here. Mode hooks run
+ ;; before .dir-locals.el applies, so this would always connect to the
+ ;; system pylsp. Python eglot is started per-project from
+ ;; .dir-locals.el (micromamba envs) -- see emacs_setup README.
:hook (((clojure-mode clojurec-mode clojurescript-mode
- java-mode scala-mode python-mode) . eglot-ensure)
+ java-mode scala-mode) . eglot-ensure)
((cider-mode eglot-managed-mode) . eglot-disable-in-cider))
:preface
(defun eglot-disable-in-cider ()
@@ -639,6 +643,12 @@
(put 'upcase-region 'disabled nil)
+;; Packages like go-mode reference lsp-mode/eglot functions they don't
+;; require; native-comp warnings about those are harmless noise. Keep them
+;; out of *Warnings*. (Must come AFTER custom-set-variables above, which
+;; rewrites warning-suppress-types.)
+(add-to-list 'warning-suppress-types '(native-compiler))
+
;;; PSL tree-sitter mode
(add-to-list 'load-path "~/.emacs.d/psl-ts-mode")
(require 'psl-ts-mode)