Compare commits
No commits in common. "2bcfe2d14363c3512c09db4c5485b2ac53e9c909" and "13479ad907a3725aa69bcdccc66698ccfb303542" have entirely different histories.
2bcfe2d143
...
13479ad907
243
emacs.el
Normal file
243
emacs.el
Normal file
|
@ -0,0 +1,243 @@
|
|||
;;; init.el --- Summary
|
||||
;;; Commentary:
|
||||
;;; Initialization
|
||||
;;; Code:
|
||||
(require 'package)
|
||||
(add-to-list 'package-archives
|
||||
'("MELPA Stable" . "https://stable.melpa.org/packages/") t)
|
||||
(add-to-list 'package-archives
|
||||
'("MELPA" . "https://melpa.org/packages/") t)
|
||||
|
||||
(package-initialize)
|
||||
|
||||
|
||||
;;; Custom
|
||||
|
||||
(custom-set-variables
|
||||
;; custom-set-variables was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(agda2-highlight-face-groups (quote default-faces))
|
||||
'(agda2-program-args nil)
|
||||
'(auth-sources (quote ("~/.authinfo.gpg" "~/.authinfo" "~/.netrc")))
|
||||
'(blink-cursor-mode nil)
|
||||
'(column-number-mode t)
|
||||
'(delete-selection-mode t)
|
||||
'(dired-isearch-filenames t)
|
||||
'(display-buffer-alist
|
||||
(quote
|
||||
((".*Man.*" display-buffer-same-window)
|
||||
("Buffer List" display-buffer-same-window
|
||||
("magit-revision:" display-buffer-same-window)))))
|
||||
'(echo-keystrokes 1e-10)
|
||||
'(erc-autojoin-channels-alist (quote (("irc.freenode.net" "#haskell" "#data.coop"))))
|
||||
'(erc-autojoin-mode t)
|
||||
'(erc-nick "fredefox")
|
||||
'(erc-port 6667)
|
||||
'(erc-prompt-for-password nil)
|
||||
'(erc-server "irc.freenode.net")
|
||||
'(flycheck-emacs-lisp-load-path (quote inherit))
|
||||
'(flycheck-ghc-language-extensions
|
||||
(quote
|
||||
("UnicodeSyntax" "TypeApplications" "OverloadedStrings")))
|
||||
'(flycheck-hlint-language-extensions
|
||||
(quote
|
||||
("UnicodeSyntax" "TypeApplications" "OverloadedStrings")))
|
||||
'(haskell-indentation-where-post-offset 0)
|
||||
'(haskell-indentation-where-pre-offset 0)
|
||||
'(haskell-language-extensions (quote ("UnicodeSyntax" "TypeApplications")))
|
||||
'(haskell-tags-on-save t)
|
||||
'(indent-tabs-mode nil)
|
||||
'(initial-scratch-message nil)
|
||||
'(js-indent-level 2)
|
||||
'(line-move-visual nil)
|
||||
'(magit-display-buffer-function (quote magit-display-buffer-same-window-except-diff-v1))
|
||||
'(magit-popup-display-buffer-action nil)
|
||||
'(markdown-command "pandoc -t html")
|
||||
'(menu-bar-mode nil)
|
||||
'(message-send-mail-function (quote smtpmail-send-it))
|
||||
'(org-agenda-files "~/.config/orgmode/agenda_files")
|
||||
'(package-selected-packages
|
||||
(quote
|
||||
(image+ company org-jira which-key flycheck es-mode lsp-haskell forge projectile exec-path-from-shell lsp-ui lsp-mode editorconfig purescript-mode markdown-mode+ ssh-agency dash yaml-mode restart-emacs markdown-mode magit helm haskell-mode haml-mode form-feed dashboard)))
|
||||
'(projectile-mode t nil (projectile))
|
||||
'(projectile-project-search-path (quote ("~/git/")))
|
||||
'(purescript-mode-hook (quote (turn-on-purescript-indentation)) t)
|
||||
'(recentf-max-menu-items 255)
|
||||
'(recentf-mode t)
|
||||
'(scroll-bar-mode nil)
|
||||
'(scroll-conservatively 101)
|
||||
'(scroll-margin 0)
|
||||
'(select-enable-clipboard t)
|
||||
'(send-mail-function (quote smtpmail-send-it))
|
||||
'(sgml-basic-offset 1)
|
||||
'(show-paren-mode t)
|
||||
'(set-mark-command-repeat-pop t)
|
||||
'(show-trailing-whitespace t)
|
||||
'(shr-width 80)
|
||||
'(split-window-keep-point nil)
|
||||
'(temp-buffer-resize-mode nil)
|
||||
'(tool-bar-mode nil)
|
||||
'(vc-follow-symlinks nil)
|
||||
'(window-combination-resize t)
|
||||
'(window-resize-pixelwise t))
|
||||
|
||||
|
||||
;;;; Faces
|
||||
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(agda2-highlight-unsolved-constraint-face ((t (:background "dark orange"))))
|
||||
'(agda2-highlight-unsolved-meta-face ((t (:background "dark orange"))))
|
||||
'(font-lock-comment-face ((t (:foreground "chocolate1"))))
|
||||
'(font-lock-keyword-face ((t (:foreground "Cyan1"))))
|
||||
'(variable-pitch ((t nil))))
|
||||
|
||||
|
||||
;;;; Additional packages
|
||||
|
||||
(defvar extra-libs-root "~/.config/emacs/libs")
|
||||
|
||||
(defvar additional-packages
|
||||
(list
|
||||
"agda-mode"
|
||||
"psc-ide-emacs"))
|
||||
|
||||
;; TODO: Use the following pattern
|
||||
;; (substitute-in-file-name "$XDG_DATA_HOME/emacs/libs/%s")
|
||||
|
||||
(add-to-list 'load-path "~/.config/emacs/libs/agda-mode/")
|
||||
(add-to-list 'Info-default-directory-list "~/.config/emacs/libs/agda-mode/")
|
||||
(add-to-list 'load-path "~/.config/emacs/libs/psc-ide-emacs/")
|
||||
(add-to-list 'Info-default-directory-list "~/.config/emacs/libs/psc-ide-emacs/")
|
||||
|
||||
(require 'agda2-mode)
|
||||
|
||||
;; (require 'lsp)
|
||||
;; Shame! `lsp-ui` is emitting:
|
||||
;; Eager macro-expansion failure: (wrong-type-argument listp kind)
|
||||
;; (require 'lsp-ui)
|
||||
;; (require 'lsp-haskell)
|
||||
;; (add-hook 'lsp-mode-hook 'lsp-ui-mode)
|
||||
;; (add-hook 'haskell-mode-hook #'lsp)
|
||||
|
||||
|
||||
;;;; Captain Hook
|
||||
|
||||
(global-set-key (kbd "C-x C-r") 'recentf-open-files)
|
||||
(global-set-key (kbd "C-x r v") 'revert-buffer)
|
||||
|
||||
(add-hook 'text-mode-hook
|
||||
(lambda ()
|
||||
(word-wrap-mode)
|
||||
(recentf-mode)
|
||||
(flyspell-mode)))
|
||||
|
||||
(add-hook 'prog-mode-hook
|
||||
(lambda ()
|
||||
(form-feed-mode)
|
||||
(flycheck-mode)))
|
||||
;; I think this breaks e.g. the color-picker
|
||||
; (add-hook 'text-mode-hook 'form-feed-mode)
|
||||
(add-hook 'haskell-mode-hook 'interactive-haskell-mode)
|
||||
(add-hook 'ruby-mode-hook (lambda() (subword-mode 1)))
|
||||
;; global-company-mode keeps recentering the point on the screen for
|
||||
;; some reason
|
||||
; (add-hook 'after-init-hook 'global-company-mode)
|
||||
;; (add-hook 'after-init-hook 'flycheck-mode)
|
||||
|
||||
;; ;; (require 'haskell-unicode-input-method)
|
||||
|
||||
|
||||
;;;; Projectile
|
||||
(require 'projectile)
|
||||
|
||||
(projectile-mode +1)
|
||||
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
|
||||
|
||||
|
||||
;;;; Dashboard
|
||||
|
||||
(require 'dashboard)
|
||||
(dashboard-setup-startup-hook)
|
||||
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))
|
||||
(setq dashboard-startup-banner (substitute-in-file-name "$XDG_DATA_HOME/emacs/banner.svg"))
|
||||
(setq dashboard-items '((recents . 40)))
|
||||
|
||||
;;;; Miscelaneous
|
||||
(setq-default indent-tabs-mode nil)
|
||||
|
||||
(setq ring-bell-function
|
||||
(lambda ()
|
||||
(let ((orig-bg (face-background 'mode-line)))
|
||||
(set-face-background 'mode-line (face-attribute 'error :foreground))
|
||||
(run-with-idle-timer 0.1 nil
|
||||
(lambda (bg)
|
||||
(set-face-background 'mode-line bg)) orig-bg))))
|
||||
|
||||
(global-unset-key (kbd "C-z"))
|
||||
|
||||
;;;; Magit
|
||||
(global-set-key (kbd "C-x g") 'magit-status)
|
||||
(global-set-key (kbd "C-x M-g") 'magit-dispatch-popup)
|
||||
|
||||
(require 'haskell-mode-autoloads)
|
||||
|
||||
;; (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu/mu4e")
|
||||
|
||||
|
||||
;;;; mu4e
|
||||
(setq send-mail-function 'smtpmail-send-it
|
||||
user-mail-address "fhi.1990@gmail.com"
|
||||
smtpmail-default-smtp-server "smtp.gmail.com"
|
||||
smtpmail-smtp-server "smtp.gmail.com"
|
||||
;; smtpmail-stream-type 'starttls
|
||||
smtpmail-smtp-service 587)
|
||||
|
||||
;; Now I set a list of
|
||||
;; (defvar my-mu4e-account-alist
|
||||
;; '(("Gmail"
|
||||
;; (mu4e-sent-folder "/Gmail/sent")
|
||||
;; (user-mail-address "fhi.1990@gmail.com")
|
||||
;; (smtpmail-smtp-user "fhi.1990")
|
||||
;; (smtpmail-local-domain "gmail.com")
|
||||
;; (smtpmail-default-smtp-server "smtp.gmail.com")
|
||||
;; (smtpmail-smtp-server "smtp.gmail.com")
|
||||
;; (smtpmail-smtp-service 587)
|
||||
;; )
|
||||
;; ;; Include any other accounts here ...
|
||||
;; ))
|
||||
|
||||
;;; ERC
|
||||
(require 'erc)
|
||||
(erc-autojoin-mode)
|
||||
|
||||
;;; Yaml
|
||||
(require 'yaml-mode)
|
||||
(define-key yaml-mode-map "|" nil)
|
||||
(define-key yaml-mode-map ">" nil)
|
||||
(define-key yaml-mode-map "-" nil)
|
||||
(define-key yaml-mode-map "." nil)
|
||||
|
||||
;;; Enable disabled stuff
|
||||
(put 'set-goal-column 'disabled nil)
|
||||
(put 'narrow-to-region 'disabled nil)
|
||||
|
||||
;;; Ruby
|
||||
(setq ruby-deep-indent-paren nil)
|
||||
(setq ruby-use-smie nil)
|
||||
|
||||
;;; Jira
|
||||
;; org-jira [https://github.com/ahungry/org-jira]
|
||||
(require 'org-jira)
|
||||
(setq jiralib-url "https://zendesk.atlassian.net")
|
||||
|
||||
(add-to-list 'load-path "~/.config/emacs/lisp")
|
||||
(require 'jira)
|
||||
(define-key jira-mode-map (kbd "C-c j") 'jira-command-map)
|
||||
|
||||
;;; init.el ends here
|
301
emacs/init.el
301
emacs/init.el
|
@ -1,301 +0,0 @@
|
|||
;;; init.el --- Summary
|
||||
;;; Commentary:
|
||||
;;; Initialization
|
||||
;;; Code:
|
||||
(require 'package)
|
||||
(add-to-list 'package-archives
|
||||
'("MELPA" . "https://melpa.org/packages/") t)
|
||||
|
||||
(package-initialize)
|
||||
|
||||
|
||||
;;; Custom
|
||||
|
||||
(custom-set-variables
|
||||
;; custom-set-variables was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(agda2-program-args nil)
|
||||
'(auth-sources (quote ("~/.authinfo.gpg" "~/.authinfo" "~/.netrc")))
|
||||
'(blink-cursor-mode nil)
|
||||
'(column-number-mode t)
|
||||
'(company-tooltip-minimum-width 35)
|
||||
'(css-indent-offset 2)
|
||||
'(custom-safe-themes
|
||||
(quote
|
||||
("aa81baddda211ffab84a5dc68750ac519d4841be63907a6b5de0cd72e631b172" "c91a5bf65b3f79ab28ab350b1d16c24d8b8bc1201e9c6c2106a60f98bceae754" default)))
|
||||
'(delete-selection-mode t)
|
||||
'(dired-isearch-filenames t)
|
||||
'(display-buffer-alist
|
||||
(quote
|
||||
(("*Man*" display-buffer-same-window)
|
||||
("*Buffer List*" display-buffer-same-window))))
|
||||
'(echo-keystrokes 1e-10)
|
||||
'(erc-autojoin-channels-alist (quote (("irc.freenode.net" "#haskell" "#data.coop"))))
|
||||
'(erc-autojoin-mode t)
|
||||
'(erc-nick "fredefox")
|
||||
'(erc-port 6667)
|
||||
'(erc-prompt-for-password nil)
|
||||
'(erc-server "irc.freenode.net")
|
||||
'(exec-path-from-shell-check-startup-files nil)
|
||||
'(flycheck-emacs-lisp-load-path (quote inherit))
|
||||
'(flycheck-ghc-language-extensions haskell-language-extensions)
|
||||
'(flycheck-hlint-language-extensions haskell-language-extensions)
|
||||
'(global-company-mode t)
|
||||
'(haskell-indentation-where-post-offset 0)
|
||||
'(haskell-indentation-where-pre-offset 0)
|
||||
'(haskell-language-extensions
|
||||
(quote
|
||||
("UnicodeSyntax" "TypeApplications" "OverloadedStrings" "LambdaCase" "StandaloneDeriving" "DerivingStrategies" "DeriveGeneric" "DeriveAnyClass" "KindSignatures" "DerivingVia" "ConstraintKinds" "FlexibleContexts" "GeneralizedNewtypeDeriving")))
|
||||
'(haskell-tags-on-save t)
|
||||
'(indent-tabs-mode nil)
|
||||
'(initial-scratch-message nil)
|
||||
'(js-indent-level 2)
|
||||
'(js2-basic-offset 2)
|
||||
'(line-move-visual nil)
|
||||
'(magit-display-buffer-function (quote magit-display-buffer-same-window-except-diff-v1))
|
||||
'(magit-popup-display-buffer-action nil)
|
||||
'(markdown-command "pandoc -t html")
|
||||
'(menu-bar-mode nil)
|
||||
'(message-send-mail-function (quote smtpmail-send-it))
|
||||
'(org-agenda-files "~/.config/orgmode/agenda_files")
|
||||
'(package-selected-packages
|
||||
(quote
|
||||
(prettier-js quelpa typescript-mode visual-fill-column ag ripgrep fill-column-indicator rjsx-mode image+ company org-jira which-key flycheck es-mode lsp-haskell forge projectile exec-path-from-shell lsp-ui lsp-mode editorconfig purescript-mode markdown-mode+ ssh-agency dash yaml-mode restart-emacs markdown-mode magit helm haskell-mode haml-mode form-feed dashboard)))
|
||||
'(projectile-globally-ignored-directories
|
||||
(quote
|
||||
(".idea" ".ensime_cache" ".eunit" ".git" ".hg" ".fslckout" "_FOSSIL_" ".bzr" "_darcs" ".tox" ".svn" ".stack-work" "node_modules")))
|
||||
'(projectile-globally-ignored-files (quote ("/TAGS" "/vendor" "/.bundle" "/node_modules")))
|
||||
'(projectile-mode t nil (projectile))
|
||||
'(projectile-project-search-path (quote ("~/git")))
|
||||
'(purescript-mode-hook (quote (turn-on-purescript-indentation)))
|
||||
'(recentf-max-menu-items 255)
|
||||
'(recentf-mode t)
|
||||
'(ruby-align-chained-calls t)
|
||||
'(ruby-align-to-stmt-keywords t)
|
||||
'(ruby-chained-calls t)
|
||||
'(ruby-insert-encoding-magic-comment nil)
|
||||
'(safe-local-variable-values
|
||||
(quote
|
||||
((git-commit-major-mode . git-commit-elisp-text-mode))))
|
||||
'(scroll-bar-mode nil)
|
||||
'(scroll-conservatively 101)
|
||||
'(scroll-margin 0)
|
||||
'(select-enable-clipboard t)
|
||||
'(send-mail-function (quote smtpmail-send-it))
|
||||
'(set-mark-command-repeat-pop t)
|
||||
'(sgml-basic-offset 2)
|
||||
'(show-paren-mode t)
|
||||
'(shr-width 80)
|
||||
'(split-window-keep-point nil)
|
||||
'(tags-add-tables t)
|
||||
'(temp-buffer-resize-mode nil)
|
||||
'(tool-bar-mode nil)
|
||||
'(vc-follow-symlinks nil)
|
||||
'(window-combination-resize t)
|
||||
'(window-resize-pixelwise t))
|
||||
|
||||
|
||||
;;;; MAC setup
|
||||
|
||||
(defun set-xdg-variables ()
|
||||
"Set the XDG base directory variables to sane defaults."
|
||||
(setenv "XDG_CONFIG_HOME" (substitute-in-file-name "$HOME/.config"))
|
||||
(setenv "XDG_DATA_HOME" (substitute-in-file-name "$HOME/.local/share"))
|
||||
(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 ()
|
||||
"Replace some behaviour otherwise handled by other system services."
|
||||
;; (load-theme 'monokai-dark)
|
||||
;; TODO Why is this not handled by the magic with the load-path above?
|
||||
(set-xdg-variables)
|
||||
(load-monokai))
|
||||
|
||||
;;; Needed on MAC because we're not using Xresources :(
|
||||
(if (not (eq window-system 'x))
|
||||
(x11-shim))
|
||||
|
||||
|
||||
;;;; Additional packages
|
||||
;;;; Maybe we should use qelpa to mangage these.
|
||||
(defvar extra-libs-root (substitute-in-file-name "$XDG_CONFIG_HOME/emacs/lisp/"))
|
||||
|
||||
(defvar additional-packages
|
||||
'((agda2-mode . "agda-mode/")
|
||||
(psc-ide . "psc-ide-emacs/")
|
||||
;; (org-jira . "org-jira/")
|
||||
(jira . "jira/")
|
||||
(spark . "spark/")
|
||||
(chruby . "chruby/")))
|
||||
|
||||
(defun load-additional-packages ()
|
||||
"Load the additional packages as specified by additional-packages."
|
||||
(dolist (spec additional-packages)
|
||||
(let* ((package (car spec))
|
||||
(package-path (cdr spec))
|
||||
(path (concat extra-libs-root package-path)))
|
||||
(add-to-list 'load-path path)
|
||||
(require package))))
|
||||
|
||||
(load-additional-packages)
|
||||
|
||||
(defun load-additional-themes ()
|
||||
"Load additional themes."
|
||||
(add-to-list 'custom-theme-load-path (concat extra-libs-root "inheritance-theme/"))
|
||||
(load-theme 'inheritance))
|
||||
|
||||
(load-additional-themes)
|
||||
|
||||
;; (require 'lsp)
|
||||
;; Shame! `lsp-ui` is emitting:
|
||||
;; Eager macro-expansion failure: (wrong-type-argument listp kind)
|
||||
;; (require 'lsp-ui)
|
||||
;; (require 'lsp-haskell)
|
||||
;; (add-hook 'lsp-mode-hook 'lsp-ui-mode)
|
||||
;; (add-hook 'haskell-mode-hook #'lsp)
|
||||
|
||||
|
||||
|
||||
;;;; Faces
|
||||
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(font-lock-comment-face ((t (:foreground "chocolate1"))))
|
||||
'(region ((t (:background "#285b89"))))
|
||||
'(success ((t (:foreground "Green3" :weight bold)))))
|
||||
|
||||
|
||||
;;;; Captain Hook
|
||||
|
||||
(global-set-key (kbd "C-x C-r") 'recentf-open-files)
|
||||
(global-unset-key (kbd "s-q"))
|
||||
|
||||
(global-set-key (kbd "C-x r v") 'revert-buffer)
|
||||
|
||||
(add-hook 'text-mode-hook
|
||||
(lambda ()
|
||||
(toggle-word-wrap t)
|
||||
(recentf-mode)
|
||||
(flyspell-mode)))
|
||||
|
||||
(add-hook 'html-mode-hook
|
||||
(lambda ()
|
||||
(flyspell-mode -1)))
|
||||
|
||||
(add-hook 'prog-mode-hook
|
||||
(lambda ()
|
||||
(form-feed-mode)
|
||||
(flycheck-mode)))
|
||||
;; I think this breaks e.g. the color-picker
|
||||
; (add-hook 'text-mode-hook 'form-feed-mode)
|
||||
(add-hook 'haskell-mode-hook (lambda ()
|
||||
(subword-mode t)
|
||||
(interactive-haskell-mode t)))
|
||||
(add-hook 'ruby-mode-hook (lambda () (subword-mode t)))
|
||||
;; global-company-mode keeps recentering the point on the screen for
|
||||
;; some reason
|
||||
; (add-hook 'after-init-hook 'global-company-mode)
|
||||
;; (add-hook 'after-init-hook 'flycheck-mode)
|
||||
|
||||
;; ;; (require 'haskell-unicode-input-method)
|
||||
|
||||
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
|
||||
|
||||
|
||||
;;;; Projectile
|
||||
(require 'projectile)
|
||||
|
||||
(projectile-mode +1)
|
||||
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
|
||||
|
||||
|
||||
;;;; Dashboard
|
||||
|
||||
(require 'dashboard)
|
||||
(dashboard-setup-startup-hook)
|
||||
(setq dashboard-startup-banner (substitute-in-file-name "$XDG_DATA_HOME/emacs/banner.png"))
|
||||
(setq dashboard-items '((recents . 40)))
|
||||
|
||||
;;;; Miscelaneous
|
||||
(setq-default indent-tabs-mode nil)
|
||||
|
||||
(setq ring-bell-function
|
||||
(lambda ()
|
||||
(let ((orig-bg (face-background 'mode-line)))
|
||||
(set-face-background 'mode-line (face-attribute 'error :foreground))
|
||||
(run-with-idle-timer 0.1 nil
|
||||
(lambda (bg)
|
||||
(set-face-background 'mode-line bg)) orig-bg))))
|
||||
|
||||
(global-unset-key (kbd "C-z"))
|
||||
|
||||
;;;; Magit
|
||||
(require 'magit)
|
||||
(global-magit-file-mode t)
|
||||
(global-set-key (kbd "C-c g g") 'magit-dispatch)
|
||||
(global-set-key (kbd "C-c g s") 'magit-status)
|
||||
(global-set-key (kbd "C-c g f") 'magit-file-dispatch)
|
||||
(global-set-key (kbd "C-c g b") 'magit-blame)
|
||||
|
||||
(require 'haskell)
|
||||
|
||||
;;;; Ruby
|
||||
(require 'ruby-mode)
|
||||
|
||||
;; I'm confused about the less worse option here. I think the best
|
||||
;; option is to use smie (the default).
|
||||
(setq ruby-use-smie t)
|
||||
|
||||
(setq ruby-deep-indent-paren nil)
|
||||
(setq ruby-align-to-stmt-keywords t)
|
||||
|
||||
(setq select-enable-clipboard t)
|
||||
|
||||
(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-p") 'ruby-backward-sexp)))
|
||||
|
||||
(defun sql-beautify-region (beg end)
|
||||
"Beautify SQL in region between BEG and END.
|
||||
Dependency:
|
||||
npm i -g sql-formatter-cli"
|
||||
(interactive "r")
|
||||
(save-excursion
|
||||
(shell-command-on-region beg end "sql-formatter-cli" nil t)))
|
||||
|
||||
(defun sql-beautify-buffer ()
|
||||
"Beautify SQL in buffer."
|
||||
(interactive)
|
||||
(sql-beautify-region (point-min) (point-max)))
|
||||
|
||||
(add-hook 'sql-mode-hook '(lambda ()
|
||||
;; beautify region or buffer
|
||||
(local-set-key (kbd "C-c t") 'sql-beautify-region)))
|
||||
(put 'dired-find-alternate-file 'disabled nil)
|
||||
|
||||
;; org-jira [https://github.com/ahungry/org-jira]
|
||||
;; (require 'org-jira)
|
||||
;; (setq jiralib-url "https://zendesk.atlassian.net")
|
||||
|
||||
;;; Jira
|
||||
;; (require 'jira)
|
||||
(global-set-key (kbd "C-c j") 'jira)
|
||||
|
||||
(put 'upcase-region 'disabled nil)
|
||||
(put 'downcase-region 'disabled nil)
|
||||
(put 'set-goal-column 'disabled nil)
|
||||
(when (memq window-system '(mac))
|
||||
(exec-path-from-shell-initialize))
|
||||
|
||||
;;; init.el ends here
|
|
@ -1,42 +0,0 @@
|
|||
;;; 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
|
|
@ -1,28 +0,0 @@
|
|||
;;; monokai-dark-theme --- Summary:
|
||||
;;;
|
||||
;;; A bare-bones version of the monokai-dark theme.
|
||||
;;;
|
||||
;;; Commentary:
|
||||
;;; Code:
|
||||
;; (provide 'monokai-dark-theme)
|
||||
(deftheme monokai-dark
|
||||
"Created 2019-03-28 by fredefox.")
|
||||
|
||||
(custom-theme-set-variables
|
||||
'monokai-dark
|
||||
'(agda2-highlight-face-groups (quote default-faces)))
|
||||
|
||||
(require 'color)
|
||||
|
||||
(custom-theme-set-faces
|
||||
'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"))))
|
||||
'(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))))
|
||||
'(shadow ((t (:foreground "grey70"))))
|
||||
'(variable-pitch ((t nil)))
|
||||
'(whitespace-trailing ((t (:background "#542b2e"))))
|
||||
'(custom-group-tag ((t (:inherit variable-pitch :foreground "light blue" :weight bold :height 1.0)))))
|
||||
|
||||
(provide-theme 'monokai-dark)
|
||||
;;; monokai-dark-theme.el ends here
|
Loading…
Reference in a new issue