added el-get for easier package management
This commit is contained in:
parent
fe0be28803
commit
f19c00c272
5 changed files with 62 additions and 14 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -4,6 +4,7 @@ recentf
|
|||
savehist
|
||||
saveplace
|
||||
elpa
|
||||
el-get
|
||||
semanticdb
|
||||
custom.el
|
||||
url
|
||||
|
|
1
init.el
1
init.el
|
@ -61,6 +61,7 @@ by Prelude.")
|
|||
;; the core stuff
|
||||
(require 'prelude-ui)
|
||||
(require 'prelude-packages)
|
||||
(require 'prelude-el-get)
|
||||
(require 'prelude-core)
|
||||
(require 'prelude-editor)
|
||||
(require 'prelude-global-keybindings)
|
||||
|
|
58
modules/prelude-el-get.el
Normal file
58
modules/prelude-el-get.el
Normal file
|
@ -0,0 +1,58 @@
|
|||
(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
|
||||
|
||||
(unless (require 'el-get nil t)
|
||||
(with-current-buffer
|
||||
(url-retrieve-synchronously
|
||||
"https://raw.github.com/dimitri/el-get/master/el-get-install.el")
|
||||
(end-of-buffer)
|
||||
(eval-print-last-sexp)))
|
||||
|
||||
(setq el-get-sources
|
||||
'((:name magit
|
||||
:after (lambda ()
|
||||
(global-set-key (kbd "C-x g") 'magit-status)))
|
||||
(:name yasnippet
|
||||
:website "http://code.google.com/p/yasnippet/"
|
||||
:description "YASnippet is a template system for Emacs."
|
||||
:type git
|
||||
:url "https://github.com/capitaomorte/yasnippet.git"
|
||||
:features "yasnippet"
|
||||
:prepare (lambda ()
|
||||
;; Set up the default snippets directory
|
||||
;;
|
||||
;; Principle: don't override any user settings
|
||||
;; for yas/snippet-dirs, whether those were made
|
||||
;; with setq or customize. If the user doesn't
|
||||
;; want the default snippets, she shouldn't get
|
||||
;; them!
|
||||
(unless (or (boundp 'yas/snippet-dirs) (get 'yas/snippet-dirs 'customized-value))
|
||||
(setq yas/snippet-dirs
|
||||
(list (concat el-get-dir (file-name-as-directory "yasnippet") "snippets")))))
|
||||
|
||||
:post-init (lambda ()
|
||||
;; Trick customize into believing the standard
|
||||
;; value includes the default snippets.
|
||||
;; yasnippet would probably do this itself,
|
||||
;; except that it doesn't include an
|
||||
;; installation procedure that sets up the
|
||||
;; snippets directory, and thus doesn't know
|
||||
;; where those snippets will be installed. See
|
||||
;; http://code.google.com/p/yasnippet/issues/detail?id=179
|
||||
(put 'yas/snippet-dirs 'standard-value
|
||||
;; as cus-edit.el specifies, "a cons-cell
|
||||
;; whose car evaluates to the standard
|
||||
;; value"
|
||||
(list (list 'quote
|
||||
(list (concat el-get-dir (file-name-as-directory "yasnippet") "snippets"))))))
|
||||
;; byte-compile load vc-svn and that fails
|
||||
;; see https://github.com/dimitri/el-get/issues/200
|
||||
:compile nil)))
|
||||
|
||||
(setq prelude-packages
|
||||
(append
|
||||
'()
|
||||
(mapcar 'el-get-source-name el-get-sources)))
|
||||
|
||||
(el-get 'sync prelude-packages)
|
||||
|
||||
(provide 'prelude-el-get)
|
|
@ -86,9 +86,6 @@
|
|||
;; Should be able to eval-and-replace anywhere.
|
||||
(global-set-key (kbd "C-c e") 'prelude-eval-and-replace)
|
||||
|
||||
;; Magit rules!
|
||||
(global-set-key (kbd "C-x g") 'magit-status)
|
||||
|
||||
;; Activate occur easily inside isearch
|
||||
(define-key isearch-mode-map (kbd "C-o")
|
||||
(lambda () (interactive)
|
||||
|
@ -103,12 +100,6 @@
|
|||
;; use hippie-expand instead of dabbrev
|
||||
(global-set-key (kbd "M-/") 'hippie-expand)
|
||||
|
||||
;; spell check Bulgarian text
|
||||
(global-set-key (kbd "C-c B")
|
||||
(lambda()(interactive)
|
||||
(ispell-change-dictionary "bulgarian")
|
||||
(flyspell-buffer)))
|
||||
|
||||
;; replace buffer-menu with ibuffer
|
||||
(global-set-key (kbd "C-x C-b") 'ibuffer)
|
||||
|
||||
|
@ -124,9 +115,6 @@
|
|||
;; open an ansi-term buffer
|
||||
(global-set-key (kbd "C-x t") 'prelude-visit-term-buffer)
|
||||
|
||||
;; toggle input method
|
||||
(global-set-key (kbd "C-\\") 'prelude-toggle-bulgarian-input-method)
|
||||
|
||||
;; search with google
|
||||
(global-set-key (kbd "C-c g") 'prelude-google)
|
||||
|
||||
|
|
|
@ -44,8 +44,8 @@
|
|||
;; TODO find a way to get inf-ruby 2.2.2 into Marmalade
|
||||
(defvar prelude-packages
|
||||
'(auctex clojure-mode coffee-mode deft gist haml-mode
|
||||
haskell-mode magit markdown-mode paredit projectile
|
||||
python sass-mode scss-mode yaml-mode yari yasnippet)
|
||||
haskell-mode markdown-mode paredit projectile
|
||||
python sass-mode scss-mode yaml-mode yari)
|
||||
"A list of packages to ensure are installed at launch.")
|
||||
|
||||
(dolist (p prelude-packages)
|
||||
|
|
Loading…
Reference in a new issue