Created
March 28, 2020 15:03
-
-
Save starenka/d7aedef0eb69b8ee6967b9c67d957475 to your computer and use it in GitHub Desktop.
basic emacs setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; packaging | |
(require 'package) | |
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/") | |
("melpa" . "https://melpa.org/packages/") | |
("melpa-stable" . "https://stable.melpa.org/packages/")) | |
package-archive-priorities | |
'(("melpa-stable" . 10) | |
("gnu" . 5) | |
("melpa" . 0))) | |
(package-initialize) | |
(add-to-list 'load-path "~/.emacs.d/el-get/el-get") | |
(unless (require 'el-get nil 'noerror) | |
(with-current-buffer | |
(url-retrieve-synchronously | |
"https://raw.github.com/dimitri/el-get/master/el-get-install.el") | |
(let (el-get-master-branch) | |
(goto-char (point-max)) | |
(eval-print-last-sexp)))) | |
(el-get 'sync) | |
;;hold packages | |
(add-to-list 'package-pinned-packages '(cider . "melpa-stable") t) | |
(add-to-list 'package-pinned-packages '(alchemist . "melpa-stable") t) | |
(add-to-list 'package-pinned-packages '(jedi . "melpa-stable") t) | |
;; https://github.com/syl20bnr/spacemacs/issues/12535 | |
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") | |
;; compile not compiled files | |
;; (byte-recompile-directory (expand-file-name "~/.emacs.d") 0) | |
;; func to load other init files | |
(defconst user-init-dir | |
(cond ((boundp 'user-emacs-directory) | |
user-emacs-directory) | |
((boundp 'user-init-directory) | |
user-init-directory) | |
(t "~/.emacs.d/"))) | |
(defun load-user-file (file) | |
(interactive "f") | |
"Load a file in current user's configuration directory" | |
(load-file (expand-file-name file user-init-dir))) | |
;; "y or n" instead of "yes or no" | |
(fset 'yes-or-no-p 'y-or-n-p) | |
;; Don't show the startup screen | |
(setq inhibit-startup-message t) | |
;; turn of hells bells | |
(setq ring-bell-function 'ignore) | |
;; no menu bar | |
(menu-bar-mode -1) | |
;; no toolbar | |
;; (tool-bar-mode -1) | |
;; no scrollbar | |
;; (scroll-bar-mode -1) | |
;; don't fuck w/ my scratches | |
(setq initial-scratch-message ";; evaluate & print C-j | |
;; evaluate defun C-M-x | |
") | |
;;save on exit | |
(desktop-save-mode 1) | |
;;sync buffers on disk change | |
(global-auto-revert-mode t) | |
;; Display line and column numbers | |
(setq column-number-mode t) | |
(add-hook 'before-save-hook 'delete-trailing-whitespace) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment