~willvaughn/.emacs.d

9d46e43495dd0cb4b7d872679efe71bbfdfcbd5e — William Vaughn 8 months ago d6d2dd4
add python tree sitter and eglot workspace config function
4 files changed, 17 insertions(+), 2 deletions(-)

M init.el
M lisp/wv-packages.el
M lisp/wv-python.el
M straight/versions/default.el
M init.el => init.el +2 -0
@@ 21,6 21,8 @@

;; Nomad configuration, in search of a permanent home
(use-package markdown-mode)
(use-package tree-sitter)
(use-package tree-sitter-langs)

;; Without this I was getting nagged for every load of an org file
(advice-add 'risky-local-variable-p :override #'ignore)

M lisp/wv-packages.el => lisp/wv-packages.el +2 -0
@@ 49,5 49,7 @@
(straight-use-package 'clojure-mode)
(straight-use-package 'cider)
(straight-use-package 'pyvenv)
(straight-use-package 'tree-sitter)
(straight-use-package 'tree-sitter-langs)

(provide 'wv-packages)

M lisp/wv-python.el => lisp/wv-python.el +10 -1
@@ 1,11 1,20 @@
;;; 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
  (pyvenv-default-virtual-env-name ".venv")
  :hook
  (python-mode-local-vars . pyvenv-track-virtualenv)
  ((python-mode-local-vars . pyvenv-track-virtualenv)
   (python-mode . tree-sitter-mode)
   (python-mode . tree-sitter-hl-mode))
  :init
  (pyvenv-mode t)
  (add-hook 'pyvenv-post-activate-hooks #'pyvenv-restart-python)

M straight/versions/default.el => straight/versions/default.el +3 -1
@@ 1,4 1,4 @@
(("cider" . "bc8903b0c85cf0891f106337eabfc6f747d262a1")
(("cider" . "f376d2de9d4a9ed09c053db73ed667e61e391355")
 ("circe" . "57fe189d7c0b98b9b1b5a59767cea1c7e2c22b13")
 ("clojure-mode" . "0e62583b5198f71856e4d7b80e1099789d47f2ed")
 ("company-mode" . "3ec40b0a0ea751b6c48f24abd58c8304deb53014")


@@ 10,6 10,7 @@
 ("el-get" . "d8321df8c44102afcba4d0e5bc6f2c2f85149adc")
 ("eldoc" . "bf2e88dcf00e6554e24b517aa315527011042fae")
 ("elfeed" . "162d7d545ed41c27967d108c04aa31f5a61c8e16")
 ("elisp-tree-sitter" . "3cfab8a0e945db9b3df84437f27945746a43cc71")
 ("emacs-0x0" . "d28e509d8fe79d74300d9db8215310d44b778f78")
 ("emacs-emojify" . "1b726412f19896abf5e4857d4c32220e33400b55")
 ("emacs-libvterm" . "94e2b0b2b4a750e7907dacd5b4c0584900846dd1")


@@ 51,6 52,7 @@
 ("straight.el" . "039e5c9a9b5c00749602afb41341e9e77ba09429")
 ("tomelr" . "57cb24df521031a6d02f61091db82d292e4175df")
 ("transient" . "a1575e58331b1ff85ac97667df0130ae822ccf5f")
 ("tree-sitter-langs" . "944a734b7c3a5922a7e9a2009a9165e2dc195b18")
 ("use-package" . "a6e856418d2ebd053b34e0ab2fda328abeba731c")
 ("vertico" . "7c3f77d705d06f47d4a586a9832cad1d591714f9")
 ("with-editor" . "9e437353ee817b8e6a9ffce53e37fe5a6fcb4294")