.emacs 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. (defvar bootstrap-version)
  2. (let ((bootstrap-file
  3. (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
  4. (bootstrap-version 5))
  5. (unless (file-exists-p bootstrap-file)
  6. (with-current-buffer
  7. (url-retrieve-synchronously
  8. "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
  9. 'silent 'inhibit-cookies)
  10. (goto-char (point-max))
  11. (eval-print-last-sexp)))
  12. (load bootstrap-file nil 'nomessage))
  13. (setq package-enable-at-startup nil)
  14. (setq-default indent-tabs-mode t)
  15. (setq backup-directory-alist `(("." . "~/.saves")))
  16. (add-to-list 'auto-mode-alist '("\\.lua2p\\'" . lua-mode))
  17. (straight-use-package 'use-package)
  18. (use-package fennel-mode :straight t)
  19. (use-package moonscript :straight t)
  20. (use-package csound-mode :straight t)
  21. (use-package icicles :straight t
  22. :config (icy-mode 1))
  23. (use-package company
  24. :ensure t
  25. :config (global-company-mode nil))
  26. (use-package company-lua
  27. :ensure t
  28. :straight t)
  29. (use-package all-the-icons
  30. :ensure t :straight t)
  31. (use-package projectile
  32. :ensure t :straight t
  33. :config
  34. (projectile-mode t)
  35. :init
  36. (projectile-mode +1)
  37. :bind
  38. ("s-p" . projectile-command-map)
  39. ("C-c p" . projectile-command-map))
  40. (use-package neotree
  41. :ensure t
  42. :straight t
  43. :config (setq projectile-switch-project-action 'neotree-projectile-action)
  44. :bind
  45. ("<f8>" . neotree-toggle))
  46. (use-package corral
  47. :straight t
  48. :config
  49. (global-set-key (kbd "M-9") 'corral-parentheses-backward)
  50. (global-set-key (kbd "M-0") 'corral-parentheses-forward)
  51. (global-set-key (kbd "M-[") 'corral-brackets-backward)
  52. (global-set-key (kbd "M-]") 'corral-brackets-forward)
  53. (global-set-key (kbd "M-{") 'corral-braces-backward)
  54. (global-set-key (kbd "M-}") 'corral-braces-forward)
  55. (global-set-key (kbd "M-\"") 'corral-double-quotes-backward))
  56. (use-package dashboard
  57. :straight t
  58. :ensure t
  59. :config
  60. (set-face-attribute 'dashboard-heading-face nil
  61. :family "Hack Nerd Font-10"
  62. :weight 'normal
  63. :foreground "#6c71c4")
  64. (set-face-attribute 'dashboard-items-face nil
  65. :family "Hack Nerd Font-10"
  66. :weight 'normal
  67. :foreground "#93a1a1")
  68. (setq dashboard-banner-logo-title nil)
  69. (setq dashboard-set-init-info t)
  70. (setq dashboard-set-footer nil)
  71. (setq dashboard-set-navigator t)
  72. (setq dashboard-set-heading-icons nil)
  73. (setq dashboard-set-file-icons nil)
  74. (setq dashboard-items '((recents . 15)
  75. (bookmarks . 5)
  76. (projects . 5)
  77. (agenda . 5)
  78. (registers . 5)))
  79. (setq dashboard-startup-banner nil)
  80. (dashboard-setup-startup-hook))
  81. (use-package solarized-theme :straight t
  82. :config
  83. (load-theme 'solarized-light t)
  84. (let ((line (face-attribute 'mode-line :underline)))
  85. (set-face-attribute 'mode-line nil :overline line)
  86. (set-face-attribute 'mode-line-inactive nil :overline line)
  87. (set-face-attribute 'mode-line-inactive nil :underline line)
  88. (set-face-attribute 'mode-line nil
  89. :background "#fdf6e3"
  90. :box nil)
  91. (set-face-attribute 'mode-line-inactive nil :background "#eee8d5")
  92. (set-face-attribute 'mode-line-inactive nil :box nil)))
  93. (use-package moody :straight t
  94. :config
  95. (setq x-underline-at-descent-line t)
  96. (moody-replace-mode-line-buffer-identification)
  97. (moody-replace-vc-mode))
  98. (use-package centaur-tabs
  99. :straight t
  100. :config
  101. (centaur-tabs-headline-match)
  102. (setq centaur-tabs-style "wave"
  103. centaur-tabs-set-bar 'under
  104. centaur-tabs-height 32
  105. centaur-tabs-show-navigation-buttons nil
  106. centaur-tabs-set-icons t
  107. centaur-tabs--buffer-show-groups nil
  108. centaur-tabs-set-modified-marker t
  109. centaur-tabs-modified-marker "*"
  110. centaur-tabs-plain-icons t)
  111. (centaur-tabs-mode 1)
  112. (centaur-tabs-change-fonts "hack" 100)
  113. (centaur-tabs-enable-buffer-reordering))
  114. (use-package pdf-tools :straight t)
  115. (use-package racket-mode
  116. :straight t
  117. :config
  118. (add-hook 'racket-mode-hook #'racket-unicode-input-method-enable)
  119. (add-hook 'racket-repl-mode-hook #'racket-unicode-input-method-enable))
  120. (defvar love-exe (executable-find "love"))
  121. (defvar love-project "~/Projects/LGJ_Pana/")
  122. (defun love/launch ()
  123. (interactive)
  124. (message "launching love ...")
  125. (with-current-buffer (current-buffer)
  126. (start-process-shell-command "love-process" "*love-output*"
  127. (concat "cd " (projectile-acquire-root) "&& love ."))))
  128. (defun pp-rebuild ()
  129. (interactive)
  130. (message "rebuilding ..")
  131. (with-current-buffer (current-buffer)
  132. (start-process-shell-command "building" "*build-output*"
  133. (concat "cd " (projectile-acquire-root) "&& ./build.sh"))))
  134. (use-package lua-mode
  135. :straight t
  136. :config
  137. (setq-local company-backends '((company-lua
  138. company-etags
  139. company-dabbrev-code
  140. company-yasnippet)))
  141. :bind
  142. ("C-c C-c" . love/launch)
  143. ("C-c C-r" . pp-rebuild))
  144. ;; (use-package robe
  145. ;; :straight t
  146. ;; :config
  147. ;; (add-hook 'ruby-mode-hook 'robe-mode))
  148. ;; (use-package love-minor-mode :straight t)
  149. (use-package scribble-mode
  150. :straight t)
  151. (use-package vterm
  152. :straight t)
  153. (use-package rainbow-mode
  154. :straight t
  155. :config
  156. (add-hook 'after-init-hook #'rainbow-mode))
  157. (set-language-environment "UTF-8")
  158. (set-default-coding-systems 'utf-8-unix)
  159. (global-visual-line-mode)
  160. (scroll-bar-mode -1)
  161. (menu-bar-mode -1)
  162. (setq inhibit-startup-screen t)
  163. (display-line-numbers-mode t)
  164. (tool-bar-mode -1)
  165. (setq show-paren-style 'parenthesis)
  166. (show-paren-mode t)
  167. (set-face-attribute 'show-paren-match nil
  168. :background "#eee8d5")
  169. (add-to-list 'default-frame-alist
  170. '(font . "Hack Nerd Font-10"))
  171. (recentf-mode 1)
  172. (setq recentf-mode 1)
  173. (setq recentf-max-menu-items 25)
  174. (global-set-key "\C-x\ \C-r" 'recentf-open-files)
  175. (defun centaur-tabs-buffer-groups ()
  176. '("Common"))
  177. (defun fullscreen ()
  178. "Make the screen fullscreen."
  179. (interactive)
  180. (set-frame-parameter nil 'fullscreen
  181. (if (frame-parameter nil 'fullscreen) nil 'fullboth)))