working again
This commit is contained in:
parent
7ea2eb8f05
commit
bd71f8d95a
5 changed files with 39 additions and 62 deletions
19
custom.el
19
custom.el
|
@ -3,7 +3,24 @@
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
;; Your init file should contain only one such instance.
|
;; Your init file should contain only one such instance.
|
||||||
;; If there is more than one, they won't work right.
|
;; If there is more than one, they won't work right.
|
||||||
'(package-selected-packages nil))
|
'(package-selected-packages
|
||||||
|
'(aggressive-indent anzu auto-compile avy browse-kill-ring cask-mode
|
||||||
|
catppuccin-theme corfu default-text-scale
|
||||||
|
diff-hl diminish dimmer dirvish disable-mouse
|
||||||
|
dotenv-mode elisp-slime-nav embark-consult
|
||||||
|
envrc exec-path-from-shell flycheck-relint gcmh
|
||||||
|
git-link git-modes git-timemachine gnuplot
|
||||||
|
god-mode highlight-escape-sequences
|
||||||
|
highlight-quoted ibuffer-projectile ibuffer-vc
|
||||||
|
immortal-scratch ipretty list-unicode-display
|
||||||
|
macrostep magit-todos marginalia move-dup
|
||||||
|
multiple-cursors orderless org-bullets
|
||||||
|
org-cliplink org-pomodoro origami
|
||||||
|
package-lint-flymake page-break-lines paredit
|
||||||
|
puni rainbow-delimiters rainbow-mode sudo-edit
|
||||||
|
symbol-overlay tldr unfill vertico vterm-toggle
|
||||||
|
whitespace-cleanup-mode whole-line-or-region
|
||||||
|
writeroom-mode)))
|
||||||
(custom-set-faces
|
(custom-set-faces
|
||||||
;; custom-set-faces was added by Custom.
|
;; custom-set-faces was added by Custom.
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
|
|
3
init.el
3
init.el
|
@ -43,6 +43,7 @@
|
||||||
(require-package 'diminish)
|
(require-package 'diminish)
|
||||||
;; Packages
|
;; Packages
|
||||||
;;(require 'init-meow)
|
;;(require 'init-meow)
|
||||||
|
(require 'init-god)
|
||||||
|
|
||||||
(require 'init-gui-frames)
|
(require 'init-gui-frames)
|
||||||
(require 'init-dired)
|
(require 'init-dired)
|
||||||
|
@ -50,8 +51,6 @@
|
||||||
(require 'init-look)
|
(require 'init-look)
|
||||||
(require 'init-isearch)
|
(require 'init-isearch)
|
||||||
(require 'init-uniquify)
|
(require 'init-uniquify)
|
||||||
;; (require 'init-flymake)
|
|
||||||
;;(require 'init-flycheck)
|
|
||||||
(require 'init-recentf)
|
(require 'init-recentf)
|
||||||
(require 'init-minibuffer)
|
(require 'init-minibuffer)
|
||||||
(require 'init-ibuffer)
|
(require 'init-ibuffer)
|
||||||
|
|
|
@ -1,18 +1,12 @@
|
||||||
;;; init-git.el --- Git SCM support -*- lexical-binding: t -*-
|
;;; init-git.el --- Git SCM support -*- lexical-binding: t -*-
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
|
||||||
;; See also init-github.el.
|
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
;; TODO: link commits from vc-log to magit-show-commit
|
|
||||||
;; TODO: smerge-mode
|
|
||||||
(require-package 'git-modes)
|
(require-package 'git-modes)
|
||||||
|
|
||||||
(when (maybe-require-package 'git-timemachine)
|
(when (maybe-require-package 'git-timemachine)
|
||||||
(global-set-key (kbd "C-x v t") 'git-timemachine-toggle))
|
(global-set-key (kbd "C-x v t") 'git-timemachine-toggle))
|
||||||
|
|
||||||
(require-package 'git-link)
|
|
||||||
|
|
||||||
(when (maybe-require-package 'magit)
|
(when (maybe-require-package 'magit)
|
||||||
(setq-default magit-diff-refine-hunk 'all)
|
(setq-default magit-diff-refine-hunk 'all)
|
||||||
|
|
||||||
|
@ -23,24 +17,8 @@
|
||||||
(global-set-key [(meta f12)] 'magit-status)
|
(global-set-key [(meta f12)] 'magit-status)
|
||||||
(global-set-key (kbd "C-x g") 'magit-status)
|
(global-set-key (kbd "C-x g") 'magit-status)
|
||||||
(global-set-key (kbd "C-x M-g") 'magit-dispatch)
|
(global-set-key (kbd "C-x M-g") 'magit-dispatch)
|
||||||
;; Tell magit to automatically put us in vi-insert-mode when committing a change.
|
)
|
||||||
(add-hook 'with-editor-mode-hook #'evil-insert-state)
|
|
||||||
|
|
||||||
(defun sanityinc/magit-or-vc-log-file (&optional prompt)
|
|
||||||
(interactive "P")
|
|
||||||
(if (and (buffer-file-name)
|
|
||||||
(eq 'Git (vc-backend (buffer-file-name))))
|
|
||||||
(if prompt
|
|
||||||
(magit-log-buffer-file-popup)
|
|
||||||
(magit-log-buffer-file t))
|
|
||||||
(vc-print-log)))
|
|
||||||
|
|
||||||
(with-eval-after-load 'vc
|
|
||||||
(define-key vc-prefix-map (kbd "l") 'sanityinc/magit-or-vc-log-file)))
|
|
||||||
|
|
||||||
|
|
||||||
(with-eval-after-load 'magit
|
|
||||||
(define-key magit-status-mode-map (kbd "C-M-<up>") 'magit-section-up))
|
|
||||||
|
|
||||||
(maybe-require-package 'magit-todos)
|
(maybe-require-package 'magit-todos)
|
||||||
|
|
||||||
|
@ -54,40 +32,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;; git-svn support
|
|
||||||
|
|
||||||
;; (when (maybe-require-package 'magit-svn)
|
|
||||||
;; (require-package 'magit-svn)
|
|
||||||
;; (autoload 'magit-svn-enabled "magit-svn")
|
|
||||||
;; (defun sanityinc/maybe-enable-magit-svn-mode ()
|
|
||||||
;; (when (magit-svn-enabled)
|
|
||||||
;; (magit-svn-mode)))
|
|
||||||
;; (add-hook 'magit-status-mode-hook #'sanityinc/maybe-enable-magit-svn-mode))
|
|
||||||
|
|
||||||
(with-eval-after-load 'compile
|
|
||||||
(dolist (defn (list '(git-svn-updated "^\t[A-Z]\t\\(.*\\)$" 1 nil nil 0 1)
|
|
||||||
'(git-svn-needs-update "^\\(.*\\): needs update$" 1 nil nil 2 1)))
|
|
||||||
(add-to-list 'compilation-error-regexp-alist-alist defn)
|
|
||||||
(add-to-list 'compilation-error-regexp-alist (car defn))))
|
|
||||||
|
|
||||||
(defvar git-svn--available-commands nil "Cached list of git svn subcommands")
|
|
||||||
(defun git-svn--available-commands ()
|
|
||||||
(or git-svn--available-commands
|
|
||||||
(setq git-svn--available-commands
|
|
||||||
(sanityinc/string-all-matches
|
|
||||||
"^ \\([a-z\\-]+\\) +"
|
|
||||||
(shell-command-to-string "git svn help") 1))))
|
|
||||||
|
|
||||||
(autoload 'vc-git-root "vc-git")
|
|
||||||
|
|
||||||
(defun git-svn (dir command)
|
|
||||||
"Run a git svn subcommand in DIR."
|
|
||||||
(interactive (list (read-directory-name "Directory: ")
|
|
||||||
(completing-read "git-svn command: " (git-svn--available-commands) nil t nil nil (git-svn--available-commands))))
|
|
||||||
(let* ((default-directory (vc-git-root dir))
|
|
||||||
(compilation-buffer-name-function (lambda (major-mode-name) "*git-svn*")))
|
|
||||||
(compile (concat "git svn " command))))
|
|
||||||
|
|
||||||
|
|
||||||
(provide 'init-git)
|
(provide 'init-git)
|
||||||
;;; init-git.el ends here
|
;;; init-git.el ends here
|
||||||
|
|
14
lisp/init-god.el
Normal file
14
lisp/init-god.el
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
;;; init-god.el --- make emacs usable -*- lexical-binding: t -*-
|
||||||
|
;;; Commentary:
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(require-package 'god-mode)
|
||||||
|
(god-mode)
|
||||||
|
(global-set-key (kbd "<escape>") #'god-local-mode)
|
||||||
|
|
||||||
|
(defun my-god-mode-update-cursor-type ()
|
||||||
|
(setq cursor-type (if (or god-local-mode buffer-read-only) 'box 'bar)))
|
||||||
|
|
||||||
|
(add-hook 'post-command-hook #'my-god-mode-update-cursor-type)
|
||||||
|
|
||||||
|
(define-key god-local-mode-map (kbd ".") #'repeat)
|
|
@ -1,3 +1,6 @@
|
||||||
|
;;; init-look.el --- making emacs look decent. -*- lexical-binding: t -*-
|
||||||
|
;;; Commentary:
|
||||||
|
;;; Code:
|
||||||
;;; Line spacing, can be 0 for code and 1 or 2 for text
|
;;; Line spacing, can be 0 for code and 1 or 2 for text
|
||||||
;;; -------------------------------------------------------------------
|
;;; -------------------------------------------------------------------
|
||||||
(setq-default line-spacing 0)
|
(setq-default line-spacing 0)
|
||||||
|
@ -12,7 +15,7 @@
|
||||||
;;; -------------------------------------------------------------------
|
;;; -------------------------------------------------------------------
|
||||||
;;; Highlight current line
|
;;; Highlight current line
|
||||||
;;; -------------------------------------------------------------------
|
;;; -------------------------------------------------------------------
|
||||||
(global-hl-line-mode +1)
|
(global-hl-line-mode -1)
|
||||||
|
|
||||||
;;; No sound
|
;;; No sound
|
||||||
;;; -------------------------------------------------------------------
|
;;; -------------------------------------------------------------------
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue