Emacs config wip, split to better fit modules.
This commit is contained in:
+27
-39
@@ -4,9 +4,9 @@
|
||||
;; C-h works too, except in normal/motion state where it moves
|
||||
;; to the window on the left.
|
||||
;;; Code:
|
||||
|
||||
;;;; 1. Emac setup, files, packages and paths
|
||||
(let ((bin (expand-file-name "~/.local/bin")))
|
||||
(dolist (bin (list (expand-file-name "~/.local/bin")
|
||||
(expand-file-name "~/.go/bin")))
|
||||
(add-to-list 'exec-path bin)
|
||||
(setenv "PATH" (concat bin path-separator (getenv "PATH"))))
|
||||
|
||||
@@ -63,16 +63,25 @@
|
||||
(which-key-mode 1)
|
||||
|
||||
(add-to-list 'warning-suppress-types '(files))
|
||||
(use-package jbeans-theme
|
||||
:config
|
||||
(load-theme 'jbeans t))
|
||||
(use-package doom-themes :ensure t)
|
||||
(load-theme 'doom-one t)
|
||||
(doom-themes-set-faces 'user
|
||||
'(default :background "#131313")
|
||||
'(fringe :background "#131313")
|
||||
'(line-number :background "#131313")
|
||||
'(line-number-current-line :background "#131313")
|
||||
'(mode-line :background "#1a1a1a")
|
||||
'(mode-line-inactive :background "#131313"))
|
||||
|
||||
(set-face-attribute 'default nil :family "JetBrainsMono Nerd Font" :height 120)
|
||||
(setq-default line-spacing '(4 . 4))
|
||||
(use-package doom-modeline
|
||||
:ensure t
|
||||
:init (doom-modeline-mode 1))
|
||||
|
||||
;; set mode line at the top of each window
|
||||
(setq-default header-line-format mode-line-format mode-line-format nil)
|
||||
(set-face-attribute 'header-line nil :inherit 'mode-line :background "#131313")
|
||||
|
||||
(set-face-attribute 'default nil :family "JetBrainsMono Nerd Font" :height 120)
|
||||
(setq-default line-spacing '(4 . 4))
|
||||
|
||||
;; Command launcher.
|
||||
(keymap-global-set "C-S-p" #'execute-extended-command)
|
||||
@@ -234,41 +243,20 @@
|
||||
"." #'dired-omit-mode
|
||||
(kbd "RET") #'dired-find-file))
|
||||
|
||||
;;;; 8. Build
|
||||
(setq compile-command "./build.sh"
|
||||
compilation-read-command nil
|
||||
compilation-ask-about-save nil
|
||||
compilation-scroll-output t)
|
||||
;;;; 8. Modules - additional functionality outside of the core init.el
|
||||
;; Setup for orgmode
|
||||
(load (locate-user-emacs-file "modules/org.el") nil 'nomessage)
|
||||
|
||||
(add-hook 'compilation-filter-hook #'ansi-color-compilation-filter)
|
||||
;; Setup for rss feed
|
||||
(load (locate-user-emacs-file "modules/rss.el") nil 'nomessage)
|
||||
|
||||
;; Compilation buffer always at the bottom, full frame width.
|
||||
(add-to-list 'display-buffer-alist
|
||||
'((derived-mode . compilation-mode)
|
||||
(display-buffer-reuse-window display-buffer-at-bottom)
|
||||
(window-height . 0.45)))
|
||||
|
||||
;; C-c C-c builds from the project root.
|
||||
;; C-c b asks first: the prompt is pre-filled with ./build.sh, so type the args after it.
|
||||
(defun my/project-compile-prompt ()
|
||||
"Run `project-compile', prompting to edit the command."
|
||||
(interactive)
|
||||
(let ((compilation-read-command t))
|
||||
(call-interactively #'project-compile)))
|
||||
|
||||
(keymap-global-set "C-c C-c" #'project-compile)
|
||||
(keymap-global-set "C-c b" #'my/project-compile-prompt)
|
||||
|
||||
;; Focus the compilation window when a build starts.
|
||||
(add-hook 'compilation-start-hook
|
||||
(lambda (proc)
|
||||
(when-let* ((win (get-buffer-window (process-buffer proc))))
|
||||
(select-window win))))
|
||||
|
||||
;;;; 9. Modules - additional functionality outside of the core init.el
|
||||
;; Magit and the :git command live in modules/git.el.
|
||||
(load (locate-user-emacs-file "modules/git.el") nil 'nomessage)
|
||||
|
||||
;; Setup for personal build commands and system.
|
||||
(load (locate-user-emacs-file "modules/build.el") nil 'nomessage)
|
||||
|
||||
;; Setup for dev languages, modes, lsp and lsp keybinds.
|
||||
(load (locate-user-emacs-file "modules/development.el") nil 'nomessage)
|
||||
(load (locate-user-emacs-file "modules/dev.el") nil 'nomessage)
|
||||
|
||||
;;; init.el ends here
|
||||
|
||||
Reference in New Issue
Block a user