Skip to content
Snippets Groups Projects
Commit b63af81e authored by M.Liu's avatar M.Liu
Browse files

add helm-dash evil-leader packages

parent 5d0323f0
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
;; (setq debug-on-error t) ;; (setq debug-on-error t)
(setq custom-file (expand-file-name "custom.el" user-emacs-directory)) (setq custom-file (expand-file-name "custom.el" user-emacs-directory))
(add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory)) (add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory))
(when (file-exists-p custom-file)
(load custom-file))
;; (require 'cl) ;; (require 'cl)
(require 'cl-lib) (require 'cl-lib)
...@@ -203,33 +205,36 @@ If IS-MAYBE is t then maybe install these packages." ...@@ -203,33 +205,36 @@ If IS-MAYBE is t then maybe install these packages."
(add-hook 'prog-mode-hook #'yas-minor-mode) (add-hook 'prog-mode-hook #'yas-minor-mode)
:config :config
(add-hook 'prog-mode-hook 'yas-reload-all) (add-hook 'prog-mode-hook 'yas-reload-all)
;; (diminish 'yas-minor-mode)
:diminish yas-minor-mode :diminish yas-minor-mode
) )
;; Helm------------------------------------------------------------------------------------ ;; Helm------------------------------------------------------------------------------------
(let ((helm-pack-list (let ((helm-pack-list
'(helm helm-swoop helm-ebdb helm-xref helm-gtags helm-ls-git helm-projectile))) '(helm helm-swoop helm-ebdb helm-xref helm-gtags helm-ls-git
helm-dash helm-projectile)))
(install-pack-list helm-pack-list)) (install-pack-list helm-pack-list))
(require 'helm-xref) (require 'helm-xref)
(use-package helm (defun init-helm-dev ()
:init "Init helm."
(setq xref-show-xrefs-function 'helm-xref-show-xrefs) (use-package
;; (setq helm-autoresize-max-height 40) helm
;; (setq helm-autoresize-min-height 10) :init (setq xref-show-xrefs-function
:bind (("M-x" . #'helm-M-x) 'helm-xref-show-xrefs)
("C-x C-f" . #'helm-find-files) ;; (setq helm-autoresize-max-height 40)
("C-c f f" . #'helm-find-files) ;; (setq helm-autoresize-min-height 10)
("C-c f r" . 'helm-recentf) :bind (("M-x" . #'helm-M-x)
("C-c s s" . 'helm-swoop-without-pre-input) ("C-x C-f" . #'helm-find-files)
("C-c s r" . 'helm-swoop) ("C-c f f" . #'helm-find-files)
("C-x b" . 'helm-mini) ("C-c f r" . 'helm-recentf)
("C-c h i" . 'helm-semantic-or-imenu)) ("C-c s s" . 'helm-swoop-without-pre-input)
:config ("C-c s r" . 'helm-swoop)
(helm-mode 1) ("C-x b" . 'helm-mini)
:diminish helm-mode ("C-c h i" . 'helm-semantic-or-imenu)
;; (diminish 'helm-mode) ("C-c h f" . 'helm-flycheck))
) :config (helm-mode 1)
:diminish helm-mode))
(add-hook 'after-init-hook 'init-helm-dev)
;; Projectile------------------------------------------------------------------------ ;; Projectile------------------------------------------------------------------------
(defun init-project-dev () (defun init-project-dev ()
"Init." "Init."
...@@ -238,14 +243,13 @@ If IS-MAYBE is t then maybe install these packages." ...@@ -238,14 +243,13 @@ If IS-MAYBE is t then maybe install these packages."
:config :config
(projectile-mode +1) (projectile-mode +1)
(helm-projectile-on) (helm-projectile-on)
;; (diminish 'projectile-mode)
:diminish projectile-mode :diminish projectile-mode
:bind (("C-c p f" . 'helm-projectile-find-file) :bind (("C-c p f" . 'helm-projectile-find-file)
("C-c p h" . 'helm-projectile) ("C-c p h" . 'helm-projectile)
("C-c p p" . 'helm-projectile-switch-project)) ("C-c p p" . 'helm-projectile-switch-project))
) )
) )
(add-hook 'after-init-hook 'init-project-dev) (add-hook 'after-init-hook 'init-project-dev)
;; Version Control========================================================================= ;; Version Control=========================================================================
(let ((vc-pack-list (let ((vc-pack-list
...@@ -286,7 +290,7 @@ If IS-MAYBE is t then maybe install these packages." ...@@ -286,7 +290,7 @@ If IS-MAYBE is t then maybe install these packages."
(popwin-mode 1) (popwin-mode 1)
(add-to-list 'popwin:special-display-config (add-to-list 'popwin:special-display-config
'("*.*helm.**" :regexp t :position bottom)) '("*.*[Hh]elm.**" :regexp t :position bottom))
;; Set the mode line.--------------------------------------------------------------- ;; Set the mode line.---------------------------------------------------------------
(setq-default mode-line-format ;; set mode line (setq-default mode-line-format ;; set mode line
...@@ -315,7 +319,8 @@ If IS-MAYBE is t then maybe install these packages." ...@@ -315,7 +319,8 @@ If IS-MAYBE is t then maybe install these packages."
(let ((dim-list (let ((dim-list
;; minor modes list followed will not show in the mode line. ;; minor modes list followed will not show in the mode line.
'(abbrev-mode org-autolist-mode hs-minor-mode auto-revert-mode '(abbrev-mode org-autolist-mode hs-minor-mode auto-revert-mode
image-mode iimage-mode visual-line-mode eldoc-mode undo-tree-mode)) hs-minor-mode image-mode iimage-mode visual-line-mode
eldoc-mode undo-tree-mode))
) )
(dolist (list dim-list) (dolist (list dim-list)
(diminish list))) (diminish list)))
...@@ -493,6 +498,7 @@ If IS-MAYBE is t then maybe install these packages." ...@@ -493,6 +498,7 @@ If IS-MAYBE is t then maybe install these packages."
evil-goggles evil-iedit-state evil-indent-plus evil-lion evil-lisp-state evil-goggles evil-iedit-state evil-indent-plus evil-lion evil-lisp-state
evil-mc evil-nerd-commenter evil-matchit evil-numbers evil-surround evil-mc evil-nerd-commenter evil-matchit evil-numbers evil-surround
evil-tutor evil-tutor
evil-leader
;; (evil-unimpaired :location (recipe :fetcher local)) ;; (evil-unimpaired :location (recipe :fetcher local))
evil-visual-mark-mode evil-visual-mark-mode
evil-visualstar evil-visualstar
...@@ -505,7 +511,6 @@ If IS-MAYBE is t then maybe install these packages." ...@@ -505,7 +511,6 @@ If IS-MAYBE is t then maybe install these packages."
;;; Evil ;;; Evil
(require 'evil) (require 'evil)
(global-evil-leader-mode) (global-evil-leader-mode)
(evil-mode 1)
(evil-leader/set-leader "SPC") (evil-leader/set-leader "SPC")
(evil-leader/set-key (evil-leader/set-key
;;helm minibuffers------------------------- ;;helm minibuffers-------------------------
...@@ -516,6 +521,7 @@ If IS-MAYBE is t then maybe install these packages." ...@@ -516,6 +521,7 @@ If IS-MAYBE is t then maybe install these packages."
"s r" 'helm-swoop "s r" 'helm-swoop
"b b" 'helm-mini "b b" 'helm-mini
"h i" 'helm-semantic-or-imenu "h i" 'helm-semantic-or-imenu
"h f" 'helm-flycheck
;; magit----------------------------------- ;; magit-----------------------------------
"g s" 'magit-status "g s" 'magit-status
"g d" 'magit-diff-range "g d" 'magit-diff-range
...@@ -531,6 +537,7 @@ If IS-MAYBE is t then maybe install these packages." ...@@ -531,6 +537,7 @@ If IS-MAYBE is t then maybe install these packages."
;;youdao dict------------------------------ ;;youdao dict------------------------------
"o y" 'youdao-dictionary-search-at-point+ "o y" 'youdao-dictionary-search-at-point+
) )
(evil-mode 1)
;;; Org mode global keys ;;; Org mode global keys
;; (global-set-key "\C-cl" 'org-store-link) ;; (global-set-key "\C-cl" 'org-store-link)
...@@ -541,8 +548,7 @@ If IS-MAYBE is t then maybe install these packages." ...@@ -541,8 +548,7 @@ If IS-MAYBE is t then maybe install these packages."
;;==================================================================================== ;;====================================================================================
(when (file-exists-p custom-file)
(load custom-file))
;;TODO-------------------------------------------------------------------------------- ;;TODO--------------------------------------------------------------------------------
(require 'smex) (require 'smex)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment