Change Emacs config
This commit is contained in:
parent
d19907c2fe
commit
4c286c9cf6
|
@ -50,6 +50,7 @@
|
||||||
;; If there is more than one, they won't work right.
|
;; If there is more than one, they won't work right.
|
||||||
'(Buffer-menu-name-width 30)
|
'(Buffer-menu-name-width 30)
|
||||||
'(agda2-program-args nil)
|
'(agda2-program-args nil)
|
||||||
|
'(async-shell-command-buffer 'new-buffer)
|
||||||
'(auth-sources '("~/.authinfo.gpg" "~/.authinfo" "~/.netrc"))
|
'(auth-sources '("~/.authinfo.gpg" "~/.authinfo" "~/.netrc"))
|
||||||
'(blink-cursor-mode nil)
|
'(blink-cursor-mode nil)
|
||||||
'(column-number-mode t)
|
'(column-number-mode t)
|
||||||
|
@ -59,8 +60,10 @@
|
||||||
'(css-indent-offset 2)
|
'(css-indent-offset 2)
|
||||||
'(custom-safe-themes
|
'(custom-safe-themes
|
||||||
'("670df6cad1a732850a5d90ce2b0326969bd7596881dc1fed6b35091520a3da97" "cfca08e1a703af85a52840c6839ec6ae6568fbdf2f4f6e344fb807345fca45b8" default))
|
'("670df6cad1a732850a5d90ce2b0326969bd7596881dc1fed6b35091520a3da97" "cfca08e1a703af85a52840c6839ec6ae6568fbdf2f4f6e344fb807345fca45b8" default))
|
||||||
|
'(custom-search-field nil)
|
||||||
'(dashboard-set-footer nil)
|
'(dashboard-set-footer nil)
|
||||||
'(delete-selection-mode t)
|
'(delete-selection-mode t)
|
||||||
|
'(desktop-save-mode t)
|
||||||
'(dhall-repl-executable "dhall-repl")
|
'(dhall-repl-executable "dhall-repl")
|
||||||
'(dhall-use-header-line nil)
|
'(dhall-use-header-line nil)
|
||||||
'(dired-isearch-filenames t)
|
'(dired-isearch-filenames t)
|
||||||
|
@ -94,6 +97,11 @@
|
||||||
("git.sr.ht" nil "git.sr.ht" forge-srht-repository)
|
("git.sr.ht" nil "git.sr.ht" forge-srht-repository)
|
||||||
("git.data.coop" "git.data.coop/api/v1" "git.data.coop" forge-gitea-repository)))
|
("git.data.coop" "git.data.coop/api/v1" "git.data.coop" forge-gitea-repository)))
|
||||||
'(global-company-mode t)
|
'(global-company-mode t)
|
||||||
|
'(graphql-extra-headers
|
||||||
|
'(("Content-Type" . "application/json")
|
||||||
|
("Authorization" . "Basic YWRtaW5AemQtZGV2LmNvbToxMjM0NTY=")
|
||||||
|
("Host" . "mondocam.zd-dev.com")))
|
||||||
|
'(graphql-url "https://mondocam.zd-dev.com/gather/badges/graphql")
|
||||||
'(graphviz-dot-indent-width 2)
|
'(graphviz-dot-indent-width 2)
|
||||||
'(haskell-indentation-where-post-offset 0)
|
'(haskell-indentation-where-post-offset 0)
|
||||||
'(haskell-indentation-where-pre-offset 0)
|
'(haskell-indentation-where-pre-offset 0)
|
||||||
|
@ -117,7 +125,7 @@
|
||||||
'(org-agenda-files "~/.config/orgmode/agenda_files")
|
'(org-agenda-files "~/.config/orgmode/agenda_files")
|
||||||
'(org-hide-leading-stars t)
|
'(org-hide-leading-stars t)
|
||||||
'(package-selected-packages
|
'(package-selected-packages
|
||||||
'(graphviz-dot-mode rust-mode lsp forge tide origami dhall-mode docker-tramp graphql-mode enh-ruby-mode scala-mode string-inflection 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 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))
|
'(realgud-trepan-ni realgud-node-inspect realgud graphviz-dot-mode rust-mode lsp forge tide origami dhall-mode docker-tramp graphql-mode enh-ruby-mode scala-mode string-inflection 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 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))
|
||||||
'(prettier-js-command "prettier")
|
'(prettier-js-command "prettier")
|
||||||
'(projectile-globally-ignored-directories
|
'(projectile-globally-ignored-directories
|
||||||
'(".idea" ".ensime_cache" ".eunit" ".git" ".hg" ".fslckout" "_FOSSIL_" ".bzr" "_darcs" ".tox" ".svn" ".stack-work" "node_modules" "vendor"))
|
'(".idea" ".ensime_cache" ".eunit" ".git" ".hg" ".fslckout" "_FOSSIL_" ".bzr" "_darcs" ".tox" ".svn" ".stack-work" "node_modules" "vendor"))
|
||||||
|
@ -129,6 +137,7 @@
|
||||||
(directory-files "~/git" t)
|
(directory-files "~/git" t)
|
||||||
2)))
|
2)))
|
||||||
'(projectile-switch-project-action 'magit-status)
|
'(projectile-switch-project-action 'magit-status)
|
||||||
|
'(projectile-use-git-grep t)
|
||||||
'(purescript-mode-hook '(turn-on-purescript-indentation))
|
'(purescript-mode-hook '(turn-on-purescript-indentation))
|
||||||
'(recentf-max-menu-items 255)
|
'(recentf-max-menu-items 255)
|
||||||
'(recentf-mode t)
|
'(recentf-mode t)
|
||||||
|
@ -145,7 +154,9 @@
|
||||||
(format "cd ~/git/zendesk/guide-acceptance-tests && rspec --no-color '%s'"
|
(format "cd ~/git/zendesk/guide-acceptance-tests && rspec --no-color '%s'"
|
||||||
(projectile-get-relative-path-buffer))))
|
(projectile-get-relative-path-buffer))))
|
||||||
'(safe-local-variable-values
|
'(safe-local-variable-values
|
||||||
'((compilation-disable-input . t)
|
'((prettier-js-mode)
|
||||||
|
(prettier-mode)
|
||||||
|
(compilation-disable-input . t)
|
||||||
(sgml-basic-offset . 2)
|
(sgml-basic-offset . 2)
|
||||||
(electric-indent-mode)
|
(electric-indent-mode)
|
||||||
(eval add-hook 'js2-mode-hook
|
(eval add-hook 'js2-mode-hook
|
||||||
|
@ -173,9 +184,11 @@
|
||||||
'(set-mark-command-repeat-pop t)
|
'(set-mark-command-repeat-pop t)
|
||||||
'(sgml-basic-offset 1)
|
'(sgml-basic-offset 1)
|
||||||
'(sh-basic-offset 2)
|
'(sh-basic-offset 2)
|
||||||
|
'(show-paren-delay 0)
|
||||||
'(show-paren-mode t)
|
'(show-paren-mode t)
|
||||||
'(shr-width 80)
|
'(shr-width 80)
|
||||||
'(split-window-keep-point nil)
|
'(split-window-keep-point nil)
|
||||||
|
'(tab-line-close-button-show nil)
|
||||||
'(tags-add-tables t)
|
'(tags-add-tables t)
|
||||||
'(temp-buffer-resize-mode nil)
|
'(temp-buffer-resize-mode nil)
|
||||||
'(tool-bar-mode nil)
|
'(tool-bar-mode nil)
|
||||||
|
@ -277,6 +290,8 @@
|
||||||
;; 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.
|
||||||
|
'(compilation-mode-line-exit ((t (:inherit compilation-info :weight bold))))
|
||||||
|
'(compilation-mode-line-fail ((t (:inherit compilation-error :weight bold))))
|
||||||
'(enh-ruby-heredoc-delimiter-face ((t (:inherit font-lock-string-face))))
|
'(enh-ruby-heredoc-delimiter-face ((t (:inherit font-lock-string-face))))
|
||||||
'(enh-ruby-op-face ((t (:inherit font-lock-variable-name-face))))
|
'(enh-ruby-op-face ((t (:inherit font-lock-variable-name-face))))
|
||||||
'(enh-ruby-string-delimiter-face ((t (:inherit font-lock-string-face))))
|
'(enh-ruby-string-delimiter-face ((t (:inherit font-lock-string-face))))
|
||||||
|
@ -311,9 +326,35 @@
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(flyspell-mode -1)))
|
(flyspell-mode -1)))
|
||||||
|
|
||||||
|
(defvar html--html-template (concat
|
||||||
|
"<head>\n"
|
||||||
|
" <title>%s</title>\n"
|
||||||
|
" <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n"
|
||||||
|
" </head>\n"
|
||||||
|
" <body>\n"
|
||||||
|
" <main>\n"
|
||||||
|
" <h1>%s</h1>\n"
|
||||||
|
" </main>\n"
|
||||||
|
" </body>"))
|
||||||
|
|
||||||
|
(require 'sgml-mode)
|
||||||
(add-hook 'html-mode-hook
|
(add-hook 'html-mode-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(flyspell-mode -1)))
|
(flyspell-mode -1)
|
||||||
|
(add-to-list 'sgml-tag-alist '("html" (\n (format html--html-template (setq title (read-string "Title: ")) title))))))
|
||||||
|
|
||||||
|
(add-hook 'shell-mode-hook 'goto-address-mode)
|
||||||
|
|
||||||
|
;; This is overwritten by a keymap added by comint-mode... In org-mode
|
||||||
|
;; the same keymap is also bound to something. Think it's org-goto.
|
||||||
|
(add-hook 'goto-address-mode
|
||||||
|
(lambda ()
|
||||||
|
(local-set-key (kbd "C-c C-o") 'goto-address-at-point)))
|
||||||
|
|
||||||
|
(add-hook 'mhtml-mode
|
||||||
|
(lambda ()
|
||||||
|
(local-set-key (kbd "C-c C-o") 'browse-url-of-buffer)
|
||||||
|
(local-set-key (kbd "C-c C-v") 'sgml-validate)))
|
||||||
|
|
||||||
(add-hook 'prog-mode-hook
|
(add-hook 'prog-mode-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
@ -356,10 +397,6 @@
|
||||||
|
|
||||||
(setq js2-global-externs js2-globals)
|
(setq js2-global-externs js2-globals)
|
||||||
|
|
||||||
(require 'origami)
|
|
||||||
(global-origami-mode)
|
|
||||||
(global-set-key (kbd "C-c o o") 'origami-recursively-toggle-node)
|
|
||||||
|
|
||||||
|
|
||||||
;;;; Projectile
|
;;;; Projectile
|
||||||
(require 'projectile)
|
(require 'projectile)
|
||||||
|
@ -452,10 +489,6 @@
|
||||||
(advice-add 'forward-list :override 'enh-ruby-end-of-block)
|
(advice-add 'forward-list :override 'enh-ruby-end-of-block)
|
||||||
(advice-add 'backward-list :override 'enh-ruby-beginning-of-block)
|
(advice-add 'backward-list :override 'enh-ruby-beginning-of-block)
|
||||||
(fredefox-ruby-mode-hook)))
|
(fredefox-ruby-mode-hook)))
|
||||||
;; '(lambda ()
|
|
||||||
;; (local-set-key (kbd "C-M-n") 'ruby-forward-sexp)
|
|
||||||
;; (local-set-key (kbd "C-M-p") 'ruby-backward-sexp)
|
|
||||||
;; (chruby-use-corresponding)))
|
|
||||||
|
|
||||||
(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.
|
||||||
|
@ -481,6 +514,7 @@ npm i -g sql-formatter-cli"
|
||||||
|
|
||||||
;;; Jira
|
;;; Jira
|
||||||
;; (require 'jira)
|
;; (require 'jira)
|
||||||
|
(add-hook 'jira-mode-hook 'org-mode)
|
||||||
(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)
|
||||||
|
@ -512,4 +546,12 @@ Requires that `sqlformat` is installed."
|
||||||
|
|
||||||
(defalias 'yes-or-no-p 'y-or-n-p)
|
(defalias 'yes-or-no-p 'y-or-n-p)
|
||||||
|
|
||||||
|
(require 'ansi-color)
|
||||||
|
(defun colorize-compilation-buffer ()
|
||||||
|
"Use ansi-color to translate SGR control sequences into overlays."
|
||||||
|
|
||||||
|
(ansi-color-apply-on-region compilation-filter-start (point)))
|
||||||
|
|
||||||
|
(add-hook 'compilation-filter-hook 'colorize-compilation-buffer)
|
||||||
|
|
||||||
;;; init.el ends here
|
;;; init.el ends here
|
||||||
|
|
Loading…
Reference in a new issue