loading user config added to main config file.
This commit is contained in:
parent
1574c0de19
commit
aaebf055f8
|
@ -2,11 +2,16 @@
|
|||
(toggle-debug-on-error)
|
||||
(require 'fg42)
|
||||
|
||||
;; Activate these extensions
|
||||
(activate-extensions 'editor
|
||||
'development
|
||||
'web
|
||||
'ruby)
|
||||
|
||||
;; Disable abilities which we do not want to load
|
||||
(disable 'rbenv)
|
||||
(describe-variable disabled-abilities)
|
||||
|
||||
;; Load user config file in ~/.fg42
|
||||
(load-user-config "~/.fg42")
|
||||
|
||||
(fg42-initialize)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
(require 'cl-lib)
|
||||
(require 'fg42/extension)
|
||||
|
||||
;; Functions ------------------------------
|
||||
(defun load--extension (extension)
|
||||
"Load a single extension and call its :on-initialize function"
|
||||
(let ((lib (concat "extensions/" (symbol-name extension))))
|
||||
|
@ -13,11 +14,16 @@
|
|||
|
||||
(defun initialize-extensions ()
|
||||
"Call the :on-initialize function on all extensions."
|
||||
(mapcar 'initialize--extension activated-extensions))
|
||||
(mapcar 'initialize--extension activated-extensions))
|
||||
|
||||
(defun activate-extensions (&rest extensions)
|
||||
"Mark given plugins to load on FG42"
|
||||
(setq activated-extensions extensions)
|
||||
(mapcar 'load--extension extensions))
|
||||
|
||||
(defun load-user-config (file)
|
||||
"Load the given path as user config file"
|
||||
(if (file-exists-p file)
|
||||
(load-file file)))
|
||||
|
||||
(provide 'fg42/base)
|
||||
|
|
Loading…
Reference in New Issue