My emacs configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

154 lines
4.4 KiB

4 years ago
  1. ;;; My basic configuration Gerardo Marx 15/Jul/2020
  2. ;;--------
  3. ;; Melpa repository:
  4. (require 'package)
  5. (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
  6. (package-initialize)
  7. ;; use-package
  8. (unless (package-installed-p 'use-package)
  9. (package-refresh-contents)
  10. (package-install 'use-package))
  11. ;; which-key:
  12. (use-package which-key
  13. :ensure t
  14. :config (which-key-mode))
  15. ;; doom-themes
  16. (use-package doom-themes
  17. :ensure t
  18. :config
  19. (load-theme 'doom-one t)
  20. ;; Enable flashing mode-line on errors
  21. (doom-themes-visual-bell-config)
  22. ;; Enable custom neotree theme (all-the-icons must be installed!)
  23. (doom-themes-neotree-config)
  24. ;; or for treemacs users
  25. (setq doom-themes-treemacs-theme "doom-colors") ; use the colorful treemacs theme
  26. (doom-themes-treemacs-config)
  27. ;; Corrects (and improves) org-mode's native fontification.
  28. (doom-themes-org-config))
  29. ;; modeline
  30. (use-package doom-modeline
  31. :ensure t
  32. :init (doom-modeline-mode 1))
  33. ;; icons:
  34. (use-package all-the-icons
  35. :ensure t) ;; --> you need this M-x all-the-icons-install-fonts
  36. ;; startup config
  37. (setq inhibit-startup-message t) ;;inhibit startup
  38. (tool-bar-mode -1)
  39. (menu-bar-mode -1)
  40. (global-hl-line-mode +1) ;; highlith current line
  41. (delete-selection-mode +1) ;; deletes selected text and replace it
  42. (scroll-bar-mode -1)
  43. (setq ns-right-alternate-modifier nil) ;; right option macos key enable
  44. (setq backup-directory-alis '(("." . "~/.saves"))) ;; a backup dir to store no saved files
  45. (add-hook 'prog-mode-hook 'display-line-numbers-mode) ;; display line number when programming
  46. (show-paren-mode +1) ;; show matching parentheses
  47. ;; helm package:
  48. (use-package helm
  49. :ensure t
  50. :config (helm-mode t))
  51. ;; projectile:
  52. (use-package projectile
  53. :ensure t
  54. :config
  55. (define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
  56. (projectile-mode t))
  57. ;; helm-projectile:
  58. (use-package helm-projectile
  59. :ensure t
  60. :init
  61. (progn
  62. (require 'tramp)
  63. )
  64. :config (helm-projectile-on))
  65. ;; temp:
  66. (setq ido-enable-flex-matching t)
  67. ;; dash-board:
  68. (use-package dashboard
  69. :ensure t
  70. :init
  71. (progn
  72. (setq dashboard-items '((recents . 5)
  73. (bookmarks . 5)
  74. (projects . 5)
  75. (agenda . 5)))
  76. (setq dashboard-banner-logo-title "Welcome gMarx")
  77. (setq dashboard-set-file-icons t)
  78. (setq dashboard-set-init-info t)
  79. (add-to-list 'dashboard-items '(agenda) t)
  80. (setq dashboard-startup-banner 'logo)
  81. )
  82. :config
  83. (dashboard-setup-startup-hook))
  84. ;; treemacs
  85. (use-package treemacs
  86. :ensure t
  87. :init
  88. (with-eval-after-load 'winum
  89. (define-key winum-keymap (kbd "M-0") #'treemacs-select-window))
  90. :config
  91. (progn
  92. (setq treemacs-is-never-other-window t)
  93. (setq treemacs-width 35))
  94. :bind
  95. (:map global-map
  96. ("M-0" . treemacs-select-window)
  97. ("C-x t t" . treemacs)))
  98. ;; treemacs-projectile
  99. (use-package treemacs-projectile
  100. :after treemacs projectile
  101. :ensure t)
  102. ;; magit
  103. (use-package magit
  104. :ensure t)
  105. ;; latex
  106. (use-package tex
  107. :ensure auctex)
  108. ;; flycheck
  109. (use-package flycheck
  110. :ensure t
  111. :init (global-flycheck-mode))
  112. ;; expand region
  113. (use-package expand-region
  114. :ensure t
  115. :bind
  116. ("C-=" . er/expand-region)
  117. ("C--" . er/contract-region))
  118. ;; org-bullets
  119. (use-package org-bullets
  120. :ensure t
  121. :init
  122. (setq org-support-shift-select t)
  123. :config
  124. (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
  125. ;; Company-mode
  126. (use-package company
  127. :ensure t
  128. :init
  129. (add-hook 'after-init-hook 'global-company-mode))
  130. ;; aspell
  131. ;; Set default font:
  132. (add-to-list 'default-frame-alist
  133. '(font . "Source Code Pro-18"))
  134. (custom-set-variables
  135. ;; custom-set-variables was added by Custom.
  136. ;; If you edit it by hand, you could mess it up, so be careful.
  137. ;; Your init file should contain only one such instance.
  138. ;; If there is more than one, they won't work right.
  139. '(custom-safe-themes
  140. (quote
  141. ("2f1518e906a8b60fac943d02ad415f1d8b3933a5a7f75e307e6e9a26ef5bf570" "fe94e2e42ccaa9714dd0f83a5aa1efeef819e22c5774115a9984293af609fce7" default)))
  142. '(package-selected-packages
  143. (quote
  144. (company org-bullets expand-region flycheck treemacs-projectile treemacs magit auctex dashboard helm-projectile helm doom-modeline doom-themes which-key use-package projectile))))
  145. (custom-set-faces
  146. ;; custom-set-faces was added by Custom.
  147. ;; If you edit it by hand, you could mess it up, so be careful.
  148. ;; Your init file should contain only one such instance.
  149. ;; If there is more than one, they won't work right.
  150. )