-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpackages.el
186 lines (154 loc) · 4.37 KB
/
packages.el
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
; -- Setup use-package --
(require 'package)
(setq package-enable-at-startup nil)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
;; -- Theme --
(use-package almost-mono-themes
:ensure t
:if window-system
:config
(load-theme 'almost-mono-gray t))
;; -- Magit --
(use-package magit :ensure t
:init
(setq
magit-display-buffer-function #'magit-display-buffer-fullframe-status-v1
magit-diff-refine-hunk t
magit-popup-use-prefix-argument 'default
magit-last-seen-setup-instructions "1.4.0"
magit-log-margin '(t age-abbreviated magit-log-margin-width :author 15))
(when (not window-system)
(setq magit-section-visibility-indicator '("..." . t)))
:bind
(("C-x g" . magit-status)))
;; -- Move text --
(use-package move-text :ensure t
:bind
(("M-<up>" . move-text-up)
("M-<down>" . move-text-down)))
;; -- Doom modeline --
(use-package doom-modeline :ensure t
:custom
(doom-modeline-icon nil)
(doom-modeline-height 0)
(doom-modeline-bar-width 10)
:custom-face
(doom-modeline-bar ((nil)))
:init
(doom-modeline-mode 1))
;; -- Org babel restclient --
(use-package ob-restclient :ensure t)
;; -- Windresize --
(use-package windresize :ensure t)
;; -- Mutiple cursors --
(use-package multiple-cursors :ensure t
:bind
(("C-ä" . mc/mark-next-like-this)))
;; -- Expand region --
(use-package expand-region :ensure t
:bind
(("C-." . er/expand-region)
("C-," . er/contract-region)))
;; -- Unkillable scratch --
(use-package unkillable-scratch :ensure t
:config
(unkillable-scratch))
;; -- Git gutter --
(use-package git-gutter-fringe :ensure t
:if window-system
:init
(setq git-gutter:hide-gutter t)
:config
(global-git-gutter-mode +1))
(use-package git-gutter
:ensure t
:if window-system)
;; -- Twittering mode --
(use-package twittering-mode :ensure t)
;; -- Restclient --
(use-package restclient :ensure t)
;; -- Projectile --
(use-package projectile :ensure t
:init
(setq projectile-switch-project-action
(lambda () (magit-status (projectile-project-root))))
:bind
("M-ä" . projectile-run-eshell)
:config
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
(projectile-global-mode))
;; -- Autopair --
(use-package autopair :ensure t
:hook (prog-mode . autopair-mode))
;; -- Ido mode --
(use-package ido-vertical-mode :ensure t
:init
(setq ido-enable-flex-matching t
ido-everywhere t
ido-vertical-define-keys 'C-n-C-p-up-and-down
ido-auto-merge-work-directories-length -1)
:config
(ido-mode t)
(ido-vertical-mode 1))
(use-package ido-complete-space-or-hyphen :ensure t)
(use-package smex :ensure t
:bind
(("M-x" . smex)))
;; -- Ediff --
(use-package ediff
:config
(progn
(setq ediff-split-window-function 'split-window-horizontally)))
;; -- Gdscript mode --
(use-package gdscript-mode :ensure t)
;; -- Duplicate things
(use-package duplicate-thing :ensure t
:bind
(("M-c" . duplicate-thing)))
;; -- Neotree --
(use-package neotree :ensure t
:init
(setq neo-window-fixed-size nil
neo-theme (if (display-graphic-p) 'icons 'arrow)
neo-show-updir-line nil
neo-modern-sidebar t
neo-auto-indent-point t
neo-cwd-line-style 'button)
:config
(add-to-list
'window-size-change-functions
(lambda (frame)
(let ((neo-window (neo-global--get-window)))
(unless (null neo-window)
(setq neo-window-width (window-width neo-window))))))
(defun neotree-project-dir-toggle ()
"Open NeoTree using the project root, using find-file-in-project,
or the current buffer directory."
(interactive)
(let ((project-dir
(ignore-errors
;;; Pick one: projectile or find-file-in-project
(projectile-project-root)
;;(ffip-project-root)
))
(file-name (buffer-file-name))
(neo-smart-open t))
(if (and (fboundp 'neo-global--window-exists-p)
(neo-global--window-exists-p))
(neotree-hide)
(progn
(neotree-show)
(if project-dir
(neotree-dir project-dir))
(if file-name
(neotree-find file-name))))))
:bind
(("M-ö" . neotree-project-dir-toggle)))
;; -- Yaml mode --
(use-package yaml-mode
:ensure t
:hook ((yaml-mode . whitespace-mode)))