The scientific-emacs a container-based in Debian:Focal version with emacs 26, and a light version of TeXlive.
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.

196 lines
6.1 KiB

  1. ;;; My basic configuration Gerardo Marx 31/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. ;; frame size at start
  12. (setq initial-frame-alist '((top . 10)(left . 20)
  13. (width . 80)(height . 40)))
  14. ;; which-key:
  15. (use-package which-key
  16. :ensure t
  17. :config (which-key-mode))
  18. ;; doom-themes
  19. (use-package doom-themes
  20. :ensure t
  21. :config
  22. (setq doom-themes-enable-bold t ; if nil, bold is universally disabled
  23. doom-themes-enable-italic t) ; if nil, italics is universally disabled
  24. (load-theme ;'doom-one
  25. 'doom-monokai-pro t) ;'doom-tomorrow-day
  26. ;; Enable flashing mode-line on errors
  27. (doom-themes-visual-bell-config)
  28. ;; Enable custom neotree theme (all-the-icons must be installed!)
  29. (doom-themes-neotree-config)
  30. ;; or for treemacs users
  31. (setq doom-themes-treemacs-theme "doom-colors") ; use the colorful treemacs theme
  32. (doom-themes-treemacs-config)
  33. ;; Corrects (and improves) org-mode's native fontification.
  34. (doom-themes-org-config))
  35. ;; modeline
  36. (use-package doom-modeline
  37. :ensure t
  38. :init (doom-modeline-mode 1))
  39. ;; icons:
  40. (use-package all-the-icons
  41. :ensure t) ;; --> you need this M-x all-the-icons-install-fonts
  42. ;; helm package:
  43. (use-package helm
  44. :ensure t
  45. :demand t
  46. :bind (("M-x" . helm-M-x)
  47. ("C-c h x" . helm-register) ; C-x r SPC and C-x r j
  48. ("C-c h g" . helm-google-suggest)
  49. ("C-c h M-:" . helm-eval-expression-with-eldoc)
  50. ("C-x C-f" . helm-find-files))
  51. :config
  52. (require 'helm-config)
  53. (helm-mode t))
  54. ;; projectile:
  55. (use-package projectile
  56. :ensure t
  57. :config
  58. (define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
  59. (projectile-mode t))
  60. ;; helm-projectile:
  61. (use-package helm-projectile
  62. :after projectile
  63. :ensure t
  64. :init
  65. (require 'tramp)
  66. :config
  67. (helm-projectile-on))
  68. ;; temp:
  69. (setq ido-enable-flex-matching t)
  70. ;; dash-board:
  71. (use-package dashboard
  72. :ensure t
  73. :init
  74. (progn
  75. (setq dashboard-items '((recents . 5)
  76. (bookmarks . 5)
  77. (projects . 5)
  78. ;;(agenda . 5)
  79. ))
  80. (setq dashboard-banner-logo-title "Welcome to Scientific-Emacs")
  81. (setq dashboard-set-file-icons t)
  82. (setq dashboard-set-init-info t)
  83. (setq dashboard-startup-banner 'logo)
  84. )
  85. :config
  86. (dashboard-setup-startup-hook))
  87. ;; magit
  88. (use-package magit
  89. :ensure t)
  90. ;; expand region
  91. (use-package expand-region
  92. :ensure t
  93. :bind
  94. ("C-=" . er/expand-region)
  95. ("C--" . er/contract-region))
  96. ;; latex
  97. ;; (use-package tex
  98. ;; :defer t
  99. ;; :ensure auctex
  100. ;; :init
  101. ;; (progn
  102. ;; (setq-default TeX-master nil) ; Query for master file.
  103. ;; (setq TeX-auto-save t) ; Enable parse on save.
  104. ;; (setq TeX-save-query nil)
  105. ;; (setq LaTeX-includegraphics-read-file 'LaTeX-includegraphics-read-file-relative)
  106. ;; (custom-set-variables '(LaTeX-command "latex -synctex=1"))
  107. ;; ;;(setq TeX-command-force "LaTex")
  108. ;; ;;(setq latex-run-command "pdflatex")
  109. ;; (setq TeX-parse-self t) ; Enable parse on load.
  110. ;; (setenv "PATH" (concat (getenv "PATH") ":/Library/TeX/texbin/"))
  111. ;; (setq exec-path (append exec-path '("/Library/TeX/texbin/")))
  112. ;; ;; pdf-tools configuration
  113. ;; (setq TeX-PDF-mode t)
  114. ;; (add-hook 'TeX-after-compilation-finished-functions
  115. ;; #'TeX-revert-document-buffer)
  116. ;; (setq TeX-view-program-selection '((output-pdf "PDF Tools"))
  117. ;; TeX-source-correlate-start-server t)
  118. ;; (setq pdf-info-epdfinfo-program "/usr/bin/epdfinfo")
  119. ;; (add-to-list 'auto-mode-alist '("\\.pdf\\'" . pdf-view-mode))
  120. ;; (add-hook 'pdf-view-mode-hook
  121. ;; (lambda () (pdf-tools-enable-minor-modes)))
  122. ;; )
  123. ;; :config
  124. ;; (add-hook 'LaTeX-mode-hook
  125. ;; (lambda ()
  126. ;; (company-mode)
  127. ;; (turn-on-reftex)
  128. ;; (setq reftex-plug-into-AUCTeX t)
  129. ;; (reftex-isearch-minor-mode))
  130. ;; )
  131. ;; pdf-tools
  132. (use-package pdf-tools
  133. :ensure t
  134. :pin melpa
  135. :magic ("%PDF" . pdf-view-mode)
  136. :config
  137. (custom-set-variables
  138. '(pdf-tools-handle-upgrades nil))
  139. )
  140. ;; ----------
  141. ;; rextex
  142. (use-package reftex
  143. :ensure t
  144. :defer t
  145. :config
  146. (setq reftex-cite-prompt-optional-args t)); Prompt for empty optional arguments in cite
  147. ;; Company-mode
  148. (use-package company
  149. :ensure t
  150. :init
  151. (add-hook 'after-init-hook 'global-company-mode))
  152. ;; ispell
  153. (dolist (hook '(org-mode-hook latex-mode-hook tex-mode-hook git-commit-mode-hook))
  154. (add-hook hook (lambda () (flyspell-mode 1))))
  155. ;;(setq ispell-dictionary "en")
  156. (setq ispell-program-name "/usr/bin/aspell")
  157. ;;-+-+-+-+-+-+-+-
  158. ;; -+-+-+-+-+-+-+
  159. ;; startup config
  160. (setq inhibit-startup-message t) ;;inhibit startup
  161. (show-paren-mode 1) ;; parenthesis match
  162. (tool-bar-mode -1) ;; no tool-bar
  163. (menu-bar-mode -1) ;; menu-bar disable
  164. (global-hl-line-mode +1) ;; highlith current line
  165. (delete-selection-mode +1) ;; deletes selected text and replace it
  166. (scroll-bar-mode -1)
  167. ;; Set default font:
  168. (add-to-list 'default-frame-alist
  169. '(font . "DejaVu Sans Mono-16"))
  170. (fset 'yes-or-no-p 'y-or-n-p) ;; Ask y/n instead of yes/no
  171. (add-hook 'prog-mode-hook 'display-line-numbers-mode) ;; display line number when programming
  172. ;; -+-+-+-+-+-+-+-
  173. (custom-set-variables
  174. ;; custom-set-variables was added by Custom.
  175. ;; If you edit it by hand, you could mess it up, so be careful.
  176. ;; Your init file should contain only one such instance.
  177. ;; If there is more than one, they won't work right.
  178. '(custom-safe-themes
  179. (quote
  180. ("3c2f28c6ba2ad7373ea4c43f28fcf2eed14818ec9f0659b1c97d4e89c99e091e" "8d7684de9abb5a770fbfd72a14506d6b4add9a7d30942c6285f020d41d76e0fa" "990e24b406787568c592db2b853aa65ecc2dcd08146c0d22293259d400174e37" "bf387180109d222aee6bb089db48ed38403a1e330c9ec69fe1f52460a8936b66" default)))
  181. '(package-selected-packages (quote (org-pdftools use-package)))
  182. '(pdf-tools-handle-upgrades nil))
  183. (custom-set-faces
  184. ;; custom-set-faces was added by Custom.
  185. ;; If you edit it by hand, you could mess it up, so be careful.
  186. ;; Your init file should contain only one such instance.
  187. ;; If there is more than one, they won't work right.
  188. )