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.

141 lines
4.1 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. )
  95. :bind
  96. (:map global-map
  97. ("M-0" . treemacs-select-window)
  98. ("C-x t t" . treemacs)))
  99. ;; treemacs-projectile
  100. (use-package treemacs-projectile
  101. :after treemacs projectile
  102. :ensure t)
  103. ;; magit
  104. (use-package magit
  105. :ensure t)
  106. ;; latex
  107. (use-package tex
  108. :ensure auctex)
  109. ;; flycheck
  110. (use-package flycheck
  111. :ensure t
  112. :init (global-flycheck-mode))
  113. ;; expand region
  114. (use-package expand-region
  115. :ensure t
  116. :bind
  117. ("C-=" . er/expand-region)
  118. ("C--" . er/contract-region))
  119. ;; aspell
  120. ;; Set default font:
  121. (add-to-list 'default-frame-alist
  122. '(font . "Source Code Pro-18"))
  123. (custom-set-variables
  124. ;; custom-set-variables was added by Custom.
  125. ;; If you edit it by hand, you could mess it up, so be careful.
  126. ;; Your init file should contain only one such instance.
  127. ;; If there is more than one, they won't work right.
  128. '(custom-safe-themes
  129. (quote
  130. ("2f1518e906a8b60fac943d02ad415f1d8b3933a5a7f75e307e6e9a26ef5bf570" "fe94e2e42ccaa9714dd0f83a5aa1efeef819e22c5774115a9984293af609fce7" default)))
  131. '(package-selected-packages
  132. (quote
  133. (expand-region flycheck treemacs-projectile treemacs magit auctex dashboard helm-projectile helm doom-modeline doom-themes which-key use-package projectile))))
  134. (custom-set-faces
  135. ;; custom-set-faces 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. )