merge
This commit is contained in:
parent
99685bde8a
commit
fc4c5927cc
73
init.el
73
init.el
|
@ -4,6 +4,11 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
;; set up local directory
|
||||||
|
;(add-to-list 'load-path "~/.emacs.d/lisp/")
|
||||||
|
(add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory))
|
||||||
|
(setq-default flycheck-emacs-lisp-load-path 'inherit)
|
||||||
|
|
||||||
;; set up straight.el
|
;; set up straight.el
|
||||||
(defvar bootstrap-version)
|
(defvar bootstrap-version)
|
||||||
(let ((bootstrap-file
|
(let ((bootstrap-file
|
||||||
|
@ -95,35 +100,6 @@
|
||||||
(newHeight (* newSize 10)))
|
(newHeight (* newSize 10)))
|
||||||
(set-face-attribute 'default nil :height newHeight)))
|
(set-face-attribute 'default nil :height newHeight)))
|
||||||
|
|
||||||
;; ;; use doom themes
|
|
||||||
;; (use-package doom-themes
|
|
||||||
;; ;; :straight (doom-themes :type git
|
|
||||||
;; ;; :host github
|
|
||||||
;; ;; :repo "doomemacs/themes")
|
|
||||||
;; :config ;(load-theme 'doom-badger t)
|
|
||||||
;; ;; (setq doom-badger-brighter-comments t
|
|
||||||
;; ;; doom-themes-treemacs-theme "doom-colors")
|
|
||||||
;; (load-theme 'neon-badger t)
|
|
||||||
;; (setq neon-badger-brighter-comments t
|
|
||||||
;; neon-themes-treemacs-theme "doom-colors")
|
|
||||||
;; ; (set-face-foreground-color 'font-lock-constant-face #635770)
|
|
||||||
;; ; (set-face-foreground 'font-lock-constant-face "#834980")
|
|
||||||
;; ; (set-face-foreground 'font-lock-constant-face "#c37990")
|
|
||||||
;; (doom-themes-neotree-config)
|
|
||||||
;; (doom-themes-treemacs-config)
|
|
||||||
;; (doom-themes-org-config))
|
|
||||||
|
|
||||||
;; (use-package heaven-and-hell
|
|
||||||
;; :ensure t
|
|
||||||
;; :init (setq heaven-and-hell-theme-type 'dark)
|
|
||||||
;; (setq heaven-and-hell-themes
|
|
||||||
;; '((light . doom-badger)
|
|
||||||
;; (dark . neon-badger)))
|
|
||||||
;; :hook (after-init . heaven-and-hell-init-hook)
|
|
||||||
;; )
|
|
||||||
;; :bind (("C-c <f6>" . heaven-and-hell-load-default-theme)
|
|
||||||
;; ("<f6>" . heaven-and-hell-toggle-theme)))
|
|
||||||
|
|
||||||
;; try using a fancier mode line
|
;; try using a fancier mode line
|
||||||
(use-package doom-modeline
|
(use-package doom-modeline
|
||||||
:ensure t
|
:ensure t
|
||||||
|
@ -205,7 +181,7 @@
|
||||||
(use-package markdown-mode)
|
(use-package markdown-mode)
|
||||||
(use-package racket-mode)
|
(use-package racket-mode)
|
||||||
(use-package tuareg)
|
(use-package tuareg)
|
||||||
(use-package forth-mode)
|
;(use-package forth-mode)
|
||||||
(use-package rust-mode)
|
(use-package rust-mode)
|
||||||
|
|
||||||
(use-package which-key
|
(use-package which-key
|
||||||
|
@ -231,9 +207,14 @@
|
||||||
|
|
||||||
(use-package company
|
(use-package company
|
||||||
:hook (scala-mode . company-mode)
|
:hook (scala-mode . company-mode)
|
||||||
|
(java-mode . company-mode)
|
||||||
|
(emacs-lisp-mode . company-mode)
|
||||||
|
(rust-mode . company-mode)
|
||||||
|
(python-mode . company-mode)
|
||||||
:bind (("M-/" . company-complete))
|
:bind (("M-/" . company-complete))
|
||||||
:config (add-hook 'after-init-hook 'global-company-mode))
|
:config (add-hook 'after-init-hook 'global-company-mode))
|
||||||
|
|
||||||
|
(defvar use-lsp)
|
||||||
(setq use-lsp (equal (system-name) "cult"))
|
(setq use-lsp (equal (system-name) "cult"))
|
||||||
|
|
||||||
;; when not using lsp use hippie expand
|
;; when not using lsp use hippie expand
|
||||||
|
@ -456,12 +437,21 @@
|
||||||
;; hcl / terraform
|
;; hcl / terraform
|
||||||
(use-package hcl-mode)
|
(use-package hcl-mode)
|
||||||
|
|
||||||
|
;; dired
|
||||||
|
(setq dired-auto-revert-buffer t)
|
||||||
|
(defun my/toggle-dotfiles ()
|
||||||
|
"Toggle visibility of files starting with dot."
|
||||||
|
(interactive)
|
||||||
|
(if (equal dired-listing-switches "-al")
|
||||||
|
(setq dired-listing-switches "-l")
|
||||||
|
(setq dired-listing-switches "-al")))
|
||||||
|
|
||||||
;;; turn off branch in mode line for now
|
;;; turn off branch in mode line for now
|
||||||
;(setq vc-handled-backends nil)
|
;(setq vc-handled-backends nil)
|
||||||
|
|
||||||
;; force vc to update branches, etc. (unused for now)
|
;; force vc to update branches, etc. (unused for now)
|
||||||
(defun force-update-vcs ()
|
(defun force-update-vcs ()
|
||||||
"Update vc in all verson-controlled buffers"
|
"Update vc in all verson-controlled buffers."
|
||||||
(interactive)
|
(interactive)
|
||||||
(dolist (buf (buffer-list))
|
(dolist (buf (buffer-list))
|
||||||
(with-current-buffer buf
|
(with-current-buffer buf
|
||||||
|
@ -511,10 +501,10 @@
|
||||||
(setq indent-tabs-mode (not indent-tabs-mode)))
|
(setq indent-tabs-mode (not indent-tabs-mode)))
|
||||||
|
|
||||||
;; handy function to regenerate tags
|
;; handy function to regenerate tags
|
||||||
(defun regenerate-tags ()
|
(defun my/regenerate-tags ()
|
||||||
"regenerate-tags"
|
"Regenerate tags using ets."
|
||||||
(interactive)
|
(interactive)
|
||||||
(defun runloop (dir)
|
(defun my/runloop (dir)
|
||||||
(let ((tagfile (concat dir "TAGS")))
|
(let ((tagfile (concat dir "TAGS")))
|
||||||
(if (file-exists-p tagfile)
|
(if (file-exists-p tagfile)
|
||||||
(let ((default-directory dir))
|
(let ((default-directory dir))
|
||||||
|
@ -523,22 +513,22 @@
|
||||||
(async-shell-command "ets")))
|
(async-shell-command "ets")))
|
||||||
(progn
|
(progn
|
||||||
(let ((next (file-name-directory (directory-file-name dir))))
|
(let ((next (file-name-directory (directory-file-name dir))))
|
||||||
(if (equal dir next) (shell-command "uptime") (runloop next)))))))
|
(if (equal dir next) (shell-command "uptime") (my/runloop next)))))))
|
||||||
(runloop default-directory))
|
(my/runloop default-directory))
|
||||||
(global-set-key (kbd "C-t") 'regenerate-tags)
|
(global-set-key (kbd "C-t") 'my/regenerate-tags)
|
||||||
|
|
||||||
;; spell checking as you type in text-mode
|
;; spell checking as you type in text-mode
|
||||||
;(autoload 'flyspell-mode-on "flyspell" "On-the-fly ispell." t)
|
;(autoload 'flyspell-mode-on "flyspell" "On-the-fly ispell." t)
|
||||||
(add-hook 'text-mode-hook 'flyspell-mode-on)
|
(add-hook 'text-mode-hook 'flyspell-mode-on)
|
||||||
|
|
||||||
;; use nicer diff colors
|
;; use nicer diff colors
|
||||||
(defun update-diff-colors ()
|
(defun my/update-diff-colors ()
|
||||||
"update the colors for diff faces"
|
"Update the colors for diff faces."
|
||||||
(set-face-foreground 'diff-added "green")
|
(set-face-foreground 'diff-added "green")
|
||||||
(set-face-foreground 'diff-removed "red")
|
(set-face-foreground 'diff-removed "red")
|
||||||
(set-face-foreground 'diff-changed "purple"))
|
(set-face-foreground 'diff-changed "purple"))
|
||||||
(eval-after-load "diff-mode"
|
(eval-after-load "diff-mode"
|
||||||
'(update-diff-colors))
|
'(my/update-diff-colors))
|
||||||
|
|
||||||
;; (custom-set-variables
|
;; (custom-set-variables
|
||||||
;; ;; custom-set-variables was added by Custom.
|
;; ;; custom-set-variables was added by Custom.
|
||||||
|
@ -553,3 +543,6 @@
|
||||||
;; ;; Your init file should contain only one such instance.
|
;; ;; Your init file should contain only one such instance.
|
||||||
;; ;; If there is more than one, they won't work right.
|
;; ;; If there is more than one, they won't work right.
|
||||||
;; )
|
;; )
|
||||||
|
|
||||||
|
(provide 'init)
|
||||||
|
;;; init.el ends here
|
||||||
|
|
Loading…
Reference in New Issue