merge
This commit is contained in:
parent
99685bde8a
commit
fc4c5927cc
73
init.el
73
init.el
|
@ -4,6 +4,11 @@
|
|||
|
||||
;;; 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
|
||||
(defvar bootstrap-version)
|
||||
(let ((bootstrap-file
|
||||
|
@ -95,35 +100,6 @@
|
|||
(newHeight (* newSize 10)))
|
||||
(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
|
||||
(use-package doom-modeline
|
||||
:ensure t
|
||||
|
@ -205,7 +181,7 @@
|
|||
(use-package markdown-mode)
|
||||
(use-package racket-mode)
|
||||
(use-package tuareg)
|
||||
(use-package forth-mode)
|
||||
;(use-package forth-mode)
|
||||
(use-package rust-mode)
|
||||
|
||||
(use-package which-key
|
||||
|
@ -231,9 +207,14 @@
|
|||
|
||||
(use-package company
|
||||
: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))
|
||||
:config (add-hook 'after-init-hook 'global-company-mode))
|
||||
|
||||
(defvar use-lsp)
|
||||
(setq use-lsp (equal (system-name) "cult"))
|
||||
|
||||
;; when not using lsp use hippie expand
|
||||
|
@ -456,12 +437,21 @@
|
|||
;; hcl / terraform
|
||||
(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
|
||||
;(setq vc-handled-backends nil)
|
||||
|
||||
;; force vc to update branches, etc. (unused for now)
|
||||
(defun force-update-vcs ()
|
||||
"Update vc in all verson-controlled buffers"
|
||||
"Update vc in all verson-controlled buffers."
|
||||
(interactive)
|
||||
(dolist (buf (buffer-list))
|
||||
(with-current-buffer buf
|
||||
|
@ -511,10 +501,10 @@
|
|||
(setq indent-tabs-mode (not indent-tabs-mode)))
|
||||
|
||||
;; handy function to regenerate tags
|
||||
(defun regenerate-tags ()
|
||||
"regenerate-tags"
|
||||
(defun my/regenerate-tags ()
|
||||
"Regenerate tags using ets."
|
||||
(interactive)
|
||||
(defun runloop (dir)
|
||||
(defun my/runloop (dir)
|
||||
(let ((tagfile (concat dir "TAGS")))
|
||||
(if (file-exists-p tagfile)
|
||||
(let ((default-directory dir))
|
||||
|
@ -523,22 +513,22 @@
|
|||
(async-shell-command "ets")))
|
||||
(progn
|
||||
(let ((next (file-name-directory (directory-file-name dir))))
|
||||
(if (equal dir next) (shell-command "uptime") (runloop next)))))))
|
||||
(runloop default-directory))
|
||||
(global-set-key (kbd "C-t") 'regenerate-tags)
|
||||
(if (equal dir next) (shell-command "uptime") (my/runloop next)))))))
|
||||
(my/runloop default-directory))
|
||||
(global-set-key (kbd "C-t") 'my/regenerate-tags)
|
||||
|
||||
;; spell checking as you type in text-mode
|
||||
;(autoload 'flyspell-mode-on "flyspell" "On-the-fly ispell." t)
|
||||
(add-hook 'text-mode-hook 'flyspell-mode-on)
|
||||
|
||||
;; use nicer diff colors
|
||||
(defun update-diff-colors ()
|
||||
"update the colors for diff faces"
|
||||
(defun my/update-diff-colors ()
|
||||
"Update the colors for diff faces."
|
||||
(set-face-foreground 'diff-added "green")
|
||||
(set-face-foreground 'diff-removed "red")
|
||||
(set-face-foreground 'diff-changed "purple"))
|
||||
(eval-after-load "diff-mode"
|
||||
'(update-diff-colors))
|
||||
'(my/update-diff-colors))
|
||||
|
||||
;; (custom-set-variables
|
||||
;; ;; custom-set-variables was added by Custom.
|
||||
|
@ -553,3 +543,6 @@
|
|||
;; ;; Your init file should contain only one such instance.
|
||||
;; ;; If there is more than one, they won't work right.
|
||||
;; )
|
||||
|
||||
(provide 'init)
|
||||
;;; init.el ends here
|
||||
|
|
Loading…
Reference in New Issue