From 07f7ef78587547aa4406d4447f38d4b53b253f30 Mon Sep 17 00:00:00 2001 From: josiah Date: Fri, 18 Mar 2022 15:00:43 -0500 Subject: [PATCH] Move to eglot from lsp, again. --- .emacs.d/custom.el | 2 +- .emacs.d/init.el | 1 + .emacs.d/jlj-python.el | 27 +++++---------------------- 3 files changed, 7 insertions(+), 23 deletions(-) diff --git a/.emacs.d/custom.el b/.emacs.d/custom.el index 6bd686c..9c04b19 100644 --- a/.emacs.d/custom.el +++ b/.emacs.d/custom.el @@ -12,7 +12,7 @@ '(epg-gpg-program "/usr/local/bin/gpg") '(global-hl-line-mode t) '(package-selected-packages - '(ido-vertical-mode dash-functional region-bindings-mode jinja2-mode dockerfile-mode sudo-edit modus-themes org-caldav json-mode pdf-tools org-special-block-extras neotree sr-speedbar lsp-python-ms fira-code-mode yasnippet org-pdftools phps-mode projectile webfeeder znc pinboard yaml-mode which-key web-mode virtualenvwrapper use-package twittering-mode try smex racer powershell poetry pipenv ox-reveal outline-magic org-pdfview org-bullets ob-restclient multiple-cursors magit lua-mode lsp-ui iedit helm flycheck-rust exec-path-from-shell eglot edit-indirect company-lsp ansible ace-window))) + '(lsp-pyright ido-vertical-mode dash-functional region-bindings-mode jinja2-mode dockerfile-mode sudo-edit modus-themes org-caldav json-mode pdf-tools org-special-block-extras neotree sr-speedbar lsp-python-ms fira-code-mode yasnippet org-pdftools phps-mode projectile webfeeder znc pinboard yaml-mode which-key web-mode virtualenvwrapper use-package twittering-mode try smex racer powershell poetry pipenv ox-reveal outline-magic org-pdfview org-bullets ob-restclient multiple-cursors magit lua-mode lsp-ui iedit helm flycheck-rust exec-path-from-shell eglot edit-indirect company-lsp ansible ace-window))) '(znc-servers `(("bouncer.awful.club" 5000 t ((freenode "blindidiotgod/freenode" ,znc-password) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 339fadf..7efee56 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -6,6 +6,7 @@ (package-initialize) (require 'package) (setq package-archives + '(("melpa" . "https://melpa.org/packages/") ("gnu" . "http://elpa.gnu.org/packages/") ("elpy" . "http://jorgenschaefer.github.io/packages/"))) diff --git a/.emacs.d/jlj-python.el b/.emacs.d/jlj-python.el index 7d48e7b..24126ed 100644 --- a/.emacs.d/jlj-python.el +++ b/.emacs.d/jlj-python.el @@ -31,29 +31,12 @@ (setq company-idle-delay 0) (setq company-minimum-prefix-length 1)) -; install lsp mode -(use-package lsp-mode +(use-package project :ensure t) + +(use-package eglot :ensure t - :hook (python-mode . lsp-deferred) - :commands (lsp lsp-deferred)) - -;; ; let's add the lsp company backend -;; (use-package company-lsp -;; :config -;; (push 'company-lsp company-backends)) - -; also installs lsp as a dependency -(use-package lsp-ui - :ensure t - :hook (lsp-mode . lsp-ui-mode)) - -(use-package lsp-python-ms - :ensure t - :init (setq lsp-python-ms-auto-install-server t) - :hook (python-mode . (lambda () - (require 'lsp-python-ms) - (lsp)))) ; or lsp-deferred - + :config + (add-hook 'python-mode-hook 'eglot-ensure)) ;; (use-package pyvenv ;; :ensure t)