emacs.d/init.el

47 lines
1.6 KiB
EmacsLisp
Raw Normal View History

2019-12-07 23:09:25 +01:00
;; Configure emacs packages.
(require 'package)
2020-07-31 00:41:04 +02:00
(setq package-archives
'(("org" . "https://orgmode.org/elpa/")
("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")))
2019-12-07 23:09:25 +01:00
(package-initialize)
2020-07-31 00:41:04 +02:00
;(package-refresh-contents)
2019-12-07 23:09:25 +01:00
2020-07-31 00:41:04 +02:00
;; Use-package for civilized configuration
(unless (package-installed-p 'use-package)
(package-install 'use-package))
(require 'use-package)
2020-07-31 00:41:04 +02:00
(setq use-package-always-ensure t)
2020-01-05 23:51:24 +01:00
(setq dotfiles-dir
(file-name-directory
(or (buffer-file-name) (file-chase-links load-file-name))))
2020-07-31 00:41:04 +02:00
(setq modules-path (concat dotfiles-dir "modules"))
2019-12-07 23:09:25 +01:00
2020-07-31 00:41:04 +02:00
(add-to-list 'load-path modules-path)
2019-12-07 23:09:25 +01:00
;; Emacs customization / global plugin configuration
(require 'jenga-init)
2019-12-07 23:09:25 +01:00
(require 'jenga-magit)
(require 'jenga-org)
2020-01-05 23:51:24 +01:00
(require 'jenga-ui)
2019-12-07 23:09:25 +01:00
(require 'jenga-elm)
2020-07-31 00:41:04 +02:00
(require 'jenga-python)
2019-12-07 23:09:25 +01:00
(require 'jenga-rust)
(require 'jenga-systemd)
2020-07-31 00:41:04 +02:00
;;(add-hook 'find-file-hook #'load-module)
;;(defun load-module ()
;; (when (stringp buffer-file-name)
;; (cond ((string-match "\\.elm\\'" buffer-file-name) (require 'jenga-elm))
;; ((string-match "\\.py\\'" buffer-file-name) (require 'jenga-python))
;; ((string-match "\\.rs\\'" buffer-file-name) (require 'jenga-rust))
;; ((string-match "\\.service\\'" buffer-file-name) (require 'jenga-systemd)))))
2020-01-05 23:51:24 +01:00
(setq custom-file "~/.emacs.d/custom.el")
(load custom-file)
2020-01-06 02:15:43 +01:00
;; ## added by OPAM user-setup for emacs / base ## 56ab50dc8996d2bb95e7856a6eddb17b ## you can edit, but keep this line
(require 'opam-user-setup "~/.emacs.d/opam-user-setup.el")
;; ## end of OPAM user-setup addition for emacs / base ## keep this line