-
-
Notifications
You must be signed in to change notification settings - Fork 196
/
nano.el
95 lines (77 loc) · 3.26 KB
/
nano.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
;; ---------------------------------------------------------------------
;; GNU Emacs / N Λ N O - Emacs made simple
;; Copyright (C) 2020 - N Λ N O developers
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;; ---------------------------------------------------------------------
(package-initialize)
;; Path to nano emacs modules (mandatory)
(add-to-list 'load-path "/Users/rougier/Documents/GitHub/nano-emacs")
(add-to-list 'load-path ".")
;; Default layout (optional)
(require 'nano-layout)
;; Theming Command line options (this will cancel warning messages)
(add-to-list 'command-switch-alist '("-dark" . (lambda (args))))
(add-to-list 'command-switch-alist '("-light" . (lambda (args))))
(add-to-list 'command-switch-alist '("-default" . (lambda (args))))
(add-to-list 'command-switch-alist '("-no-splash" . (lambda (args))))
(add-to-list 'command-switch-alist '("-no-help" . (lambda (args))))
(add-to-list 'command-switch-alist '("-compact" . (lambda (args))))
;; Customize support for 'emacs -q' (Optional)
;; You can enable customizations by creating the nano-custom.el file
;; with e.g. `touch nano-custom.el` in the folder containing this file.
(let* ((this-file (or load-file-name (buffer-file-name)))
(this-dir (file-name-directory this-file))
(custom-path (concat this-dir "nano-custom.el")))
(when (and (eq nil user-init-file)
(eq nil custom-file)
(file-exists-p custom-path))
(setq user-init-file this-file)
(setq custom-file custom-path)
(load custom-file)))
;; Theme
(require 'nano-faces)
(require 'nano-theme)
(require 'nano-theme-dark)
(require 'nano-theme-light)
(cond
((member "-default" command-line-args) t)
((member "-dark" command-line-args) (nano-theme-set-dark))
(t (nano-theme-set-light)))
(call-interactively 'nano-refresh-theme)
;; Nano default settings (optional)
(require 'nano-defaults)
;; Nano session saving (optional)
(require 'nano-session)
;; Nano header & mode lines (optional)
(require 'nano-modeline)
;; Nano key bindings modification (optional)
(require 'nano-bindings)
;; Compact layout (need to be loaded after nano-modeline)
(when (member "-compact" command-line-args)
(require 'nano-compact))
;; Nano counsel configuration (optional)
;; Needs "counsel" package to be installed (M-x: package-install)
;; (require 'nano-counsel)
;; Welcome message (optional)
(let ((inhibit-message t))
(message "Welcome to GNU Emacs / N Λ N O edition")
(message (format "Initialization time: %s" (emacs-init-time))))
;; Splash (optional)
(unless (member "-no-splash" command-line-args)
(require 'nano-splash))
;; Help (optional)
(unless (member "-no-help" command-line-args)
(require 'nano-help))
(provide 'nano)