From 0b89db44a737c0c079979391639c1e835e0f9a74 Mon Sep 17 00:00:00 2001 From: Vedang Manerikar <ved.manerikar@gmail.com> Date: Thu, 28 Nov 2024 14:17:18 +0530 Subject: [PATCH] Demand eglot so that we can hook into it for Python mode --- unravel-emacs.org | 4 ++++ unravel-modules/unravel-langs.el | 2 ++ 2 files changed, 6 insertions(+) diff --git a/unravel-emacs.org b/unravel-emacs.org index e2fd245..ce27877 100644 --- a/unravel-emacs.org +++ b/unravel-emacs.org @@ -4289,10 +4289,14 @@ automatically for every newly visited file, add a hook like this: I use ~eglot~ as the main LSP entry point, and as such, I have key-bindings for the common functionality implemented by ~eglot~. +Note that demanding ~eglot~ is not a mistake. I want it loaded so that I can advice functions for different programming langauges. For example, Python uses ~emacs-pet~ for tracking the environment of each project, and this needs to load after ~eglot~ so that it can advice the necessary functions. + #+begin_src emacs-lisp :tangle "unravel-modules/unravel-langs.el" ;;;; Eglot (built-in client for the language server protocol) (use-package eglot :ensure nil + :demand t ; Not a mistake, we need to load Eglot elisp code before + ; we open any Python file. :functions (eglot-ensure) :commands (eglot) :bind diff --git a/unravel-modules/unravel-langs.el b/unravel-modules/unravel-langs.el index 6476912..f22b5a1 100644 --- a/unravel-modules/unravel-langs.el +++ b/unravel-modules/unravel-langs.el @@ -28,6 +28,8 @@ ;;;; Eglot (built-in client for the language server protocol) (use-package eglot :ensure nil + :demand t ; Not a mistake, we need to load Eglot elisp code before + ; we open any Python file. :functions (eglot-ensure) :commands (eglot) :bind