summary refs log tree commit diff
path: root/emacs.d/core/core-editor.el
blob: ae138bc834e2a63baff522870a485cd257eb84b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
(use-package swiper
  :ensure t
  :bind (("C-s"   . swiper))
  :config
  (setq ivy-use-virtual-buffers t)
  (ivy-mode))

(use-package counsel
  :ensure t
  :config
  (setq counsel-find-file-at-point t))

(use-package helm
  :ensure t)

(when (memq window-system '(mac ns x))
  (use-package exec-path-from-shell
    :ensure t
    :init (setq exec-path-from-shell-debug +1)
    :config
    (exec-path-from-shell-initialize)
    (exec-path-from-shell-copy-envs '("TMPDIR"))))

(use-package dired
  :commands dired
  :init
  (setq dired-listing-switches "-laGhv"))

(use-package ag
  :ensure t
  :defer t)

(use-package smartparens
  :ensure t
  :config
  (progn
    (require 'smartparens-config)
    (smartparens-global-mode 1)
    (setq sp-show-pair-delay 0)
    (setq sp-autoinsert-if-followed-by-word nil)
    (show-smartparens-global-mode t)
    (bind-keys :map sp-keymap
               ("C-M-d" . sp-down-sexp)
               ("C-M-a" . sp-backward-down-sexp)
               ("C-S-a" . sp-beginning-of-sexp)
               ("C-S-e" . sp-end-of-sexp)
               ("C-M-f" . sp-forward-sexp)
               ("C-M-b" . sp-backward-sexp)
               ("C-M-u" . sp-backward-up-sexp)
               ("C-M-t" . sp-transpose-sexp)
               ("C-M-n" . sp-next-sexp)
               ("C-M-p" . sp-previous-sexp)
               ("C-M-k" . sp-kill-sexp)
               ("C-M-w" . sp-copy-sexp)
               ("M-<delete>" . sp-unwrap-sexp)
               ("M-<backspace>". sp-backward-unwrap-sexp)
               ("M-<right>" . sp-forward-slurp-sexp)
               ("M-<left>" . sp-forward-barf-sexp)
               ("M-S-<left>" . sp-backward-slurp-sexp)
               ("M-S-<right>" . sp-backward-barf-sexp)
               ("M-d" . sp-splice-sexp))))

(use-package projectile
  :ensure t
  :bind ("s-p" . projectile-command-map)
  :init
  (setq projectile-enable-caching t)
  (setq projectile-completion-system 'ivy)
  :config
  (projectile-global-mode))

(use-package server
  :config
  (unless (server-running-p)
    (server-start)))

(provide 'core-editor)