Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install? #4

Open
anthrolisp opened this issue Jun 20, 2020 · 32 comments
Open

How to install? #4

anthrolisp opened this issue Jun 20, 2020 · 32 comments

Comments

@anthrolisp
Copy link

This is beautiful! How to install this "theme" alongside one's existing setup?
Thanks in advance!

@ianyepan
Copy link

Same ask!

@gcv
Copy link

gcv commented Jun 20, 2020

A good first step is to refactor all the custom set-face and set-face-attribute code into a real Emacs theme. It’ll take some work but shouldn’t be too hard. After that, it seems to me that elegance can be loaded with require or use-package or something similar. It would be a good idea to put the rest of the customization into a global minor mode, since that would make it easy to toggle on and off in a self-contained way.

I’d volunteer to make a PR, but I’m kinda swamped with other work right now.

@tiagofabre
Copy link

tiagofabre commented Jun 21, 2020

You can clone this repo inside ~/.emacs.d, then you need to import it inside your ~/.emacs file, just like that:

(add-to-list 'load-path "~/.emacs.d/elegant-emacs")
(require 'elegance)
(require 'sanity)

PS: I am not an emacs expert, I am just sharing what worked for me 😃

@johnhamelink
Copy link

johnhamelink commented Jun 21, 2020

How would you use this with doom emacs? I've tried the following:

packages.el:

(package! elegant-emacs
  :recipe (:host github :repo "rougier/elegant-emacs"))

config.el:

(use-package elegant-emacs)

Then I run doom sync, but I get the following error on startup:

Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "elegant-emacs")
  require(elegant-emacs nil nil)
  eval-buffer(#<buffer  *load*-907287> nil "/home/john/.config/doom/config.el" nil t)  ; Reading at buffer position 2688
  load-with-code-conversion("/home/john/.config/doom/config.el" "/home/john/.config/doom/config.el" t t)
  load("/home/john/.config/doom/config" t nomessage)
  (let (file-name-handler-alist) (load (expand-file-name "config" doom-private-dir) t (quote nomessage)))
  (condition-case e (let (file-name-handler-alist) (load (expand-file-name "config" doom-private-dir) t (quote nomessage))) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom--handle-load-error e (expand-file-name "config" doom-private-dir) doom-private-dir)))
  (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (run-hook-wrapped (quote doom-init-modules-hook) (function doom-try-run-hook)) (condition-case e (let (file-name-handler-alist) (load (expand-file-name "config" doom-private-dir) t (quote nomessage))) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom--handle-load-error e (expand-file-name "config" doom-private-dir) doom-private-dir))))
  (progn (if doom-debug-p (progn (let ((inhibit-message (active-minibuffer-window))) (message #("DOOM Initializing user config" 0 5 (face font-lock-comment-face)))))) (maphash (doom-module-loader doom-module-init-file) doom-modules) (run-hook-wrapped (quote doom-before-init-modules-hook) (function doom-try-run-hook)) (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (run-hook-wrapped (quote doom-init-modules-hook) (function doom-try-run-hook)) (condition-case e (let (file-name-handler-alist) (load (expand-file-name "config" doom-private-dir) t (quote nomessage))) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom--handle-load-error e (expand-file-name "config" doom-private-dir) doom-private-dir)))))
  (if init-p (progn (if doom-debug-p (progn (let ((inhibit-message (active-minibuffer-window))) (message #("DOOM Initializing user config" 0 5 (face font-lock-comment-face)))))) (maphash (doom-module-loader doom-module-init-file) doom-modules) (run-hook-wrapped (quote doom-before-init-modules-hook) (function doom-try-run-hook)) (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (run-hook-wrapped (quote doom-init-modules-hook) (function doom-try-run-hook)) (condition-case e (let (file-name-handler-alist) (load (expand-file-name "config" doom-private-dir) t (quote nomessage))) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom--handle-load-error e (expand-file-name "config" doom-private-dir) doom-private-dir))))) nil)
  (let* ((init-p (and t (condition-case e (let (file-name-handler-alist) (load (expand-file-name doom-module-init-file doom-private-dir) t (quote nomessage))) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom--handle-load-error e (expand-file-name doom-module-init-file doom-private-dir) doom-private-dir)))))) (if init-p (progn (if doom-debug-p (progn (let ((inhibit-message ...)) (message #("DOOM Initializing user config" 0 5 (face font-lock-comment-face)))))) (maphash (doom-module-loader doom-module-init-file) doom-modules) (run-hook-wrapped (quote doom-before-init-modules-hook) (function doom-try-run-hook)) (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (run-hook-wrapped (quote doom-init-modules-hook) (function doom-try-run-hook)) (condition-case e (let (file-name-handler-alist) (load (expand-file-name "config" doom-private-dir) t (quote nomessage))) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom--handle-load-error e (expand-file-name "config" doom-private-dir) doom-private-dir))))) nil))
  (progn (setq doom-init-modules-p t) (if no-config-p nil (if doom-debug-p (progn (let ((inhibit-message (active-minibuffer-window))) (message #("DOOM Initializing core modules" 0 5 (face font-lock-comment-face)))))) (doom-initialize-core-modules)) (let* ((init-p (and t (condition-case e (let (file-name-handler-alist) (load ... t ...)) ((debug doom-error) (signal ... ...)) ((debug error) (doom--handle-load-error e ... doom-private-dir)))))) (if init-p (progn (if doom-debug-p (progn (let (...) (message #("DOOM Initializing user config" 0 5 (face font-lock-comment-face)))))) (maphash (doom-module-loader doom-module-init-file) doom-modules) (run-hook-wrapped (quote doom-before-init-modules-hook) (function doom-try-run-hook)) (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (run-hook-wrapped (quote doom-init-modules-hook) (function doom-try-run-hook)) (condition-case e (let (file-name-handler-alist) (load ... t ...)) ((debug doom-error) (signal ... ...)) ((debug error) (doom--handle-load-error e ... doom-private-dir))))) nil)))
  (if (or force-p (not doom-init-modules-p)) (progn (setq doom-init-modules-p t) (if no-config-p nil (if doom-debug-p (progn (let ((inhibit-message ...)) (message #("DOOM Initializing core modules" 0 5 (face font-lock-comment-face)))))) (doom-initialize-core-modules)) (let* ((init-p (and t (condition-case e (let ... ...) (... ...) (... ...))))) (if init-p (progn (if doom-debug-p (progn (let ... ...))) (maphash (doom-module-loader doom-module-init-file) doom-modules) (run-hook-wrapped (quote doom-before-init-modules-hook) (function doom-try-run-hook)) (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (run-hook-wrapped (quote doom-init-modules-hook) (function doom-try-run-hook)) (condition-case e (let ... ...) (... ...) (... ...)))) nil))))
  doom-initialize-modules(nil)
  (progn (setq doom-init-p t) (if doom-debug-p (progn (let ((inhibit-message (active-minibuffer-window))) (message #("DOOM Initializing Doom" 0 5 (face font-lock-comment-face)))))) (setq-default exec-path doom--initial-exec-path load-path doom--initial-load-path process-environment doom--initial-process-environment) (condition-case e (load (string-remove-suffix ".el" doom-autoload-file) nil (quote nomessage)) (file-missing (signal (quote doom-error) (list "Doom is in an incomplete state" "run 'bin/doom sync' on the command line to repair it")))) (if (or (display-graphic-p) (daemonp)) (doom-load-envvars-file doom-env-file (quote noerror))) (require (quote core-modules)) (autoload (quote doom-initialize-packages) "core-packages") (autoload (quote doom-initialize-core-packages) "core-packages") (eval-after-load (quote package) (function (lambda nil (require (quote core-packages))))) (eval-after-load (quote straight) (function (lambda nil (doom-initialize-packages)))) (add-hook (quote window-setup-hook) (function (lambda (&rest _) (add-hook (quote hack-local-variables-hook) (function doom-run-local-var-hooks-h)) (add-hook (quote after-change-major-mode-hook) (function doom-run-local-var-hooks-maybe-h) (quote append)) (add-hook (quote doom-first-input-hook) (function gcmh-mode)) (let ((fn (intern ...))) (fset fn (function (lambda ... ... ...))) (put (quote doom-first-input-hook) (quote permanent-local) t) (let ((--dolist-tail-- ...)) (while --dolist-tail-- (let ... ... ...)))) (let ((fn (intern ...))) (fset fn (function (lambda ... ... ...))) (put (quote doom-first-file-hook) (quote permanent-local) t) (let ((--dolist-tail-- ...)) (while --dolist-tail-- (let ... ... ...)))) (let ((fn (intern ...))) (fset fn (function (lambda ... ... ...))) (put (quote doom-first-buffer-hook) (quote permanent-local) t) (let ((--dolist-tail-- ...)) (while --dolist-tail-- (let ... ... ...)))))) nil nil) (add-hook (quote emacs-startup-hook) (function doom-load-packages-incrementally-h)) (add-hook (quote window-setup-hook) (function doom-display-benchmark-h) (quote append)) (if doom-debug-p (doom-debug-mode 1)) (doom-initialize-modules force-p))
  (if (or force-p (not doom-init-p)) (progn (setq doom-init-p t) (if doom-debug-p (progn (let ((inhibit-message (active-minibuffer-window))) (message #("DOOM Initializing Doom" 0 5 (face font-lock-comment-face)))))) (setq-default exec-path doom--initial-exec-path load-path doom--initial-load-path process-environment doom--initial-process-environment) (condition-case e (load (string-remove-suffix ".el" doom-autoload-file) nil (quote nomessage)) (file-missing (signal (quote doom-error) (list "Doom is in an incomplete state" "run 'bin/doom sync' on the command line to repair it")))) (if (or (display-graphic-p) (daemonp)) (doom-load-envvars-file doom-env-file (quote noerror))) (require (quote core-modules)) (autoload (quote doom-initialize-packages) "core-packages") (autoload (quote doom-initialize-core-packages) "core-packages") (eval-after-load (quote package) (function (lambda nil (require (quote core-packages))))) (eval-after-load (quote straight) (function (lambda nil (doom-initialize-packages)))) (add-hook (quote window-setup-hook) (function (lambda (&rest _) (add-hook (quote hack-local-variables-hook) (function doom-run-local-var-hooks-h)) (add-hook (quote after-change-major-mode-hook) (function doom-run-local-var-hooks-maybe-h) (quote append)) (add-hook (quote doom-first-input-hook) (function gcmh-mode)) (let ((fn ...)) (fset fn (function ...)) (put (quote doom-first-input-hook) (quote permanent-local) t) (let (...) (while --dolist-tail-- ...))) (let ((fn ...)) (fset fn (function ...)) (put (quote doom-first-file-hook) (quote permanent-local) t) (let (...) (while --dolist-tail-- ...))) (let ((fn ...)) (fset fn (function ...)) (put (quote doom-first-buffer-hook) (quote permanent-local) t) (let (...) (while --dolist-tail-- ...))))) nil nil) (add-hook (quote emacs-startup-hook) (function doom-load-packages-incrementally-h)) (add-hook (quote window-setup-hook) (function doom-display-benchmark-h) (quote append)) (if doom-debug-p (doom-debug-mode 1)) (doom-initialize-modules force-p)))
  doom-initialize()
  eval-buffer(#<buffer  *load*> nil "/home/john/.emacs.d/init.el" nil t)  ; Reading at buffer position 2620
  load-with-code-conversion("/home/john/.emacs.d/init.el" "/home/john/.emacs.d/init.el" t t)
  load("/home/john/.emacs.d/init" t t)
  #f(compiled-function () #<bytecode 0x1e26a1>)()
  command-line()
  normal-top-level()

My doom emacs setup looks like this:

emacs   version    26.3
        features   XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD LCMS2
        build      May 19, 2020
        buildopts  (--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-wide-int --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now)
        windowsys  x
        daemonp    server-running
doom    version    2.0.9
        build      HEAD -> develop 042cc781b 2020-06-20 03:02:05 -0400
        dir        ~/.config/doom/
system  type       gnu/linux
        config     x86_64-pc-linux-gnu
        shell      /bin/zsh
        uname      Linux 5.7.4-arch1-1 #1 SMP PREEMPT Thu, 18 Jun 2020 16:01:07 +0000 x86_64
        path       (~/.asdf/shims ~/.asdf/bin ~/.zinit/plugins/asdf-vm---asdf/bin ~/.local/bin ~/.local/bin ~/.zinit/polaris/sbin ~/.zinit/polaris/usr/sbin ~/.zinit/polaris/usr/bin ~/.local/bin ~/.emacs.d/bin/../bin ~/.local/bin ~/.zinit/snippets/http--ix.io/client ~/.zinit/plugins/mptre---yank ~/.zinit/plugins/twpayne---chezmoi ~/.zinit/plugins/direnv---direnv ~/.zinit/polaris/bin ~/.local/bin /usr/local/sbin /usr/local/bin /usr/bin /opt/android-sdk/emulator /usr/lib/jvm/default/bin /usr/bin/site_perl /usr/bin/vendor_perl /usr/bin/core_perl ~/.krew/bin ~/.emacs.d/bin ~/Android/Sdk/emulator ~/Android/Sdk/tools ~/Android/Sdk/tools/bin ~/Android/Sdk/platform-tools ~/.krew/bin ~/.emacs.d/bin ~/Android/Sdk/emulator ~/Android/Sdk/tools ~/Android/Sdk/tools/bin ~/Android/Sdk/platform-tools ~/.krew/bin ~/.emacs.d/bin ~/Android/Sdk/emulator ~/Android/Sdk/tools ~/Android/Sdk/tools/bin ~/Android/Sdk/platform-tools ~/.krew/bin ~/.emacs.d/bin ~/Android/Sdk/emulator ~/Android/Sdk/tools ~/Android/Sdk/tools/bin ~/Android/Sdk/platform-tools ~/.krew/bin ~/.emacs.d/bin ~/Android/Sdk/emulator ~/Android/Sdk/tools ~/Android/Sdk/tools/bin ~/Android/Sdk/platform-tools /usr/lib/emacs/26.3/x86_64-pc-linux-gnu/)
config  envfile    envvar-file
        elc-files  0
        modules    (:completion (company +childframe) ivy :ui deft doom doom-dashboard doom-quit hl-todo modeline nav-flash ophints (popup +defaults) (pretty-code +pragmata-pro) treemacs vc-gutter vi-tilde-fringe window-select workspaces zen :editor (evil +everywhere) file-templates fold snippets :emacs dired electric undo vc :term vterm :checkers syntax (spell +hunspell) grammar :tools (docker +lsp) editorconfig (eval +overlay) lookup (lsp +eglot) magit :lang data emacs-lisp (go +lsp) (haskell +lsp) (javascript +lsp) markdown (org +dragndrop +gnuplot +hugo +journal +roam +present) rest rust sh web yaml :email notmuch :app calendar (rss +org) :config (default +bindings +smartparens) literate)
        packages   ((elegant-emacs :recipe (:host github :repo rougier/elegant-emacs)) (k8s-mode) (org-super-agenda) (eglot) (prettier-js) (scanner :recipe (:host gitlab :repo rstocker/scanner)) (ox-hugo) (matrix-client :recipe (:host github :repo alphapapa/matrix-client.el)))
        unpin      (n/a)
        elpa       (n/a)

@a13
Copy link

a13 commented Jun 22, 2020

A good first step is to refactor all the custom set-face and set-face-attribute code into a real Emacs theme. It’ll take some work but shouldn’t be too hard. After that, it seems to me that elegance can be loaded with require or use-package or something similar. It would be a good idea to put the rest of the customization into a global minor mode, since that would make it easy to toggle on and off in a self-contained way.

I’d volunteer to make a PR, but I’m kinda swamped with other work right now.

I think it should be separated into multiple packages, like: elegance-light-theme, elegance-dark-theme, elegance-modeline and another one with minor mode (though most of the customizations could be customized via use-package)

@justinabrahms
Copy link

These are the relevant portions of code (based on having just walked through it) for the pieces of this that aren't the theme. Just pasting here so others can pluck the parts that make it look really nice and can match it with their preferred theme.

(set-face-font 'default "Roboto Mono Light 14")

(set-frame-parameter (selected-frame)
                     'internal-border-width 24)
(setq default-frame-alist
      (append (list '(width  . 72) '(height . 40)
                    '(vertical-scroll-bars . nil)
                    '(internal-border-width . 24)
                    '(font . "Roboto Mono Light 14"))))


;; Line spacing, can be 0 for code and 1 or 2 for text
(setq-default line-spacing 0)

;; Underline line at descent position, not baseline position
(setq x-underline-at-descent-line t)

;; No ugly button for checkboxes
(setq widget-image-enable nil)

;; Line cursor and no blink
(set-default 'cursor-type  '(bar . 1))
(blink-cursor-mode 0)

;; No sound
(setq visible-bell t)
(setq ring-bell-function 'ignore)

;; Paren mode is part of the theme
(show-paren-mode t)

;; this is a purposefully long line that I hope will show some things in the fringe
(fringe-mode '(0 . 0))
(defface fallback '((t :family "Fira Code Light"
                       :inherit 'face-faded)) "Fallback")
(set-display-table-slot standard-display-table 'truncation
                        (make-glyph-code ?… 'fallback))
(set-display-table-slot standard-display-table 'wrap
                        (make-glyph-code ?↩ 'fallback))

;; simplified mode line
(defun mode-line-render (left right)
  (let* ((available-width (- (window-width) (length left) )))
    (format (format "%%s %%%ds" available-width) left right)))
(setq-default mode-line-format
     '((:eval
       (mode-line-render
       (format-mode-line (list
         (propertize "☰" 'face `(:inherit mode-line-buffer-id)
                         'help-echo "Mode(s) menu"
                         'mouse-face 'mode-line-highlight
                         'local-map   mode-line-major-mode-keymap)
         " %b "
         (if (and buffer-file-name (buffer-modified-p))
             (propertize "(modified)" 'face `(:inherit face-faded)))))
       (format-mode-line
        (propertize "%4l:%2c  " 'face `(:inherit face-faded)))))))

;; move modeline to the top of the buffer
(setq-default header-line-format mode-line-format)
(setq-default mode-line-format'(""))

;; Vertical window divider
(setq window-divider-default-right-width 3)
(setq window-divider-default-places 'right-only)
(window-divider-mode)

@olavfosse
Copy link

Are anyone planning to put this on Melpa? Otherwise I might fork it and do it myself.

@justinabrahms
Copy link

justinabrahms commented Jul 11, 2020 via email

@stardiviner
Copy link

Glad to see this great work can be available on MELPA.

@olavfosse
Copy link

Alright. I will see what I can do.

@rougier
Copy link
Owner

rougier commented Jul 16, 2020

With some instructions on how to do it I can try to make it available on Melpa.

@stardiviner
Copy link

@rougier Check out MELPA README

https://github.com/melpa/melpa

@ianyepan
Copy link

@rougier It's pretty easy -- just add a recipe (like 3 lines) and make a PR to MELPA.

@olavfosse
Copy link

I had some problems with packaging it so for now I will leave the task to upstream.

@olavfosse
Copy link

@rougier It's pretty easy -- just add a recipe (like 3 lines) and make a PR to MELPA.

There is more to it than that. You cannot upload the repo as is. Instead you need to properly package it into a single file package and ensure that it passes all of Melpa's quality and packaging requirements. Initially I found this quite overwhelming as I was learning the basics of Emacs packaging concurrently.

If you have no experience creating Emacs packages I recommend starting out by reading [https://www.gnu.org/software/emacs/manual/html_node/elisp/Packaging.html](Preparing Lisp code for distribution) of the Emacs manual. Get it working locally before trying to pass Melpa's requirements.

@rougier
Copy link
Owner

rougier commented Jul 23, 2020

Thanks for all the pointers. I'll try to do it by the end of the month.

@firmart
Copy link

firmart commented Aug 22, 2020

Installation with quelpa-use-package:

  (use-package elegance
     :quelpa (elegance :fetcher github :repo "rougier/elegant-emacs")
     :ensure t
     :config
   (require 'elegance)
   ;; depending on whether or not you want sanity.el 
   (require 'sanity))

@stardiviner
Copy link

stardiviner commented Sep 6, 2020

Temporary use quelpa-use-package is fine.

I got error after install it:

Debugger entered--Lisp error: (wrong-type-argument listp 0)
  assoc-delete-all(left-fringe 0 eq)
  assq-delete-all(left-fringe 0)
  modify-all-frames-parameters(((left-fringe . 0) (right-fringe . 0)))
  set-fringe-mode((0 . 0))
  fringe-mode((0 . 0))
  byte-code("\306\307\310\"\210\311\312\313\"\210\314\315\316\317\320\321\257\5!\20\322\323 \324\325#\210\326\327\330\"\210\331\21\332\22\326\333\334\"\210\335\330!\210\331\23\336\24\337..." [default-frame-alist x-underline-at-descent-line widget-image-enable visible-bell ring-bell-function standard-display-table eval-after-load org #f(compiled-function () #<bytecode -0x1b73b21c7b362bfe>) set-face-font default "Roboto Mono Light 14" append (width . 72) (height . 40) (vertical-scroll-bars) (internal-border-width . 24) (font . "Roboto Mono Light 14") set-frame-parameter selected-frame internal-border-width 24 set-default line-spacing 0 t nil cursor-type (bar . 1) blink-cursor-mode ignore tooltip-mode show-paren-mode fringe-mode (0 . 0) custom-declare-face fallback ((t :family "Fira Code Light" :inherit 'face-faded)) "Fallback" set-display-table-slot truncation make-glyph-code 8230 wrap 8617 selective-display " …" vconcat] 6)
  require(elegance nil t)

@rougier
Copy link
Owner

rougier commented Sep 10, 2020

Maybe you need to install the fira code font. It is used to display symbols at end of cur/overcrapped lines (instead of the fringe)

@stardiviner
Copy link

I have fira code font installed. It seems not font problem?

@rougier
Copy link
Owner

rougier commented Sep 10, 2020

Oh, just realized I merged some mofification some days ago since we're preparing the package for Melpa. That might be the reason.

@angerman
Copy link

I've tried the same install as suggested by @firmart, however I had to comment out these:

;; (set-display-table-slot standard-display-table 'truncation
;;                         (make-glyph-code ?… 'fallback))
;; (set-display-table-slot standard-display-table 'wrap
;;                         (make-glyph-code ?↩ 'fallback))
;; (set-display-table-slot standard-display-table 'selective-display
;;                         (string-to-vector " …"))

as emacs would complain during initialisation that standard-display-table was nil?
This the subsequently (I believe) lead to change

(defun mode-line-render (left right)
  (let* ((available-width (- (window-width) (length left) )))
    (format (format "%%s %%%ds" available-width) left right)))

to reduce the window-width by two; or the column wouldn't be visible.

@angerman
Copy link

angerman commented Nov 24, 2020

I've ended up cloning the repo next to the init.el and doing this:

(defun load-relative-file (f)
  (load-file (expand-file-name f (file-name-directory load-file-name))))

(load-relative-file "elegant-emacs/sanity.el")
(load-relative-file "elegant-emacs/elegance.el")
(elegance-light) ;; I'd rather have the light than dark theme.

for some reason loading it via use-package produces lots of issues.

@rougier
Copy link
Owner

rougier commented Nov 28, 2020

You might be interested in https://github.com/rougier/nano-emacs where I try to break things into different files.

@cmdimov
Copy link

cmdimov commented Nov 29, 2020

For the Doom emacs users, adding the nano-emacs repository to packages.el:

(package! nano-emacs :recipe (:host github :repo "rougier/nano-emacs"))

and requiring the theme at the end of config.el, for example:

(require 'nano-theme-light)
(require 'nano-modeline)
(require 'nano-help)

seems to work. Note that (require 'nano-layout) gives an error.

@remysucre
Copy link

remysucre commented Nov 30, 2020

I also had to add (setq doom-theme 'nil) to prevent doom overwriting the theme with its default.

@elken
Copy link

elken commented Nov 30, 2020

disp-table is needed first. See full snippet for working on Doom Emacs.

(package! nano-emacs
  :recipe (:host github :repo "rougier/nano-emacs"))
(require 'disp-table)
(require 'nano-theme-dark)
(require 'nano-help)
(require 'nano-modeline)
(require 'nano-layout)

@remysucre
Copy link

Almost perfect! How about nano-splash? I knew I need to disable doom-dashboard in init.el, but after that the splash screen just flashes for a split second.

@elken
Copy link

elken commented Nov 30, 2020

My understanding is this is intentional behavior to load a scratch buffer after a second or so. @rougier can correct me otherwise though.

@rougier
Copy link
Owner

rougier commented Dec 3, 2020

Yes, the splash screen is supposed to stay for exactly 0.5 seconds (and can be even interrupted with any key of interaction).

@deggers
Copy link

deggers commented Dec 14, 2020

Hey,
i am not sure if its because of my doom configuration - though its pretty vanilla doom - but i needed to call the modes similar to the example configuration in my "config.el" for doom.

config.el

(setq doom-theme 'nil)
(require 'disp-table)
(require 'nano-faces)
(require 'nano-colors)
(require 'nano-defaults)
(require 'nano-theme)
(require 'nano-theme-dark)
(require 'nano-help)
(require 'nano-modeline)
(require 'nano-layout)
(nano-faces)
(nano-theme)
(nano-defaults)

I am not sure if all of this is needed - but it looks now how i expected it to look like :-)

For completeness following parts i also changed:

packages.el

(package! nano-emacs
  :recipe (:host github :repo "rougier/nano-emacs"))

Unfortunately I got this not yet in version control and henceforth cannot show a git diff for this. I am still playing around with Doom and nano-emacs :)

@rougier
Copy link
Owner

rougier commented Dec 17, 2020

Can you open an issue at https://github.com/rougier/nano-emacs once done?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests