From e971bfc915fa4694fca237f3e67f11516966d2f0 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sat, 13 Mar 2021 09:48:24 +0100 Subject: [PATCH] Try out eglot for python mode Inspired by [zamansky](https://cestlaz.github.io/post/using-emacs-74-eglot/). There were some problems with the builtin version of `project`, I had to delete the `elpa-ess` Debian package, because it was pulling in the builtin version of `project` before `package.el` could set up the proper paths. I need to investigate how to avoid this behavior in general. --- init.el | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/init.el b/init.el index 0603856..9d3e996 100644 --- a/init.el +++ b/init.el @@ -1469,6 +1469,10 @@ :commands (global-flycheck-mode flycheck-mode) :init (setq flycheck-emacs-lisp-load-path 'inherit)) +(use-package eglot + :ensure t + :commands (eglot-ensure)) + ;; * Mail @@ -2834,29 +2838,6 @@ With given ARG, display files in `db/important-document-path’." (use-package helm-bibtex :commands (helm-bibtex)) - -;; * Python - -(use-package company-jedi - :ensure t) - -(use-package python - :init (setq python-indent-offset 2 - python-shell-interpreter "python3") - :config (progn - (add-hook 'python-mode-hook 'highlight-indentation-mode) - (add-hook 'python-mode-hook - #'(lambda () - (add-to-list 'company-backends 'company-jedi))) - (add-hook 'python-mode-hook #'flycheck-mode) - - (elpy-enable))) - -(use-package elpy - :ensure t - :commands (elpy-enable) - :config (setq elpy-modules (delq 'elpy-module-flymake elpy-modules))) - ;; * Various Mode Configurations @@ -2957,6 +2938,14 @@ With given ARG, display files in `db/important-document-path’." (use-package pdf-tools :commands (pdf-tools-install)) +(use-package python + :init (setq python-indent-offset 2 + python-shell-interpreter "python3") + :config (progn + (add-hook 'python-mode-hook #'highlight-indentation-mode) + (add-hook 'python-mode-hook #'company-mode) + (add-hook 'python-mode-hook #'eglot-ensure))) + (use-package shr :init (setq shr-use-fonts nil shr-use-colors nil