Use changes on MAC on Linux
TODO: * Load extra-packages in a proper fashion * Conditionally load chruby, org-jira, ...
This commit is contained in:
parent
d0ab934aba
commit
728ac74f3e
|
@ -24,7 +24,7 @@
|
||||||
'(css-indent-offset 2)
|
'(css-indent-offset 2)
|
||||||
'(custom-safe-themes
|
'(custom-safe-themes
|
||||||
(quote
|
(quote
|
||||||
("1c643a2d75eb06e39c552005eeb8b4cf52deccd895eaab3880fb299ae6bc41b4" default)))
|
("c91a5bf65b3f79ab28ab350b1d16c24d8b8bc1201e9c6c2106a60f98bceae754" default)))
|
||||||
'(delete-selection-mode t)
|
'(delete-selection-mode t)
|
||||||
'(dired-isearch-filenames t)
|
'(dired-isearch-filenames t)
|
||||||
'(display-buffer-alist
|
'(display-buffer-alist
|
||||||
|
@ -105,12 +105,19 @@
|
||||||
(setenv "XDG_DATA_HOME" (substitute-in-file-name "$HOME/.local/share"))
|
(setenv "XDG_DATA_HOME" (substitute-in-file-name "$HOME/.local/share"))
|
||||||
(setenv "XDG_CACHE_HOME" (substitute-in-file-name "$HOME/.cache")))
|
(setenv "XDG_CACHE_HOME" (substitute-in-file-name "$HOME/.cache")))
|
||||||
|
|
||||||
|
(defun load-monokai ()
|
||||||
|
"Load the monokai dark theme."
|
||||||
|
(add-to-list 'custom-theme-load-path
|
||||||
|
(substitute-in-file-name
|
||||||
|
"$XDG_CONFIG_HOME/emacs/lisp/monokai-dark-theme/"))
|
||||||
|
(load-theme 'monokai-dark))
|
||||||
|
|
||||||
(defun x11-shim ()
|
(defun x11-shim ()
|
||||||
"Replace some behaviour otherwise handled by other system services."
|
"Replace some behaviour otherwise handled by other system services."
|
||||||
;; (load-theme 'monokai-dark)
|
;; (load-theme 'monokai-dark)
|
||||||
;; TODO Why is this not handled by the magic with the load-path above?
|
;; TODO Why is this not handled by the magic with the load-path above?
|
||||||
(set-xdg-variables)
|
(set-xdg-variables)
|
||||||
(load-file (substitute-in-file-name "$XDG_CONFIG_HOME/emacs/lisp/monokai-dark-theme/monokai-dark-theme.el")))
|
(load-monokai))
|
||||||
|
|
||||||
;;; Needed on MAC because we're not using Xresources :(
|
;;; Needed on MAC because we're not using Xresources :(
|
||||||
(if (not (eq window-system 'x))
|
(if (not (eq window-system 'x))
|
||||||
|
@ -123,10 +130,12 @@
|
||||||
(defvar extra-libs-root "~/.config/emacs/lisp")
|
(defvar extra-libs-root "~/.config/emacs/lisp")
|
||||||
|
|
||||||
(defvar additional-packages
|
(defvar additional-packages
|
||||||
(list
|
'(("agda-mode"
|
||||||
"agda-mode"
|
"psc-ide-emacs"
|
||||||
"psc-ide-emacs"
|
"org-jira"
|
||||||
"jira"))
|
"jira"
|
||||||
|
"spark"
|
||||||
|
"chruby")))
|
||||||
|
|
||||||
;; (let* ((additional-packages
|
;; (let* ((additional-packages
|
||||||
;; (list
|
;; (list
|
||||||
|
@ -140,9 +149,15 @@
|
||||||
;; (add-to-list 'Info-default-directory-list p)))))
|
;; (add-to-list 'Info-default-directory-list p)))))
|
||||||
;; (mapc add-package additional-packages))
|
;; (mapc add-package additional-packages))
|
||||||
|
|
||||||
(let ((default-directory (substitute-in-file-name "$XDG_CONFIG_HOME/emacs/lisp")))
|
(let ((default-directory (substitute-in-file-name "$XDG_CONFIG_HOME/emacs/lisp/")))
|
||||||
(normal-top-level-add-subdirs-to-load-path))
|
(normal-top-level-add-subdirs-to-load-path))
|
||||||
|
|
||||||
|
(add-to-list 'custom-theme-load-path
|
||||||
|
(substitute-in-file-name
|
||||||
|
"$XDG_CONFIG_HOME/emacs/lisp/inheritance-theme/"))
|
||||||
|
|
||||||
|
(load-theme 'inheritance)
|
||||||
|
|
||||||
(require 'agda2-mode)
|
(require 'agda2-mode)
|
||||||
|
|
||||||
;; (require 'lsp)
|
;; (require 'lsp)
|
||||||
|
@ -162,18 +177,7 @@
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
;; Your init file should contain only one such instance.
|
;; Your init file should contain only one such instance.
|
||||||
;; If there is more than one, they won't work right.
|
;; If there is more than one, they won't work right.
|
||||||
'(default ((t (:inherit nil :stipple nil :background "#292b2e" :foreground "#e8e8e8" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 150 :width normal :foundry "nil" :family "Source Code Pro"))))
|
|
||||||
'(font-lock-comment-face ((t (:foreground "chocolate1"))))
|
'(font-lock-comment-face ((t (:foreground "chocolate1"))))
|
||||||
'(ido-indicator ((t (:inherit highlight :width condensed))))
|
|
||||||
'(ido-only-match ((t (:inherit highlight))))
|
|
||||||
'(ido-subdir ((t (:inherit shadow))))
|
|
||||||
'(js2-error ((t (:inherit error))))
|
|
||||||
'(js2-external-variable ((t (:inherit font-lock-builtin-face))))
|
|
||||||
'(js2-function-param ((t (:inherit font-lock-variable-name-face))))
|
|
||||||
'(js2-instance-member ((t (:inherit font-lock-variable-name-face))))
|
|
||||||
'(js2-jsdoc-html-tag-delimiter ((t (:inherit basic))))
|
|
||||||
'(js2-jsdoc-type ((t (:inherit font-lock-type-face))))
|
|
||||||
'(js2-warning ((t (:inherit warning))))
|
|
||||||
'(region ((t (:background "#285b89"))))
|
'(region ((t (:background "#285b89"))))
|
||||||
'(success ((t (:foreground "Green3" :weight bold)))))
|
'(success ((t (:foreground "Green3" :weight bold)))))
|
||||||
|
|
||||||
|
@ -262,45 +266,42 @@
|
||||||
(setq ruby-deep-indent-paren nil)
|
(setq ruby-deep-indent-paren nil)
|
||||||
(setq ruby-align-to-stmt-keywords t)
|
(setq ruby-align-to-stmt-keywords t)
|
||||||
|
|
||||||
(add-to-list 'load-path "~/.config/emacs/git/spark")
|
|
||||||
(add-to-list 'load-path "~/.config/emacs/git/chruby")
|
|
||||||
|
|
||||||
(require 'chruby)
|
|
||||||
|
|
||||||
(setq select-enable-clipboard t)
|
(setq select-enable-clipboard t)
|
||||||
|
|
||||||
(add-hook 'ruby-mode-hook '(lambda ()
|
(add-hook 'ruby-mode-hook '(lambda ()
|
||||||
(global-set-key (kbd "C-c C-M-n") 'ruby-forward-sexp)
|
(global-set-key (kbd "C-c C-M-n") 'ruby-forward-sexp)
|
||||||
(global-set-key (kbd "C-c C-M-p") 'ruby-backward-sexp)))
|
(global-set-key (kbd "C-c C-M-p") 'ruby-backward-sexp)))
|
||||||
|
|
||||||
(defun sql-beautify-region (beg end)
|
(defun sql-beautify-region (beg end)
|
||||||
"Beautify SQL in region between beg and END.
|
"Beautify SQL in region between BEG and END.
|
||||||
Dependency:
|
Dependency:
|
||||||
npm i -g sql-formatter-cli"
|
npm i -g sql-formatter-cli"
|
||||||
(interactive "r")
|
(interactive "r")
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(shell-command-on-region beg end "sql-formatter-cli" nil t)))
|
(shell-command-on-region beg end "sql-formatter-cli" nil t)))
|
||||||
(defun sql-beautify-buffer ()
|
|
||||||
|
(defun sql-beautify-buffer ()
|
||||||
"Beautify SQL in buffer."
|
"Beautify SQL in buffer."
|
||||||
(interactive)
|
(interactive)
|
||||||
(sql-beautify-region (point-min) (point-max)))
|
(sql-beautify-region (point-min) (point-max)))
|
||||||
(add-hook 'sql-mode-hook '(lambda ()
|
|
||||||
;; beautify region or buffer
|
(add-hook 'sql-mode-hook '(lambda ()
|
||||||
(local-set-key (kbd "C-c t") 'sql-beautify-region)))
|
;; beautify region or buffer
|
||||||
|
(local-set-key (kbd "C-c t") 'sql-beautify-region)))
|
||||||
(put 'dired-find-alternate-file 'disabled nil)
|
(put 'dired-find-alternate-file 'disabled nil)
|
||||||
|
|
||||||
;; org-jira [https://github.com/ahungry/org-jira]
|
;; org-jira [https://github.com/ahungry/org-jira]
|
||||||
(require 'org-jira)
|
;; (require 'org-jira)
|
||||||
(setq jiralib-url "https://zendesk.atlassian.net")
|
;; (setq jiralib-url "https://zendesk.atlassian.net")
|
||||||
|
|
||||||
;;; Jira
|
;;; Jira
|
||||||
(require 'jira)
|
;; (require 'jira)
|
||||||
(global-set-key (kbd "C-c j") 'jira)
|
(global-set-key (kbd "C-c j") 'jira)
|
||||||
|
|
||||||
(put 'upcase-region 'disabled nil)
|
(put 'upcase-region 'disabled nil)
|
||||||
(put 'downcase-region 'disabled nil)
|
(put 'downcase-region 'disabled nil)
|
||||||
(put 'set-goal-column 'disabled nil)
|
(put 'set-goal-column 'disabled nil)
|
||||||
(when (memq window-system '(mac ns x))
|
(when (memq window-system '(mac))
|
||||||
(exec-path-from-shell-initialize))
|
(exec-path-from-shell-initialize))
|
||||||
|
|
||||||
;;; init.el ends here
|
;;; init.el ends here
|
||||||
|
|
42
emacs/lisp/inheritance-theme/inheritance-theme.el
Normal file
42
emacs/lisp/inheritance-theme/inheritance-theme.el
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
;;; inheritance-dark-theme --- Summary:
|
||||||
|
;;;
|
||||||
|
;;; A bare-bones version of the monokai-dark theme.
|
||||||
|
;;;
|
||||||
|
;;; Commentary:
|
||||||
|
;;; Code:
|
||||||
|
(deftheme inheritance
|
||||||
|
"Theme to make various packages use inherited values for
|
||||||
|
styling from other packages.")
|
||||||
|
|
||||||
|
(custom-theme-set-variables
|
||||||
|
'inheritance
|
||||||
|
'(agda2-highlight-face-groups (quote default-faces)))
|
||||||
|
|
||||||
|
(require 'color)
|
||||||
|
|
||||||
|
(custom-theme-set-faces
|
||||||
|
'inheritance
|
||||||
|
'(fringe ((t (:inherit \1))))
|
||||||
|
'(custom-group-tag ((t (:inherit variable-pitch))))
|
||||||
|
'(custom-group-tag-1 ((t (:inherit variable-pitch))))
|
||||||
|
'(company-scrollbar-bg ((t (:inherit mode-line-inactive))))
|
||||||
|
'(company-scrollbar-fg ((t (:inherit mode-line))))
|
||||||
|
'(company-tooltip ((t (:inherit default))))
|
||||||
|
'(company-tooltip-common ((t (:inherit shadow))))
|
||||||
|
'(company-tooltip-selection ((t (:inherit highlight))))
|
||||||
|
'(company-preview ((t (:inherit shadow))))
|
||||||
|
'(company-preview-common ((t (:inherit company-preview))))
|
||||||
|
'(company-preview-search ((t (:inherit company-preview))))
|
||||||
|
'(ido-indicator ((t (:inherit highlight :width condensed))))
|
||||||
|
'(ido-only-match ((t (:inherit highlight))))
|
||||||
|
'(ido-subdir ((t (:inherit shadow))))
|
||||||
|
'(js2-error ((t (:inherit error))))
|
||||||
|
'(js2-external-variable ((t (:inherit font-lock-builtin-face))))
|
||||||
|
'(js2-function-param ((t (:inherit font-lock-variable-name-face))))
|
||||||
|
'(js2-instance-member ((t (:inherit font-lock-variable-name-face))))
|
||||||
|
'(js2-jsdoc-html-tag-delimiter ((t (:inherit basic))))
|
||||||
|
'(js2-jsdoc-type ((t (:inherit font-lock-type-face))))
|
||||||
|
'(js2-warning ((t (:inherit warning)))))
|
||||||
|
|
||||||
|
(provide-theme 'inheritance)
|
||||||
|
;;; inheritance-theme.el ends here
|
|
@ -17,21 +17,12 @@
|
||||||
(custom-theme-set-faces
|
(custom-theme-set-faces
|
||||||
'monokai-dark
|
'monokai-dark
|
||||||
'(default ((t (:inherit nil :stipple nil :background "#292b2e" :foreground "#e8e8e8" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 150 :width normal :family "Source Code Pro"))))
|
'(default ((t (:inherit nil :stipple nil :background "#292b2e" :foreground "#e8e8e8" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 150 :width normal :family "Source Code Pro"))))
|
||||||
'(fringe ((t (:inherit \1))))
|
|
||||||
'(custom-group-tag ((t (:inherit variable-pitch :foreground "light blue" :weight bold :height 1))))
|
'(custom-group-tag ((t (:inherit variable-pitch :foreground "light blue" :weight bold :height 1))))
|
||||||
'(custom-group-tag-1 ((t (:inherit variable-pitch :foreground "pink" :weight bold :height 1))))
|
'(custom-group-tag-1 ((t (:inherit variable-pitch :foreground "pink" :weight bold :height 1))))
|
||||||
'(shadow ((t (:foreground "grey70"))))
|
'(shadow ((t (:foreground "grey70"))))
|
||||||
'(variable-pitch ((t nil)))
|
'(variable-pitch ((t nil)))
|
||||||
'(whitespace-trailing ((t (:background "#542b2e"))))
|
'(whitespace-trailing ((t (:background "#542b2e"))))
|
||||||
'(company-scrollbar-bg ((t (:inherit mode-line-inactive))))
|
'(custom-group-tag ((t (:inherit variable-pitch :foreground "light blue" :weight bold :height 1.0)))))
|
||||||
'(company-scrollbar-fg ((t (:inherit mode-line))))
|
|
||||||
'(company-tooltip ((t (:inherit default))))
|
|
||||||
'(company-tooltip-common ((t (:inherit shadow))))
|
|
||||||
'(company-tooltip-selection ((t (:inherit highlight))))
|
|
||||||
'(custom-group-tag ((t (:inherit variable-pitch :foreground "light blue" :weight bold :height 1.0))))
|
|
||||||
'(company-preview ((t (:inherit shadow))))
|
|
||||||
'(company-preview-common ((t (:inherit company-preview))))
|
|
||||||
'(company-preview-search ((t (:inherit company-preview)))))
|
|
||||||
|
|
||||||
(provide-theme 'monokai-dark)
|
(provide-theme 'monokai-dark)
|
||||||
;;; monokai-dark-theme.el ends here
|
;;; monokai-dark-theme.el ends here
|
||||||
|
|
Loading…
Reference in a new issue