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.
143 lines
4.7 KiB
143 lines
4.7 KiB
(require 'package)
|
|
;;(add-to-list 'package-archives
|
|
;; '("melpa-stable" . "http://stable.melpa.org/packages/") t)
|
|
|
|
;; Melpa shit
|
|
|
|
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
|
|
(not (gnutls-available-p))))
|
|
(proto (if no-ssl "http" "https")))
|
|
(when no-ssl
|
|
(warn "\
|
|
Your version of Emacs does not support SSL connections,
|
|
which is unsafe because it allows man-in-the-middle attacks.
|
|
There are two things you can do about this warning:
|
|
1. Install an Emacs version that does support SSL and be safe.
|
|
2. Remove this warning from your init file so you won't see it again."))
|
|
;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
|
|
(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
|
|
;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
|
|
(when (< emacs-major-version 24)
|
|
;; For important compatibility libraries like cl-lib
|
|
(add-to-list 'package-archives (cons "gnu" (concat proto "://elpa.gnu.org/packages/")))))
|
|
(package-initialize)
|
|
|
|
(unless package-archive-contents
|
|
(package-refresh-contents))
|
|
|
|
;; ui stuff
|
|
(menu-bar-mode -1)
|
|
(tool-bar-mode -1)
|
|
(show-paren-mode 1)
|
|
(setq inhibit-startup-message t)
|
|
(setq column-number-mode t)
|
|
|
|
;; indent all the stuff
|
|
(defun indent-buffer ()
|
|
(interactive)
|
|
(save-excursion
|
|
(indent-region (point-min) (point-max) nil)))
|
|
(global-set-key [f12] 'indent-buffer)
|
|
|
|
;; custom key bindings
|
|
(global-set-key (kbd "C-M-SPC") 'just-one-space)
|
|
(global-set-key (kbd "C-x -") 'hs-toggle-hiding)
|
|
|
|
;; probably not needed recent files
|
|
(recentf-mode 1)
|
|
(setq recentf-max-menu-items 25)
|
|
(global-set-key "\C-x\ \C-r" 'recentf-open-files)
|
|
|
|
;; ido makes bullshit necessary
|
|
(defvar ido-cur-item nil)
|
|
(defvar ido-default-item nil)
|
|
(defvar ido-cur-list nil)
|
|
(defvar predicate nil)
|
|
(defvar inherit-input-method nil)
|
|
|
|
(defvar my-packages
|
|
'(paredit
|
|
clojure-mode
|
|
clojure-mode-extra-font-locking
|
|
cider
|
|
clj-refactor
|
|
|
|
;; ido-ubiquitous
|
|
which-key
|
|
less-css-mode
|
|
markdown-mode
|
|
yaml-mode
|
|
editorconfig
|
|
auto-complete
|
|
idle-highlight-mode
|
|
|
|
;; edit html tags like sexps
|
|
tagedit))
|
|
|
|
(dolist (p my-packages)
|
|
(when (not (package-installed-p p))
|
|
(package-install p)))
|
|
|
|
(setq-default indent-tabs-mode nil)
|
|
|
|
;; ido shit
|
|
(ido-mode t)
|
|
(setq ido-enable-flex-matching t)
|
|
(setq ido-use-filename-at-point nil)
|
|
;;(ido-ubiquitous-mode 1)
|
|
(global-set-key (kbd "C-x C-b") 'ibuffer)
|
|
|
|
;; cider shit
|
|
(setq cider-repl-display-in-current-window t)
|
|
|
|
;; helm shit
|
|
(require 'helm-config)
|
|
(helm-mode 1)
|
|
(global-set-key (kbd "M-x") 'helm-M-x)
|
|
|
|
;; projectile shit
|
|
(require 'projectile)
|
|
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
|
|
(projectile-mode +1)
|
|
|
|
;; misc global modes
|
|
(global-auto-complete-mode)
|
|
(global-linum-mode)
|
|
(which-key-mode)
|
|
(editorconfig-mode 1)
|
|
(dumb-jump-mode)
|
|
(add-hook 'prog-mode-hook (lambda () (idle-highlight-mode t)))
|
|
|
|
(defun clojure-mode-hook ()
|
|
(clj-refactor-mode 1)
|
|
(enable-paredit-mode)
|
|
(hs-minor-mode 1))
|
|
|
|
;; dem hooks
|
|
(autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t)
|
|
(add-hook 'lisp-mode-hook 'enable-paredit-mode)
|
|
(add-hook 'emacs-lisp-mode-hook 'enable-paredit-mode)
|
|
(add-hook 'eval-expression-minibuffer 'enable-paredit-mode)
|
|
(add-hook 'clojure-mode-hook 'clojure-mode-hook)
|
|
(add-hook 'less-css-mode-hook 'hs-minor-mode)
|
|
(add-hook 'before-save-hook 'delete-trailing-whitespace)
|
|
|
|
(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.
|
|
'(ansi-color-faces-vector
|
|
[default default default italic underline success warning error])
|
|
'(custom-enabled-themes (quote (misterioso)))
|
|
'(initial-frame-alist (quote ((fullscreen . maximized))))
|
|
'(package-selected-packages
|
|
(quote
|
|
(helm-projectile helm-cider helm dumb-jump idle-highlight-mode neotree rainbow-delimiters clj-refactor which-key ac-cider company js3-mode less-css-mode sass-mode paredit markdown-mode yaml-mode editorconfig auto-complete parinfer git-commit cider clojure-mode projectile better-defaults))))
|
|
(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.
|
|
'(default ((t (:inherit nil :stipple nil :background "#2d3743" :foreground "#e1e1e0" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 100 :width normal :foundry "DAMA" :family "monospace")))))
|