Add new .emacs
This commit is contained in:
parent
a5ffeccb90
commit
ac0abd7ccd
1 changed files with 65 additions and 0 deletions
65
dotemacs.el
Normal file
65
dotemacs.el
Normal file
|
@ -0,0 +1,65 @@
|
|||
(require 'package)
|
||||
|
||||
(add-to-list 'package-archives
|
||||
'("melpa" . "https://melpa.org/packages/") t)
|
||||
|
||||
;; Added by Package.el. This must come before configurations of
|
||||
;; installed packages. Don't delete this line. If you don't want it,
|
||||
;; just comment it out by adding a semicolon to the start of the line.
|
||||
;; You may delete these explanatory comments.
|
||||
(package-initialize)
|
||||
|
||||
;; Set path correctly
|
||||
(when (memq window-system '(mac ns x))
|
||||
(exec-path-from-shell-initialize))
|
||||
|
||||
;; Web-mode
|
||||
(require 'web-mode)
|
||||
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.mjs\\'" . web-mode))
|
||||
(add-to-list 'web-mode-content-types-alist '("jsx" . "\\.[c|m]js[x]?\\'"))
|
||||
|
||||
;; Prettier
|
||||
(require 'prettier-js)
|
||||
(add-hook 'js2-mode-hook 'prettier-js-mode)
|
||||
(add-hook 'web-mode-hook 'prettier-js-mode)
|
||||
|
||||
;; Magit
|
||||
(global-set-key (kbd "C-x g") 'magit-status)
|
||||
(add-hook 'after-save-hook 'magit-after-save-refresh-status t)
|
||||
;; Org
|
||||
(define-key global-map "\C-cl" 'org-store-link)
|
||||
(define-key global-map "\C-ca" 'org-agenda)
|
||||
(setq org-log-done t)
|
||||
(setq org-agenda-files (list "~/org/work.org"
|
||||
"~/org/home.org"
|
||||
"~/org/wow.org"
|
||||
"~/org/business.org"))
|
||||
|
||||
;; Company
|
||||
(add-hook 'after-init-hook 'global-company-mode)
|
||||
|
||||
;; Paredit
|
||||
(autoload 'enable-paredit-mode "paredit"
|
||||
"Turn on pseudo-structural editing of Lisp code." t)
|
||||
(add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode)
|
||||
(add-hook 'eval-expression-minibuffer-setup-hook #'enable-paredit-mode)
|
||||
(add-hook 'ielm-mode-hook #'enable-paredit-mode)
|
||||
(add-hook 'lisp-mode-hook #'enable-paredit-mode)
|
||||
(add-hook 'lisp-interaction-mode-hook #'enable-paredit-mode)
|
||||
(add-hook 'scheme-mode-hook #'enable-paredit-mode)
|
||||
|
||||
(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.
|
||||
'(package-selected-packages
|
||||
(quote
|
||||
(paredit magit web-mode js2-mode prettier-js company evil))))
|
||||
(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.
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue