Tweak `eglot' related comments

This commit is contained in:
Gerard Vermeulen 2024-09-23 10:06:34 +02:00
parent 4e6598dc8e
commit eeedd42d48

View File

@ -3746,6 +3746,10 @@ listings set up [[https://github.com/joaotavora/eglot][Eglot]]:
(keymap-set eglot-mode-map "C-c n" 'flymake-goto-next-error) (keymap-set eglot-mode-map "C-c n" 'flymake-goto-next-error)
(keymap-set eglot-mode-map "C-c p" 'flymake-goto-prev-error) (keymap-set eglot-mode-map "C-c p" 'flymake-goto-prev-error)
(keymap-set eglot-mode-map "C-c r" 'eglot-rename)) (keymap-set eglot-mode-map "C-c r" 'eglot-rename))
;; Does not make me happy:
;; (require 'eglot)
;; (add-hook 'python-mode-hook #'eglot-ensure)
#+end_src #+end_src
#+caption: Setup ~oglot~ for ~python-mode~. #+caption: Setup ~oglot~ for ~python-mode~.
@ -4888,11 +4892,12 @@ representation of src_emacs-lisp[:results none]{(describe-variable
#+caption: projects tangling Python files to launch =eglot= automatically. #+caption: projects tangling Python files to launch =eglot= automatically.
#+name: lst:eglot-directory-variables-for-python #+name: lst:eglot-directory-variables-for-python
#+begin_src emacs-lisp -n :eval never :tangle dir-locals.el #+begin_src emacs-lisp -n :eval never :tangle dir-locals.el
;; A .dir-locals.el file proposal in the root of any ;; A .dir-locals.el file proposal in the root of any Python project
;; Python project or Org-mode project tangling Python files ;; (fails) or Org-mode project tangling Python files (works) to launch
;; to launch eglot automatically. ;; eglot automatically.
;; Ensure to enable the pylsp_ruff plugin.
;; Ensure to uninstall the flake8, mccabe, and pycodestyle Python packages. ;; Ensure to enable the pylsp_ruff plugin and to uninstall the flake8,
;; mccabe, and pycodestyle Python packages.
((nil ;; nil, since Emacs filters out irrelevant mode names. ((nil ;; nil, since Emacs filters out irrelevant mode names.
. ((eglot-workspace-configuration . ((eglot-workspace-configuration
. (:pylsp (:plugins . (:pylsp (:plugins