Return to form
This commit is contained in:
parent
0ffc8e4c1d
commit
5a6629631e
6 changed files with 93 additions and 39 deletions
|
|
@ -2,7 +2,7 @@
|
|||
;; Disable GC for the duration of init scripts
|
||||
(let ((gc-cons-threshold most-positive-fixnum))
|
||||
(global-auto-revert-mode t)
|
||||
;;(w32-register-hot-key [C-])
|
||||
;;(w32-register-hot-key [C-]) --Windows!
|
||||
(defconst user-init-dir
|
||||
(cond ((boundp 'user-emacs-directory)
|
||||
user-emacs-directory)
|
||||
|
|
@ -16,7 +16,6 @@
|
|||
(load-file (expand-file-name file user-init-dir)))
|
||||
;; Lmao do the loading here
|
||||
|
||||
|
||||
;; Eval buffer
|
||||
(global-set-key (kbd "<f5>") #'eval-buffer)
|
||||
|
||||
|
|
@ -67,9 +66,64 @@
|
|||
(use-package projectile-ripgrep
|
||||
:ensure t)
|
||||
|
||||
(use-package crdt
|
||||
:ensure t)
|
||||
|
||||
(use-package lua-mode
|
||||
:ensure t
|
||||
:config
|
||||
(autoload 'lua-mode "lua-mode" "Lua editing mode." t)
|
||||
(add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode))
|
||||
(add-to-list 'interpreter-mode-alist '("lua" . lua-mode)))
|
||||
|
||||
(use-package super-save
|
||||
:ensure t
|
||||
:config
|
||||
(super-save-mode +1)
|
||||
(setq super-save-auto-save-when-idle t))
|
||||
|
||||
(use-package sudo-edit
|
||||
:ensure t)
|
||||
|
||||
(use-package hl-todo
|
||||
:ensure t
|
||||
:config
|
||||
;; Enable hl-todo mode globally
|
||||
(global-hl-todo-mode)
|
||||
;; Define custom faces for the mode
|
||||
(defface hl-todo-custom-face
|
||||
'((t :weight ultra-bold :underline t :foreground "#db383d" : :inherit (hl-todo)))
|
||||
"Custom keyface for the TODO keyword."
|
||||
:group 'hl-todo)
|
||||
(setq hl-todo-keyword-faces
|
||||
'(("HOLD" . "#d0bf8f")
|
||||
("TODO" . hl-todo-custom-face)
|
||||
("todo" . hl-todo-custom-face)
|
||||
("NEXT" . "#dca3a3")
|
||||
("THEM" . "#dc8cc3")
|
||||
("PROG" . "#7cb8bb")
|
||||
("OKAY" . "#7cb8bb")
|
||||
("DONT" . "#5f7f5f")
|
||||
("FAIL" . "#8c5353")
|
||||
("DONE" . "#afd8af")
|
||||
("NOTE" . "#d0bf8f")
|
||||
("KLUDGE" . "#d0bf8f")
|
||||
("HACK" . "#d0bf8f")
|
||||
("TEMP" . "#d0bf8f")
|
||||
("FIXME" . "#cc9393")
|
||||
("XXX+" . "#cc9393"))))
|
||||
|
||||
(use-package magit-todos
|
||||
:ensure t
|
||||
:after magit
|
||||
:commands (magit-todos-mode)
|
||||
:config
|
||||
(setq magit-todos-nice nil)
|
||||
;;(setq (magit-todos-git-grep-extra-args (list "-n")))
|
||||
(setq magit-todos-scanner 'magit-todos--scan-with-rg)
|
||||
;;(setq magit-todos-depth 100)
|
||||
(magit-todos-mode 1))
|
||||
|
||||
(use-package markdown-mode
|
||||
:ensure t
|
||||
:mode ("README\\.md\\'" . gfm-mode)
|
||||
|
|
@ -196,8 +250,6 @@
|
|||
|
||||
(treemacs-start-on-boot)
|
||||
|
||||
|
||||
|
||||
;;; USER CONFIG ;;;
|
||||
|
||||
;;Remapping treemacs
|
||||
|
|
@ -213,7 +265,7 @@
|
|||
(setq projectile-per-project-compilation-buffer t)
|
||||
|
||||
;; Windows: Let git's UI ask for passphrase
|
||||
;;(setenv "SSH_ASKPASS" "git-gui--askpass")
|
||||
;;(setenv "SSH_ASKPASS" "git-gui--askpass") --only this one, iirc!
|
||||
;;(require 'exec-path
|
||||
;;(exec-path-from-shell
|
||||
;;l-copy-env "SSH_AGENT_PID")
|
||||
|
|
@ -242,18 +294,18 @@
|
|||
(advice-add 'risky-local-variable-p :override #'ignore)
|
||||
|
||||
;; Skip windows when switching
|
||||
(defvar ignore-windows-containing-buffers-matching-res '("Treemacs.*")
|
||||
"List of regular expressions specifying windows to skip (if window contains buffer that matches, skip)")
|
||||
;; (defvar ignore-windows-containing-buffers-matching-res '("*Treemacs*")
|
||||
;; "List of regular expressions specifying windows to skip (if window contains buffer that matches, skip)")
|
||||
|
||||
(defadvice other-window (before other-window-ignore-windows-containing activate)
|
||||
"skip over windows containing buffers which match regular expressions in 'ignore-windows-containing-buffers-matching-res"
|
||||
(if (and (= 1 (ad-get-arg 0)) (interactive-p))
|
||||
(let* ((win (next-window))
|
||||
(bname (buffer-name (window-buffer win))))
|
||||
(when (some 'identity (mapcar '(lambda (re)
|
||||
(string-match re bname))
|
||||
ignore-windows-containing-buffers-matching-res))
|
||||
(ad-set-arg 0 2)))))
|
||||
;; (defadvice other-window (before other-window-ignore-windows-containing activate)
|
||||
;; "skip over windows containing buffers which match regular expressions in 'ignore-windows-containing-buffers-matching-res"
|
||||
;; (if (and (= 1 (ad-get-arg 0)) (interactive-p))
|
||||
;; (let* ((win (next-window))
|
||||
;; (bname (buffer-name (window-buffer win))))
|
||||
;; (when (some 'identity (mapcar '(lambda (re)
|
||||
;; (string-match re bname))
|
||||
;; ignore-windows-containing-buffers-matching-res))
|
||||
;; (ad-set-arg 0 2)))))
|
||||
|
||||
;; Disable splash screen and startup message
|
||||
(setq inhibit-startup-message t)
|
||||
|
|
@ -299,7 +351,6 @@
|
|||
(define-key input-decode-map [?\C-m] [C-m])
|
||||
(global-set-key (kbd "<C-m>") 'undo-redo)
|
||||
|
||||
|
||||
;;zap-to-char M-z, toggle-input-method C-\, transpose-chars C-t
|
||||
(global-set-key (kbd "M-b") 'backward-char)
|
||||
(global-set-key (kbd "M-f") 'forward-char)
|
||||
|
|
@ -328,7 +379,6 @@
|
|||
(global-set-key [f8] 'projectile-find-file)
|
||||
(global-set-key [f7] 'projectile-compile-project)
|
||||
|
||||
|
||||
;; oddly specific buffer movement
|
||||
|
||||
(global-set-key (kbd "C-h u") 'info-apropos)
|
||||
|
|
@ -352,8 +402,6 @@
|
|||
'grep-find-command
|
||||
'("find -L . -type f -exec grep --color=auto -nH --null -e \{\} +" . 58))
|
||||
|
||||
|
||||
|
||||
;;
|
||||
(define-key dired-mode-map (kbd "RET") 'dired-find-alternate-file)
|
||||
(define-key dired-mode-map (kbd "a") 'dired-find-file)
|
||||
|
|
@ -364,10 +412,8 @@
|
|||
(setq compilation-scroll-output t)
|
||||
|
||||
;;Don't ask for following symlinks (nil = treat as from where we're accessing)
|
||||
|
||||
(setq vc-follow-symlinks nil)
|
||||
|
||||
|
||||
;; Copy config
|
||||
(defun copy-region-or-word ()
|
||||
"If mark is active, copy region. Otherwise, copy word currently on cursor"
|
||||
|
|
@ -456,9 +502,11 @@
|
|||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(markdown-command "/usr/bin/pandoc")
|
||||
'(package-selected-packages
|
||||
'(benchmark-init helm-projectile markdown-mode projectile
|
||||
projectile-ripgrep ripgrep ssh-agency sudo-edit
|
||||
'(benchmark-init crdt helm-projectile hl-todo lua-mode magit-todos
|
||||
markdown-mode projectile projectile-ripgrep
|
||||
ripgrep ssh-agency sudo-edit super-save
|
||||
tangotango-theme treemacs treemacs-evil
|
||||
treemacs-icons-dired treemacs-magit treemacs-persp
|
||||
treemacs-projectile treemacs-tab-bar))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue