|
|
@ -33,7 +33,7 @@ |
|
|
|
'(inhibit-startup-screen t) |
|
|
|
'(inhibit-startup-screen t) |
|
|
|
'(package-selected-packages |
|
|
|
'(package-selected-packages |
|
|
|
(quote |
|
|
|
(quote |
|
|
|
(fill-column-indicator evil mustang-theme cider ## minimap)))) |
|
|
|
(evil-leader editorconfig diff-hl neotree helm-ag helm-projectile projectile helm hlinum fill-column-indicator evil mustang-theme cider)))) |
|
|
|
(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. |
|
|
@ -61,19 +61,6 @@ |
|
|
|
(define-globalized-minor-mode global-fci-mode fci-mode (lambda () (fci-mode 1))) |
|
|
|
(define-globalized-minor-mode global-fci-mode fci-mode (lambda () (fci-mode 1))) |
|
|
|
(global-fci-mode 1) |
|
|
|
(global-fci-mode 1) |
|
|
|
|
|
|
|
|
|
|
|
;; change mode-line color by evil state |
|
|
|
|
|
|
|
; (let ((default-color (cons (face-background 'mode-line) |
|
|
|
|
|
|
|
; (face-foreground 'mode-line)))) |
|
|
|
|
|
|
|
; (add-hook 'post-command-hook |
|
|
|
|
|
|
|
; (lambda () |
|
|
|
|
|
|
|
; (let ((color (cond ((minibufferp) default-color) |
|
|
|
|
|
|
|
; ((evil-insert-state-p) '("#545454" . "#ffffff")) |
|
|
|
|
|
|
|
; ((evil-emacs-state-p) '("#444488" . "#ffffff")) |
|
|
|
|
|
|
|
; ((buffer-modified-p) '("#303030" . "#ffffff")) |
|
|
|
|
|
|
|
; (t default-color)))) |
|
|
|
|
|
|
|
; (set-face-background 'mode-line (car color)) |
|
|
|
|
|
|
|
; (set-face-foreground 'mode-line (cdr color)))))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(require 'powerline) |
|
|
|
(require 'powerline) |
|
|
|
(powerline-center-evil-theme) |
|
|
|
(powerline-center-evil-theme) |
|
|
|
|
|
|
|
|
|
|
@ -82,3 +69,87 @@ |
|
|
|
(define-key evil-normal-state-map (kbd "C-w <right>") 'evil-window-right) |
|
|
|
(define-key evil-normal-state-map (kbd "C-w <right>") 'evil-window-right) |
|
|
|
(define-key evil-normal-state-map (kbd "C-w <left>") 'evil-window-left) |
|
|
|
(define-key evil-normal-state-map (kbd "C-w <left>") 'evil-window-left) |
|
|
|
(define-key evil-normal-state-map (kbd "-") 'find-file) |
|
|
|
(define-key evil-normal-state-map (kbd "-") 'find-file) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; most of this stuff was taken from https://brainlessdeveloper.com/2017/12/27/making-emacs-work-like-my-vim-setup/ |
|
|
|
|
|
|
|
; and https://github.com/brainlessdeveloper/emacs.d |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; line numbers |
|
|
|
|
|
|
|
(global-linum-mode 1) |
|
|
|
|
|
|
|
(defun configure-linum-colors () |
|
|
|
|
|
|
|
(set-face-foreground 'linum "#555555")) |
|
|
|
|
|
|
|
(configure-linum-colors) |
|
|
|
|
|
|
|
(setq linum-format " %4d ") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; highlights the current line |
|
|
|
|
|
|
|
(use-package hlinum |
|
|
|
|
|
|
|
:ensure t) |
|
|
|
|
|
|
|
(set-face-foreground 'linum-highlight-face "white") |
|
|
|
|
|
|
|
(set-face-background 'linum-highlight-face nil) |
|
|
|
|
|
|
|
(hlinum-activate) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; display line and column in the statusbar |
|
|
|
|
|
|
|
(line-number-mode 1) |
|
|
|
|
|
|
|
(column-number-mode 1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; don't show startup messages |
|
|
|
|
|
|
|
(setq inhibit-startup-message t) |
|
|
|
|
|
|
|
(setq initial-scratch-message nil) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; auto-pairs |
|
|
|
|
|
|
|
(electric-pair-mode 1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; helm and projectile for project management |
|
|
|
|
|
|
|
(use-package helm |
|
|
|
|
|
|
|
:ensure t |
|
|
|
|
|
|
|
:config (helm-mode t)) |
|
|
|
|
|
|
|
(use-package projectile |
|
|
|
|
|
|
|
:ensure projectile |
|
|
|
|
|
|
|
:config (projectile-global-mode t)) |
|
|
|
|
|
|
|
(use-package helm-projectile |
|
|
|
|
|
|
|
:ensure t) |
|
|
|
|
|
|
|
(use-package helm-ag |
|
|
|
|
|
|
|
:ensure t) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; neotree is a nerdtree like |
|
|
|
|
|
|
|
(use-package neotree :ensure t) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(evil-define-key 'normal neotree-mode-map (kbd "TAB") 'neotree-enter) |
|
|
|
|
|
|
|
(evil-define-key 'normal neotree-mode-map (kbd "SPC") 'neotree-quick-look) |
|
|
|
|
|
|
|
(evil-define-key 'normal neotree-mode-map (kbd "q") 'neotree-hide) |
|
|
|
|
|
|
|
(evil-define-key 'normal neotree-mode-map (kbd "RET") 'neotree-enter) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; git gutters |
|
|
|
|
|
|
|
(use-package diff-hl |
|
|
|
|
|
|
|
:ensure t |
|
|
|
|
|
|
|
:init |
|
|
|
|
|
|
|
(setq diff-hl-side 'right)) |
|
|
|
|
|
|
|
(global-diff-hl-mode 1) |
|
|
|
|
|
|
|
(diff-hl-margin-mode 1) |
|
|
|
|
|
|
|
(diff-hl-flydiff-mode 1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; install editorconfig |
|
|
|
|
|
|
|
(use-package editorconfig |
|
|
|
|
|
|
|
:ensure t |
|
|
|
|
|
|
|
:config |
|
|
|
|
|
|
|
(editorconfig-mode 1)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; install evil-leader and set it as space |
|
|
|
|
|
|
|
(use-package evil-leader |
|
|
|
|
|
|
|
:ensure t |
|
|
|
|
|
|
|
:config |
|
|
|
|
|
|
|
(global-evil-leader-mode)) |
|
|
|
|
|
|
|
(evil-leader/set-leader "<SPC>") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(evil-leader/set-key |
|
|
|
|
|
|
|
"f" 'helm-projectile-find-file |
|
|
|
|
|
|
|
"F" 'helm-projectile-ag |
|
|
|
|
|
|
|
"q" 'kill-buffer-and-window |
|
|
|
|
|
|
|
"w" 'save-buffer |
|
|
|
|
|
|
|
"t" 'neotree-toggle |
|
|
|
|
|
|
|
; "e" 'emojify-insert-emoji |
|
|
|
|
|
|
|
; "g" 'magit |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; answer questions with 'y' instead of full 'yes' |
|
|
|
|
|
|
|
(defalias 'yes-or-no-p 'y-or-n-p) |
|
|
|