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.
This commit is contained in:
Daniel - 2021-03-13 09:48:24 +01:00
parent 1788ceb0f4
commit e971bfc915
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 12 additions and 23 deletions

35
init.el
View File

@ -1469,6 +1469,10 @@
:commands (global-flycheck-mode flycheck-mode) :commands (global-flycheck-mode flycheck-mode)
:init (setq flycheck-emacs-lisp-load-path 'inherit)) :init (setq flycheck-emacs-lisp-load-path 'inherit))
(use-package eglot
:ensure t
:commands (eglot-ensure))
;; * Mail ;; * Mail
@ -2834,29 +2838,6 @@ With given ARG, display files in `db/important-document-path."
(use-package helm-bibtex (use-package helm-bibtex
:commands (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 ;; * Various Mode Configurations
@ -2957,6 +2938,14 @@ With given ARG, display files in `db/important-document-path."
(use-package pdf-tools (use-package pdf-tools
:commands (pdf-tools-install)) :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 (use-package shr
:init (setq shr-use-fonts nil :init (setq shr-use-fonts nil
shr-use-colors nil shr-use-colors nil