Advertisement
Guest User

Untitled

a guest
Nov 25th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.57 KB | None | 0 0
  1. #+STARTUP: overview
  2.  
  3. * Interface tweaks
  4. #+BEGIN_SRC emacs-lisp
  5. ;; UTF-8 encoding
  6. (prefer-coding-system 'utf-8)
  7. ;; Set "yes or no" commands to "y or n"
  8. (fset 'yes-or-no-p 'y-or-n-p)
  9. ;; Getting rid of startup screen
  10. (setq inhibit-startup-screen t)
  11. ;; Changing line-break behavior
  12. (global-visual-line-mode 1)
  13. (global-hl-line-mode t)
  14. ;; Spell-check
  15. (setq-default ispell-program-name "aspell")
  16. ;; Changing default font size
  17. (set-frame-font "Source Code Pro 13" nil t)
  18. ;; Get rid of tabs in favor of spaces (mostly for highlight-indentation mode)
  19. (setq-default indent-tabs-mode nil)
  20. ;; Surround selection with these pairs
  21. (global-set-key (kbd "M-[") 'insert-pair)
  22. (global-set-key (kbd "M-{") 'insert-pair)
  23. (global-set-key (kbd "M-\"") 'insert-pair)
  24. (vc-mode -1)
  25. #+END_SRC
  26. * All the icons
  27. #+BEGIN_SRC emacs-lisp
  28. (use-package all-the-icons ;
  29. :ensure t)
  30. #+END_SRC
  31. * Ace-window
  32. #+BEGIN_SRC emacs-lisp
  33. ;; Easy window switching
  34. (use-package ace-window
  35. :ensure t
  36. :init ;
  37. (progn
  38. (global-set-key (kbd "M-o") 'ace-window))
  39. (setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)))
  40. #+END_SRC
  41. * Aggressive indent
  42. #+BEGIN_SRC emacs-lisp
  43. (use-package aggressive-indent
  44. :ensure t
  45. :diminish
  46. :config
  47. (global-aggressive-indent-mode 1)
  48. (add-to-list 'aggressive-indent-excluded-modes 'html-mode))
  49. #+END_SRC
  50. * AucTeX
  51. #+BEGIN_SRC emacs-lisp
  52. (use-package auctex ;
  53. :defer t
  54. :ensure t
  55. :init
  56. (progn
  57. (setq TeX-auto-save t
  58. TeX-parse-self t
  59. TeX-save-query nil
  60. TeX-PDF-mode t))
  61. (setq TeX-view-program-selection '((output-pdf "PDF Tools"))))
  62.  
  63. ;; Initializing SyncTeX and inhibiting startup message
  64. (setq TeX-source-correlate-mode t)
  65. (setq TeX-source-correlate-method 'synctex)
  66. (setq TeX-source-correlate-start-server t)
  67.  
  68. ;; Adding RefTeX
  69. (require 'reftex)
  70. (setq reftex-plug-into-AUCTeX t)
  71. (add-hook 'LaTeX-mode-hook 'turn-on-reftex)
  72. #+END_SRC
  73. * Auto-update
  74. #+BEGIN_SRC emacs-lisp
  75. (use-package auto-package-update ;
  76. :ensure t
  77. :config
  78. (setq auto-package-update-delete-old-versions t
  79. auto-package-update-interval 5)
  80. (auto-package-update-maybe))
  81. #+END_SRC
  82. * Better Defaults
  83. #+BEGIN_SRC emacs-lisp
  84. (use-package better-defaults ;
  85. :ensure t
  86. :config
  87. ;; Turn off ido mode in case I enabled it accidentally
  88. (ido-mode -1))
  89. #+END_SRC
  90. * Company
  91. #+BEGIN_SRC emacs-lisp
  92. ;; Autocompletion for words
  93. (use-package company
  94. :ensure t
  95. :config
  96. (global-company-mode)
  97. :custom
  98. (company-idle-delay .2)
  99. (company-minimum-prefix-length 2)
  100. (company-show-numbers t)
  101. (company-tooltip-align-annotations 't))
  102.  
  103. ;; Adding company for AucTeX
  104. (use-package company-auctex
  105. :ensure t
  106. :after
  107. (auctex company)
  108. :config
  109. (company-auctex-init))
  110.  
  111. (use-package company-quickhelp
  112. :ensure t
  113. :config
  114. (company-quickhelp-mode)
  115. '(company-quickhelp-delay 0.3)
  116. '(company-quickhelp-use-propertized-text 't))
  117.  
  118. ;; Company for Jedi
  119. (use-package company-jedi
  120. :ensure t
  121. :defer t)
  122.  
  123. ;; Company for C
  124. (use-package company-irony
  125. :ensure t
  126. :defer t)
  127.  
  128. #+END_SRC
  129. * Centered Cursor Mode
  130. #+BEGIN_SRC emacs-lisp
  131. (use-package centered-cursor-mode
  132. :ensure t)
  133. #+END_SRC
  134.  
  135. * Diminish
  136. #+BEGIN_SRC emacs-lisp
  137. ;; Use minor modes without them appearing on the mode-line
  138. (use-package diminish
  139. :ensure t
  140. :config
  141. (diminish 'auto-revert-mode)
  142. (diminish 'visual-line-mode))
  143. #+END_SRC
  144. * Evil
  145. #+BEGIN_SRC emacs-lisp
  146. (use-package evil ;
  147. :ensure t
  148. :diminish undo-tree-mode
  149. :init
  150. (setq evil-want-keybinding 'nil)
  151. :config
  152. (define-key evil-motion-state-map "j" 'evil-next-visual-line)
  153. (define-key evil-motion-state-map "k" 'evil-previous-visual-line)
  154. (define-key evil-motion-state-map (kbd "SPC") nil) ;; Unbinding space key to use in general config
  155. (define-key evil-normal-state-map "/" 'swiper) ;; Change evil search to swiper
  156. (define-key evil-motion-state-map "/" 'swiper)
  157. (evil-mode 1))
  158. ;; Add global keyboard shortcut to activate evil mode
  159. ;; (global-set-key (kbd "C-z") 'evil-mode)
  160.  
  161. ;; Bind everything to Evil that hasn't already been binded
  162. (use-package evil-collection
  163. :ensure t
  164. :config
  165. (evil-collection-init))
  166. #+END_SRC
  167. * Elpy
  168. #+BEGIN_SRC emacs-lisp
  169. ;; Python extension for emacs
  170. (use-package elpy
  171. :ensure t
  172. :config
  173. (elpy-enable))
  174. #+END_SRC
  175. * Exec-path-from-shell
  176. #+BEGIN_SRC emacs-lisp
  177. ;; A GNU Emacs library to ensure environment variables inside Emacs look the same as in the user's shell. (for use-package ensure-system-package)
  178. (use-package exec-path-from-shell
  179. :ensure t
  180. :config
  181. (when (memq window-system '(mac ns x))
  182. (exec-path-from-shell-initialize)))
  183.  
  184. (use-package use-package-ensure-system-package
  185. :ensure t)
  186. #+END_SRC
  187. * Expand region
  188. #+BEGIN_SRC emacs-lisp
  189. (use-package expand-region
  190. :ensure t
  191. :config
  192. (global-set-key (kbd "C-=") 'er/expand-region))
  193. #+END_SRC
  194. * Eyebrowse
  195. #+BEGIN_SRC emacs-lisp
  196. ;; Save window configurations
  197. (use-package eyebrowse
  198. :ensure t
  199. :diminish eyebrows-mode
  200. :config
  201. (eyebrowse-mode t)
  202. (eyebrowse-setup-opinionated-keys))
  203. #+END_SRC
  204. * Fancy Battery
  205. #+BEGIN_SRC emacs-lisp
  206. (use-package fancy-battery
  207. :ensure t
  208. :config
  209. (fancy-battery-mode 1))
  210. #+END_SRC
  211. * Flycheck
  212. #+BEGIN_SRC emacs-lisp
  213. ;; Syntax checker
  214. (use-package flycheck
  215. :ensure t
  216. :diminish
  217. :config
  218. (global-flycheck-mode))
  219. #+END_SRC
  220. * Flyspell-correct
  221. #+BEGIN_SRC emacs-lisp
  222. ;; Adding flyspell as spell-checker
  223. (use-package flyspell
  224. :ensure t
  225. :defer t
  226. :diminish
  227. :init
  228. (progn
  229. (add-hook 'prog-mode-hook 'flyspell-prog-mode)
  230. (add-hook 'text-mode-hook 'flyspell-mode)
  231. (add-hook 'LaTeX-mode-hook 'flyspell-mode)))
  232.  
  233. (use-package flyspell-correct-ivy
  234. :ensure t
  235. :config
  236. (define-key flyspell-mode-map (kbd "C-;") 'flyspell-correct-previous-word-generic))
  237. ;; Adding keyboard shortcuts to activate flyspell
  238. (global-set-key (kbd "<f8>") 'ispell-word)
  239. (global-set-key (kbd "C-<f8>") 'flyspell-mode)
  240. #+END_SRC
  241. * Fontawesome
  242. #+BEGIN_SRC emacs-lisp
  243. ;; Adding fontawesome icons
  244. (use-package fontawesome
  245. :ensure t)
  246. #+END_SRC
  247. * Golden Ratio
  248. #+BEGIN_SRC emacs-lisp
  249. ;; Focuses working window and makes it easier to work in
  250. (use-package golden-ratio
  251. :ensure t
  252. :diminish
  253. :config
  254. (require 'golden-ratio)
  255. (golden-ratio-mode 1)
  256. ;; Fix golden ratio mode to work with ace-window
  257. (add-to-list 'golden-ratio-extra-commands 'ace-window)
  258. (setq golden-ratio-auto-scale t))
  259. #+END_SRC
  260. * General
  261. #+BEGIN_SRC emacs-lisp
  262. ;; Allows for a leader key (similar to spacemacs)
  263. (use-package general
  264. :ensure t
  265. :config
  266. (general-evil-setup t)
  267. (general-define-key
  268. :states '(normal insert emacs motion)
  269. :prefix "SPC"
  270. :non-normal-prefix "C-SPC"
  271. "C-r" 'restart-emacs
  272. "C-s" 'save-some-buffers
  273. "0" 'delete-window
  274. "1" 'delete-other-windows
  275. "2" 'split-window-below
  276. "3" 'split-window-right
  277. "b" 'switch-to-buffer
  278. "d" 'dired
  279. "e" 'eval-last-sexp
  280. "f" 'counsel-find-file
  281. "g" 'magit-status
  282. "h" 'mark-whole-buffer
  283. "k" 'kill-buffer
  284. ;; "m" 'mu4e
  285. "s" 'save-buffer))
  286. #+END_SRC
  287. * Gitignore mode
  288. #+BEGIN_SRC emacs-lisp
  289. ;; Major mode for editing gitignore files
  290. (use-package gitignore-mode
  291. :ensure t)
  292. #+END_SRC
  293. * Highlight-indent-guides
  294. #+BEGIN_SRC emacs-lisp
  295. (use-package highlight-indent-guides
  296. :ensure t
  297. :diminish
  298. :config
  299. (add-hook 'prog-mode-hook 'highlight-indent-guides-mode)
  300. (add-hook 'org-mode-hook 'highlight-indent-guides-mode)
  301. (setq highlight-indent-guides-delay 0))
  302.  
  303. ;; Don't show first column indicator
  304. (defun my-highlighter (level responsive display)
  305. (if (> 1 level)
  306. nil
  307. (highlight-indent-guides--highlighter-default level responsive display)))
  308.  
  309. (setq highlight-indent-guides-highlighter-function 'my-highlighter)
  310. #+END_SRC
  311. * Hydra
  312. #+BEGIN_SRC emacs-lisp
  313. (use-package hydra
  314. :ensure t)
  315.  
  316. ;; Org mode hydra
  317. #+END_SRC
  318. * Irony
  319. # A mode for writing c++
  320. #+BEGIN_SRC emacs-lisp
  321. (use-package irony ;
  322. :ensure t
  323. :config
  324. (add-hook 'c++-mode-hook 'irony-mode)
  325. (add-hook 'c-mode-hook 'irony-mode)
  326. (add-hook 'objc-mode-hook 'irony-mode)
  327. (add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options))
  328. #+END_SRC
  329. * Ivy / Counsel / Swiper
  330. #+BEGIN_SRC emacs-lisp
  331. ;; Auto-completion mechanism
  332. (use-package ivy
  333. :ensure t
  334. :diminish
  335. :config
  336. (setq ivy-use-virtual-buffers t
  337. ivy-count-format "%d/%d ")
  338. (ivy-mode 1)
  339. (global-set-key (kbd "C-s") 'swiper)
  340. (global-set-key (kbd "<f2> u") 'counsel-unicode-char)
  341. (global-set-key (kbd "C-c g") 'counsel-git)
  342. (global-set-key (kbd "C-c j") 'counsel-git-grep)
  343. (global-set-key (kbd "C-c k") 'counsel-ag)
  344. (global-set-key (kbd "C-x l") 'counsel-locate)
  345. (global-set-key (kbd "C-S-o") 'counsel-rhythmbox)
  346. (define-key minibuffer-local-map (kbd "C-r") 'counsel-minibuffer-history))
  347. ;; Gives extra details when using ivy
  348. (use-package ivy-rich
  349. :ensure t
  350. :config
  351. (setq ivy-rich-path-style 'abbrev)
  352. (setq ivy-virtual-abbreviate 'full
  353. ivy-rich-switch-buffer-align-virtual-buffer t)
  354. (ivy-rich-mode 1))
  355. ;; Ensures that all lists are used with ivy
  356. (use-package counsel
  357. :ensure t
  358. :diminish
  359. :config
  360. (counsel-mode))
  361. ;; A replacement for emacs' default search
  362. (use-package swiper
  363. :ensure t)
  364. #+END_SRC
  365. * Java
  366. #+BEGIN_SRC emacs-lisp
  367. (use-package java-snippets
  368. :ensure t)
  369. #+END_SRC
  370. * Linum-relative
  371. #+BEGIN_SRC emacs-lisp
  372. ;; Adding relative line numbers
  373. (use-package linum-relative
  374. :ensure t
  375. :diminish
  376. :config
  377. (require 'linum-relative)
  378. (linum-relative-global-mode)
  379. ;; Sets symbol of focused line to current line number
  380. (setq linum-relative-current-symbol ""))
  381. #+END_SRC
  382. * Magit
  383. #+BEGIN_SRC emacs-lisp
  384. ;; Git porcelain inside emacs
  385. (use-package magit
  386. :ensure t
  387. :init
  388. (global-set-key (kbd "C-x g") 'magit-status))
  389.  
  390. (use-package evil-magit
  391. :ensure t)
  392. #+END_SRC
  393. * Meghanada
  394. #+BEGIN_SRC emacs-lisp
  395. (use-package meghanada
  396. :ensure t
  397. :if (executable-find "java")
  398. :config
  399. (add-hook 'java-mode-hook (lambda ()
  400. (meghanada-mode t))))
  401. #+END_SRC
  402. * Mode Line
  403. #+BEGIN_SRC emacs-lisp
  404. (use-package mode-icons ;
  405. :ensure t
  406. :config
  407. (mode-icons-mode))
  408.  
  409. ;; Changing the mode-line to look better
  410. (use-package powerline
  411. :ensure t
  412. :config
  413. (require 'powerline)
  414. (powerline-default-theme))
  415.  
  416. ;; Spacemacs stuff
  417. (use-package spaceline
  418. :ensure t
  419. :config
  420. (require 'spaceline-config)
  421. (spaceline-spacemacs-theme))
  422.  
  423. ;; Change icons for modes in mode-line
  424. (use-package delight
  425. :ensure t)
  426. #+END_SRC
  427. * Mu4e
  428. #+BEGIN_SRC emacs-lisp
  429. ;; email client
  430. ;; (use-package mu4e
  431. ;; :ensure nil
  432. ;; :ensure-system-package mu
  433. ;; :config
  434. ;; (require 'mu4e-contrib)
  435. ;; (add-to-list 'mu4e-view-actions '("view in browser" . mu4e-action-view-in-browser))
  436. ;; (setq mail-user-agent 'mu4e-user-agent)
  437. ;; (defvaralias 'mu4e-compose-signature 'message-signature)
  438. ;; :delight 
  439. ;; :custom
  440. ;; (setq
  441. ;; user-mail-address "lucasl2000@gmail.com"
  442. ;; user-full-name "Lucas Liseth")
  443. ;; (mu4e-attachment-dir "~/Downloads")
  444. ;; (mu4e-compose-signature-auto-include nil)
  445. ;; (mu4e-drafts-folder "/personal/Drafts")
  446. ;; (mu4e-get-mail-command "mbsync -a")
  447. ;; (mu4e-maildir "~/Maildir/personal")
  448. ;; (mu4e-refile-folder "/personal/Archive")
  449. ;; (mu4e-sent-folder "/personal/Sent Mail")
  450. ;; (mu4e-maildir-shortcuts
  451. ;; '(("/personal/Inbox/" . ?i)
  452. ;; ("/personal/[Gmail]//All Mail" . ?a)
  453. ;; ("/personal/[Gmail]/Deleted Items" . ?d)
  454. ;; ("/personal/[Gmail]/Drafts" . ?D)
  455. ;; ("/personal/[Gmail]/Important" . ?I)
  456. ;; ("/personal/[Gmail]/Sent Mail" . ?s)
  457. ;; ("/personal/[Gmail]//Starred" . ?S)))
  458. ;; (mu4e-trash-folder "/personal/Trash")
  459. ;; (mu4e-update-interval 300)
  460. ;; (mu4e-use-fancy-chars t)
  461. ;; (mu4e-view-show-addresses t)
  462. ;; (mu4e-view-show-images t))
  463.  
  464. ;; (use-package mu4e-alert
  465. ;; :ensure t
  466. ;; :config
  467. ;; (mu4e-alert-enable-notifications)
  468. ;; (add-hook 'after-init-hook #'mu4e-alert-enable-mode-line-display)
  469. ;; (mu4e-alert-set-default-style 'libnotify)
  470. ;; (add-hook 'after-init-hook #'mu4e-alert-enable-notifications))
  471. #+END_SRC
  472. * Org
  473. #+BEGIN_SRC emacs-lisp
  474. (use-package org-bullets
  475. :ensure t
  476. :config
  477. (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
  478. ;; Setting default org capture location
  479. (setq org-default-notes-file (concat org-directory "~/gtd/inbox.org")) ;
  480.  
  481. ;; Adding capture templates to inbox and tickler file
  482. (setq org-capture-templates '(("t" "Todo [inbox]" entry
  483. (file+headline "~/gtd/inbox.org" "Tasks")
  484. "* TODO %i%?")
  485. ("T" "Tickler" entry
  486. (file+headline "~/gtd/tickler.org" "Tickler")
  487. "* %i%? \n %U")))
  488. ;; Adding files to agenda view (someday file won't show)
  489. (setq org-agenda-files '("~/gtd/inbox.org"
  490. "~/gtd/gtd.org"
  491. "~/gtd/tickler.org"))
  492. ;; Adding completion states
  493. (setq org-todo-keywords '((sequence "TODO(t)" "WAITING(w)" "|" "DONE(d)" "CANCELLED(c)")))
  494.  
  495. ;; Adding refile targets
  496. (setq org-refile-targets '(("~/gtd/gtd.org" :maxlevel . 3)
  497. ("~/gtd/someday.org" :level . 1)
  498. ("~/gtd/tickler.org" :maxlevel . 2)))
  499.  
  500.  
  501.  
  502. ;; Adding recommended global keyboard shorcuts
  503. (global-set-key "\C-cl" 'org-store-link)
  504. (global-set-key "\C-ca" 'org-agenda)
  505. (global-set-key "\C-cc" 'org-capture)
  506. (global-set-key "\C-cb" 'org-switchb)
  507. #+END_SRC
  508.  
  509. #+RESULTS:
  510. : org-switchb
  511.  
  512. * PDF-Tools
  513. #+BEGIN_SRC emacs-lisp
  514. (use-package pdf-tools ;
  515. :ensure t
  516. :config
  517. (add-hook 'pdf-view-mode-hook (lambda()
  518. "disables these modes so pdf-tools can actually work"(linum-mode -1) (linum-relative-mode -1)
  519. (local-unset-key (kbd "k"))
  520. (local-set-key (kbd "k") 'pdf-view-scroll-down-or-previous-page)
  521. (local-set-key (kbd "j") 'pdf-view-scroll-up-or-next-page)))
  522. (pdf-tools-install))
  523. #+END_SRC
  524. * Projectile
  525. #+BEGIN_SRC emacs-lisp
  526. ;; Project support
  527. (use-package projectile
  528. :ensure t
  529. :diminish
  530. :config
  531. (projectile-global-mode)
  532. (projectile-mode +1)
  533. (define-key projectile-mode-map (kbd "s-p") 'projectile-command-map)
  534. (define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
  535. (setq projectile-completion-system 'ivy))
  536.  
  537. ;; Adding ivy completion to projectile
  538. (use-package counsel-projectile
  539. :ensure t
  540. :config
  541. (counsel-projectile-mode))
  542. #+END_SRC
  543. * Pos-tip
  544. #+BEGIN_SRC emacs-lisp
  545. (use-package pos-tip ;
  546. :ensure t
  547. :config
  548. '(pos-tip-border-width 0))
  549. #+END_SRC
  550. * Rainbow Mode
  551. #+BEGIN_SRC emacs-lisp
  552. (use-package rainbow-mode ;
  553. :ensure t)
  554. #+END_SRC
  555. * Restart
  556. #+BEGIN_SRC emacs-lisp
  557. (use-package restart-emacs
  558. :ensure t)
  559. #+END_SRC
  560. * Smartparens
  561. #+BEGIN_SRC emacs-lisp
  562. (use-package smartparens
  563. :ensure t
  564. :diminish
  565. :config
  566. (require 'smartparens-config)
  567. (smartparens-global-strict-mode 1))
  568. #+END_SRC
  569. * Themes
  570. #+BEGIN_SRC emacs-lisp
  571. ;; Match the rest of the user interface
  572. ;; (use-package xresources-theme
  573. ;; :ensure t)
  574.  
  575. ;; MMMMM solarized
  576. ;; (use-package solarized-theme
  577. ;; :ensure t
  578. ;; :init
  579. ;; (load-theme 'solarized-dark t)
  580. ;; :config
  581. ;; (setq x-underline-at-descent-line t))
  582.  
  583. ;; Zenburn (really nice)
  584. (use-package zenburn-theme
  585. :ensure t
  586. :config
  587. (load-theme 'zenburn))
  588.  
  589. ;; Spacemacs (tasty)
  590. ;; (use-package spacemacs-theme
  591. ;; :defer t
  592. ;; :init (load-theme 'spacemacs-dark t))
  593.  
  594. ;; Beautiful nordic color scheme
  595. ;; (use-package nord-theme
  596. ;; :ensure t
  597. ;; :config
  598. ;; (add-to-list 'custom-theme-load-path (expand-file-name "~/.emacs.d/themes/"))
  599. ;; (setq nord-region-highlight "snowstorm")
  600. ;; (load-theme 'nord t))
  601. #+END_SRC
  602. * Treemacs
  603. #+BEGIN_SRC emacs-lisp
  604. ;; Atom-like file tree to emacs
  605. (use-package treemacs
  606. :ensure t
  607. :defer t
  608. :init
  609. (with-eval-after-load 'winum
  610. (define-key winum-keymap (kbd "M-0") #'treemacs-select-window))
  611. :config
  612. (progn
  613. (setq treemacs-collapse-dirs (if (executable-find "python") 3 0)
  614. treemacs-deferred-git-apply-delay 0.5
  615. treemacs-file-event-delay 5000
  616. treemacs-file-follow-delay 0.2
  617. treemacs-follow-after-init t
  618. treemacs-follow-recenter-distance 0.1
  619. treemacs-goto-tag-strategy 'refetch-index
  620. treemacs-indentation 2
  621. treemacs-indentation-string " "
  622. treemacs-is-never-other-window nil
  623. treemacs-no-png-images nil
  624. treemacs-project-follow-cleanup nil
  625. treemacs-persist-file (expand-file-name ".cache/treemacs-persist" user-emacs-directory)
  626. treemacs-recenter-after-file-follow nil
  627. treemacs-recenter-after-tag-follow nil
  628. treemacs-show-hidden-files t
  629. treemacs-silent-filewatch nil
  630. treemacs-silent-refresh nil
  631. treemacs-sorting 'alphabetic-desc
  632. treemacs-space-between-root-nodes t
  633. treemacs-tag-follow-cleanup t
  634. treemacs-tag-follow-delay 1.5
  635. treemacs-width 30)
  636. ;; The default width and height of the icons is 22 pixels. If you are
  637. ;; using a Hi-DPI display, uncomment this to double the icon size.
  638. ;;(treemacs-resize-icons 44)
  639. (treemacs-follow-mode t)
  640. (treemacs-filewatch-mode t)
  641. (treemacs-fringe-indicator-mode t)
  642. (pcase (cons (not (null (executable-find "git")))
  643. (not (null (executable-find "python3"))))
  644. (`(t . _)
  645. (treemacs-git-mode 'simple))))
  646. (add-to-list 'treemacs-pre-file-insert-predicates #'treemacs-is-file-git-ignored?)
  647. :bind
  648. (:map global-map
  649. ("M-0" . treemacs-select-window)
  650. ("C-x t 1" . treemacs-delete-other-windows)
  651. ("C-x t t" . treemacs)
  652. ("C-x t B" . treemacs-bookmark)
  653. ("C-x t C-t" . treemacs-find-file)
  654. ("C-x t M-t" . treemacs-find-tag)))
  655. ;; Adding evil keybindings to treemacs
  656. (use-package treemacs-evil
  657. :after treemacs evil
  658. :ensure t)
  659. ;; Adding projectile integration to treemacs
  660. (use-package treemacs-projectile
  661. :after treemacs projectile
  662. :ensure t)
  663. #+END_SRC
  664. * Undo-tree
  665. #+BEGIN_SRC emacs-lisp
  666. ;; Allows visualization of undo commands
  667. (use-package undo-tree
  668. :defer 2
  669. :init
  670. (global-undo-tree-mode))
  671. #+END_SRC
  672. * Which-key
  673. #+BEGIN_SRC emacs-lisp
  674. ;; Brings up a help menu with suggested actions
  675. (use-package which-key
  676. :ensure t
  677. :diminish
  678. :config
  679. (which-key-mode))
  680. #+END_SRC
  681. * Writeroom-mode
  682. #+BEGIN_SRC emacs-lisp
  683. ;; Distraction free writing
  684. (use-package writeroom-mode
  685. :ensure t)
  686. #+END_SRC
  687. * Yasnippet
  688. #+BEGIN_SRC emacs-lisp
  689. (use-package yasnippet ;
  690. :ensure t
  691. :config
  692. (yas-global-mode 1))
  693. ;;
  694. ;; Adding premade snippets
  695. (use-package yasnippet-snippets
  696. :ensure t)
  697. #+END_SRC
  698. * Miscellaneous
  699. #+BEGIN_SRC emacs-lisp
  700. (with-eval-after-load 'company
  701. (define-key company-active-map (kbd "<return>") 'company-complete-selection)
  702. (define-key company-active-map (kbd "RET") 'company-complete-selection))
  703.  
  704. ;; Load gtd and agenda and set it to the first to the first workspace
  705. (add-hook 'after-init-hook (find-file "~/gtd/gtd.org"))
  706. (add-hook 'after-init-hook 'org-agenda-list)
  707. #+END_SRC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement