Last active
February 21, 2022 05:46
-
-
Save sogaiu/0b0d078217645d3654933829a605dc00 to your computer and use it in GitHub Desktop.
janet-mode + janet-editor-elf + rainbow-delimiters + monokai via straight for emacs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; ~/.emacs.d/init.el | |
;; via: | |
;; https://github.com/raxod502/straight.el#getting-started | |
(defvar bootstrap-version) | |
(let ((bootstrap-file | |
(expand-file-name "straight/repos/straight.el/bootstrap.el" | |
user-emacs-directory)) | |
(bootstrap-version 5)) | |
(unless (file-exists-p bootstrap-file) | |
(with-current-buffer | |
(url-retrieve-synchronously | |
(concat "https://raw.githubusercontent.com/" | |
"raxod502/straight.el/develop/install.el") | |
'silent 'inhibit-cookies) | |
(goto-char (point-max)) | |
(eval-print-last-sexp))) | |
(load bootstrap-file nil 'nomessage)) | |
;; via: | |
;; https://github.com/raxod502/straight.el#integration-with-use-package | |
(straight-use-package 'use-package) | |
(setq straight-use-package-by-default t) | |
;;; monokai | |
(straight-use-package | |
'(monokai-theme :host github | |
:repo "oneKelvinSmith/monokai-emacs" | |
:files ("*.el"))) | |
(load-theme 'monokai t) | |
(use-package rainbow-delimiters | |
:straight t | |
:config | |
(custom-set-faces | |
;; XXX: doesn't seem too helpful for the unclosed case? | |
;;'(rainbow-delimiters-unmatched-face ((t (:foreground "purple")))) | |
'(rainbow-delimiters-depth-1-face ((t (:foreground "dark orange")))) | |
'(rainbow-delimiters-depth-2-face ((t (:foreground "deep pink")))) | |
'(rainbow-delimiters-depth-3-face ((t (:foreground "chartreuse")))) | |
'(rainbow-delimiters-depth-4-face ((t (:foreground "deep sky blue")))) | |
'(rainbow-delimiters-depth-5-face ((t (:foreground "yellow")))) | |
'(rainbow-delimiters-depth-6-face ((t (:foreground "orchid")))) | |
'(rainbow-delimiters-depth-7-face ((t (:foreground "spring green")))) | |
'(rainbow-delimiters-depth-8-face ((t (:foreground "sienna1"))))) | |
;; XXX: here or elsewhere? | |
(add-hook 'emacs-lisp-mode-hook 'rainbow-delimiters-mode) | |
(add-hook 'janet-mode-hook 'rainbow-delimiters-mode) | |
) | |
;;; janet-mode | |
(straight-use-package | |
'(janet-mode :host github | |
:repo "ALSchwalm/janet-mode" | |
:files ("*.el"))) | |
(use-package janet-mode | |
:straight t) | |
(straight-use-package | |
'(janet-editor-elf :host github | |
:repo "sogaiu/janet-editor-elf" | |
:files ("*.el" "janet-editor-elf"))) | |
(use-package janet-editor-elf | |
:straight t | |
:config | |
;; menu | |
(add-hook 'janet-mode-hook #'jee-mode) | |
;; indentation | |
(add-hook 'janet-mode-hook | |
(lambda () | |
;; line indentation | |
(setq-local indent-line-function | |
#'jee-indent-line) | |
;; region indentation | |
(setq-local indent-region-function | |
#'jee-indent-region)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment