From 9509eec0a0209b9eeb2e0185613d8ddace0e0f59 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Fri, 8 Sep 2023 15:26:14 +0300 Subject: emacs: Update dev tools - Add project-magit - Use eglot for python --- .emacs.d/modules/thanos-commands.el | 3 --- .emacs.d/modules/thanos-dev.el | 9 ++++++++- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to '.emacs.d/modules') diff --git a/.emacs.d/modules/thanos-commands.el b/.emacs.d/modules/thanos-commands.el index 8b3407e..8966d96 100644 --- a/.emacs.d/modules/thanos-commands.el +++ b/.emacs.d/modules/thanos-commands.el @@ -29,8 +29,6 @@ ;; ╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╰╯ ;;; Code: -(require 'gptel) - (defvar vm-directory "~/virtual-machines/") @@ -39,7 +37,6 @@ (let ((command-parts (split-string command "[ ]+"))) (apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts))))) - (defun thanos/emacs-keys () "Swap caps with ctrl." (interactive) diff --git a/.emacs.d/modules/thanos-dev.el b/.emacs.d/modules/thanos-dev.el index d80170e..f711bba 100644 --- a/.emacs.d/modules/thanos-dev.el +++ b/.emacs.d/modules/thanos-dev.el @@ -51,6 +51,13 @@ ;; Magit (require 'magit) +(defun project-magit () + "Run magit-status in the current project's root." + (interactive) + (magit-status (project-root (project-current t)))) + +(define-key project-prefix-map (kbd "s") 'project-magit) + (setf magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1) (define-prefix-command 'thanos/magit) (global-set-key (kbd "C-c g") 'thanos/magit) @@ -103,7 +110,7 @@ (require 'python-mode) (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode)) -(add-hook 'python-mode 'lsp-mode) +(add-hook 'python-mode #'eglot) ;; json (require 'json-mode) -- cgit v1.2.3