Load emacs-pet from github
Finally, this commit puts elpaca to use and does the thing I've been wanting to do, which is being able to develop packages that I am using in a seamless way and being able to contribute PRs upstream. If this experiment goes well, I will merge this branch back into main and continue using elpaca for my package management needs.
This commit is contained in:
parent
5fc4596f2a
commit
08d18e3fbe
2 changed files with 42 additions and 36 deletions
|
@ -5306,11 +5306,9 @@ Poetry takes care of setting up the venv properly, so if you replace the default
|
||||||
|
|
||||||
(use-package python
|
(use-package python
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:ensure-system-package (dasel sqlite3)
|
;;; Uncomment this if you want Eglot to start automatically. I prefer
|
||||||
;;; Uncomment this if you want Eglot to start automatically. I don't
|
;;; calling `M-x eglot' myself.
|
||||||
;;; recommend it because it does not give you time to activate the
|
;; :hook ((python-base-mode . eglot-ensure))
|
||||||
;;; appropriate VirtualEnv and get the best of the situation.
|
|
||||||
:hook ((python-base-mode . eglot-ensure))
|
|
||||||
:config
|
:config
|
||||||
(setq python-shell-dedicated 'project)
|
(setq python-shell-dedicated 'project)
|
||||||
;; Apheleia is an Emacs package for formatting code as you save
|
;; Apheleia is an Emacs package for formatting code as you save
|
||||||
|
@ -5320,13 +5318,18 @@ Poetry takes care of setting up the venv properly, so if you replace the default
|
||||||
(setf (alist-get 'python-mode apheleia-mode-alist)
|
(setf (alist-get 'python-mode apheleia-mode-alist)
|
||||||
'(ruff-isort ruff))
|
'(ruff-isort ruff))
|
||||||
(setf (alist-get 'python-ts-mode apheleia-mode-alist)
|
(setf (alist-get 'python-ts-mode apheleia-mode-alist)
|
||||||
'(ruff-isort ruff)))
|
'(ruff-isort ruff))))
|
||||||
(with-eval-after-load 'eglot
|
|
||||||
(require 'vedang-pet)
|
(use-package pet
|
||||||
;; The -10 here is a way to define the priority of the function in
|
:ensure (:host github :repo "vedang/emacs-pet" :branch "fix-eglot-integration"
|
||||||
;; the list of hook functions. We want `pet-mode' to run before
|
;; :remotes (("upstream" :repo "wyuenho/emacs-pet" :branch "main"))
|
||||||
;; any other configured hook function.
|
)
|
||||||
(add-hook 'python-base-mode-hook #'pet-mode -10)))
|
:ensure-system-package (dasel sqlite3)
|
||||||
|
:config
|
||||||
|
;; The -10 here is a way to define the priority of the function in
|
||||||
|
;; the list of hook functions. We want `pet-mode' to run before any
|
||||||
|
;; other configured hook function.
|
||||||
|
(add-hook 'python-base-mode-hook #'pet-mode -10))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Tooling I have tried and rejected or failed to setup correctly
|
*** Tooling I have tried and rejected or failed to setup correctly
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
(use-package eglot
|
(use-package eglot
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:demand t ; Not a mistake, we need to load Eglot elisp code before
|
:demand t ; Not a mistake, we need to load Eglot elisp code before
|
||||||
; we open any Python file.
|
; we open any Python file.
|
||||||
:functions (eglot-ensure)
|
:functions (eglot-ensure)
|
||||||
:commands (eglot)
|
:commands (eglot)
|
||||||
:bind
|
:bind
|
||||||
|
@ -373,11 +373,9 @@ modifications."
|
||||||
|
|
||||||
(use-package python
|
(use-package python
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:ensure-system-package (dasel sqlite3)
|
;;; Uncomment this if you want Eglot to start automatically. I prefer
|
||||||
;;; Uncomment this if you want Eglot to start automatically. I don't
|
;;; calling `M-x eglot' myself.
|
||||||
;;; recommend it because it does not give you time to activate the
|
;; :hook ((python-base-mode . eglot-ensure))
|
||||||
;;; appropriate VirtualEnv and get the best of the situation.
|
|
||||||
:hook ((python-base-mode . eglot-ensure))
|
|
||||||
:config
|
:config
|
||||||
(setq python-shell-dedicated 'project)
|
(setq python-shell-dedicated 'project)
|
||||||
;; Apheleia is an Emacs package for formatting code as you save
|
;; Apheleia is an Emacs package for formatting code as you save
|
||||||
|
@ -387,13 +385,18 @@ modifications."
|
||||||
(setf (alist-get 'python-mode apheleia-mode-alist)
|
(setf (alist-get 'python-mode apheleia-mode-alist)
|
||||||
'(ruff-isort ruff))
|
'(ruff-isort ruff))
|
||||||
(setf (alist-get 'python-ts-mode apheleia-mode-alist)
|
(setf (alist-get 'python-ts-mode apheleia-mode-alist)
|
||||||
'(ruff-isort ruff)))
|
'(ruff-isort ruff))))
|
||||||
(with-eval-after-load 'eglot
|
|
||||||
(require 'vedang-pet)
|
(use-package pet
|
||||||
;; The -10 here is a way to define the priority of the function in
|
:ensure (:host github :repo "vedang/emacs-pet" :branch "fix-eglot-integration"
|
||||||
;; the list of hook functions. We want `pet-mode' to run before
|
;; :remotes (("upstream" :repo "wyuenho/emacs-pet" :branch "main"))
|
||||||
;; any other configured hook function.
|
)
|
||||||
(add-hook 'python-base-mode-hook #'pet-mode -10)))
|
:ensure-system-package (dasel sqlite3)
|
||||||
|
:config
|
||||||
|
;; The -10 here is a way to define the priority of the function in
|
||||||
|
;; the list of hook functions. We want `pet-mode' to run before any
|
||||||
|
;; other configured hook function.
|
||||||
|
(add-hook 'python-base-mode-hook #'pet-mode -10))
|
||||||
|
|
||||||
;;;; Configuration for Zig Programming
|
;;;; Configuration for Zig Programming
|
||||||
|
|
||||||
|
@ -438,17 +441,17 @@ NS is the namespace information passed into the function by cider."
|
||||||
:ensure t
|
:ensure t
|
||||||
:config
|
:config
|
||||||
(defun json->edn ()
|
(defun json->edn ()
|
||||||
"Convert the selected region, or entire file, from JSON to EDN."
|
"Convert the selected region, or entire file, from JSON to EDN."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((b (if mark-active (region-beginning) (point-min)))
|
(let ((b (if mark-active (region-beginning) (point-min)))
|
||||||
(e (if mark-active (region-end) (point-max)))
|
(e (if mark-active (region-end) (point-max)))
|
||||||
(jet (when (executable-find "jet")
|
(jet (when (executable-find "jet")
|
||||||
"jet --pretty --keywordize keyword --from json --to edn")))
|
"jet --pretty --keywordize keyword --from json --to edn")))
|
||||||
(if jet
|
(if jet
|
||||||
(let ((p (point)))
|
(let ((p (point)))
|
||||||
(shell-command-on-region b e jet (current-buffer) t)
|
(shell-command-on-region b e jet (current-buffer) t)
|
||||||
(goto-char p))
|
(goto-char p))
|
||||||
(user-error "Could not find jet installed")))))
|
(user-error "Could not find jet installed")))))
|
||||||
|
|
||||||
;;; Settings for Interaction mode for Emacs-Lisp
|
;;; Settings for Interaction mode for Emacs-Lisp
|
||||||
(use-package ielm
|
(use-package ielm
|
||||||
|
|
Loading…
Reference in a new issue