~willvaughn/.emacs.d

4496a941b5bd8bf2ff7dbc4ae5692e805c4c91ee — William Vaughn 8 months ago 9d46e43
wv-python eglot default configuration change
1 files changed, 10 insertions(+), 7 deletions(-)

M lisp/wv-python.el
M lisp/wv-python.el => lisp/wv-python.el +10 -7
@@ 1,12 1,5 @@
;;; lisp/wv-python.el -*- lexical-binding: t; -*-

(defun wv-python/set-eglot-workspace-configuration ()
  (interactive)
  (setq-default eglot-workspace-configuration
                '(:pylsp (:plugins (:black (:enabled t)
                                    :rope_autoimport (:enabled t)
                                    :pycodestyle (:enabled :json-false))))))

(use-package pyvenv
  :after python
  :custom


@@ 15,6 8,16 @@
  ((python-mode-local-vars . pyvenv-track-virtualenv)
   (python-mode . tree-sitter-mode)
   (python-mode . tree-sitter-hl-mode))
  :config
  (setq-default eglot-workspace-configuration
                '(:pylsp (:plugins
                          (:black (:enabled t)
                           :rope_autoimport (:enabled :json-false)
                           :pylsp-mypy (:enabled t
                                        :live-mode :json-false
                                        :strict :json-false)
                           :pycodestyle (:enabled :json-false)
                           :mccabe (:enabled :json-false)))))
  :init
  (pyvenv-mode t)
  (add-hook 'pyvenv-post-activate-hooks #'pyvenv-restart-python)