My dotfiles, mainly for emacs config.
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.
 

128 lines
3.8 KiB

;; disable annoying deprecation warning
(setq byte-compile-warnings '(cl-functions))
;; This fixed garbage collection, makes emacs start up faster
(setq gc-cons-threshold 402653184
gc-cons-percentage 0.6)
;; Profile emacs startup
(add-hook 'emacs-startup-hook
(lambda ()
(message "*** Emacs loaded in %s with %d garbage collections."
(format "%.2f seconds"
(float-time
(time-subtract after-init-time before-init-time)))
gcs-done)))
;; Silence compiler warnings as they can be pretty disruptive
(setq comp-async-report-warnings-errors nil)
(defvar startup/file-name-handler-alist file-name-handler-alist)
(setq file-name-handler-alist nil)
(defun startup/revert-file-name-handler-alist ()
(setq file-name-handler-alist startup/file-name-handler-alist))
(defun startup/reset-gc ()
(setq gc-cons-threshold 16777216
gc-cons-percentage 0.1))
(add-hook 'emacs-startup-hook 'startup/revert-file-name-handler-alist)
(add-hook 'emacs-startup-hook 'startup/reset-gc)
;;;;
;; Packages
;;;;
;; Define package repositories
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)
(add-to-list 'package-archives
'("melpa-stable" . "https://stable.melpa.org/packages/") t)
(add-to-list 'package-archives
'("org" . "https://orgmode.org/elpa/") t)
(add-to-list 'package-pinned-packages '(cider . "melpa-stable") t)
;; Load and activate emacs packages. Do this first so that the
;; packages are loaded before you start trying to modify them.
;; This also sets the load path.
(package-initialize)
;; Download the ELPA archive description if needed.
;; This informs Emacs about the latest versions of all packages, and
;; makes them available for download.
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(setq make-backup-files nil)
(setq auto-save-default nil)
(use-package async
:ensure t
:init (dired-async-mode 1))
(use-package projectile
:ensure t
:init
(projectile-mode 1))
;; Place downloaded elisp files in ~/.emacs.d/lisp. You'll then be able
;; to load them.
;;
;; For example, if you download yaml-mode.el to ~/.emacs.d/lisp,
;; then you can add the following code to this file:
;;
;; (require 'yaml-mode)
;; (add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
;;
;; Adding this code will make Emacs enter yaml mode whenever you open
;; a .yml file
(add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory))
;;;;
;; Customization
;;;;
(add-to-list 'load-path (expand-file-name "custom" user-emacs-directory))
;; everything related to navigating files, buffers, minibuffers
(load "navigation.el")
;; changes on the user interface
(load "ui.el")
;; make editing nicer
(load "editing.el")
;; misc stuff
(load "misc.el")
;; for editing lisps
(load "elisp-editing.el")
;; language specific
(load "setup-clojure.el")
;; Git config
(load "setup-magit.el")
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(column-number-mode t)
'(delete-selection-mode t)
'(global-linum-mode t)
'(package-selected-packages
'(rainbow-delimiters smex find-file-in-project find-file-inproject all-the-icons dracula-theme dracula which-key neotree clj-refactor flycheck-clojure cider clojure-mode-extra-font-locking clojure-mode projectile async pretty-mode use-package)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)