emacs.d/init.el

45 lines
1.6 KiB
EmacsLisp

;; Configure emacs packages.
(require 'package)
(setq package-archives
'(("org" . "https://orgmode.org/elpa/")
("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")))
(package-initialize)
;(package-refresh-contents)
;; Use-package for civilized configuration
(unless (package-installed-p 'use-package)
(package-install 'use-package))
(require 'use-package)
(setq use-package-always-ensure t)
(setq dotfiles-dir
(file-name-directory
(or (buffer-file-name) (file-chase-links load-file-name))))
(setq modules-path (concat dotfiles-dir "modules"))
(add-to-list 'load-path modules-path)
;; Emacs customization / global plugin configuration
(require 'jenga-init)
(require 'jenga-magit)
(require 'jenga-org)
(require 'jenga-ui)
(require 'jenga-python)
(require 'jenga-systemd)
;;(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)))))
(setq custom-file "~/.emacs.d/custom.el")
(load custom-file)
;; ## 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