Update .emacs
This commit is contained in:
parent
5cee73cb8c
commit
6977dbb45c
63
.emacs
63
.emacs
|
@ -46,7 +46,7 @@
|
||||||
(electric-pair-mode 1)
|
(electric-pair-mode 1)
|
||||||
(setf electric-pair-skip-self nil)
|
(setf electric-pair-skip-self nil)
|
||||||
|
|
||||||
(set-frame-font "Fira Code 8")
|
(set-frame-font "Fira Code 11")
|
||||||
|
|
||||||
;; setup fira code font ligatures
|
;; setup fira code font ligatures
|
||||||
(let ((alist '((33 . ".\\(?:\\(?:\\(?:!\\.\\|!\\)\\|\\(?:==\\|=\\)\\)\\)") ;; !
|
(let ((alist '((33 . ".\\(?:\\(?:\\(?:!\\.\\|!\\)\\|\\(?:==\\|=\\)\\)\\)") ;; !
|
||||||
|
@ -82,7 +82,6 @@
|
||||||
(set-char-table-range composition-function-table (car char-regexp)
|
(set-char-table-range composition-function-table (car char-regexp)
|
||||||
`([,(cdr char-regexp) 0 font-shape-gstring]))))
|
`([,(cdr char-regexp) 0 font-shape-gstring]))))
|
||||||
|
|
||||||
|
|
||||||
(scroll-bar-mode -1)
|
(scroll-bar-mode -1)
|
||||||
(tool-bar-mode -1)
|
(tool-bar-mode -1)
|
||||||
(menu-bar-mode -1)
|
(menu-bar-mode -1)
|
||||||
|
@ -119,6 +118,10 @@
|
||||||
(point))))
|
(point))))
|
||||||
(comment-or-uncomment-region start end)))
|
(comment-or-uncomment-region start end)))
|
||||||
|
|
||||||
|
(use-package exec-path-from-shell
|
||||||
|
:init
|
||||||
|
(exec-path-from-shell-initialize))
|
||||||
|
|
||||||
(use-package undo-tree
|
(use-package undo-tree
|
||||||
:config (global-undo-tree-mode 1)
|
:config (global-undo-tree-mode 1)
|
||||||
:diminish undo-tree-mode)
|
:diminish undo-tree-mode)
|
||||||
|
@ -144,11 +147,21 @@
|
||||||
(define-key evil-normal-state-map (kbd "K") 'backward-paragraph)
|
(define-key evil-normal-state-map (kbd "K") 'backward-paragraph)
|
||||||
(define-key evil-normal-state-map (kbd "J") 'forward-paragraph)
|
(define-key evil-normal-state-map (kbd "J") 'forward-paragraph)
|
||||||
(define-key evil-normal-state-map (kbd "C-x l") 'list-buffers)
|
(define-key evil-normal-state-map (kbd "C-x l") 'list-buffers)
|
||||||
|
(define-key evil-normal-state-map (kbd "C-M-u") 'eval-buffer)
|
||||||
|
(define-key evil-normal-state-map (kbd "C-M-p") 'compile)
|
||||||
(define-key evil-normal-state-map (kbd "M-/") 'dabbrev-expand)
|
(define-key evil-normal-state-map (kbd "M-/") 'dabbrev-expand)
|
||||||
(define-key evil-normal-state-map (kbd "C-,") 'move-to-previous-window)
|
(define-key evil-normal-state-map (kbd "C-,") 'move-to-previous-window)
|
||||||
(define-key evil-normal-state-map (kbd "C-.") 'move-to-next-window)
|
(define-key evil-normal-state-map (kbd "C-.") 'move-to-next-window)
|
||||||
(define-key evil-normal-state-map (kbd "C-M-\\") 'format-all-region-or-buffer))
|
(define-key evil-normal-state-map (kbd "C-M-\\") 'format-all-region-or-buffer))
|
||||||
|
|
||||||
|
(use-package format-all
|
||||||
|
:commands format-all-mode
|
||||||
|
:hook (prog-mode . format-all-mode)
|
||||||
|
:config
|
||||||
|
(setq-default format-all-formatters
|
||||||
|
'(("C" (astyle "--mode=c"))
|
||||||
|
("Shell" (shfmt "-i" "4" "-ci")))))
|
||||||
|
|
||||||
(use-package evil-collection
|
(use-package evil-collection
|
||||||
:after evil
|
:after evil
|
||||||
:ensure t
|
:ensure t
|
||||||
|
@ -168,8 +181,13 @@
|
||||||
(setq doom-themes-enable-bold t
|
(setq doom-themes-enable-bold t
|
||||||
doom-themes-enable-italic t)
|
doom-themes-enable-italic t)
|
||||||
(load-theme 'doom-monokai-classic t)
|
(load-theme 'doom-monokai-classic t)
|
||||||
|
;; (load-theme 'mazarbul t)
|
||||||
(doom-themes-org-config))
|
(doom-themes-org-config))
|
||||||
|
|
||||||
|
(use-package solaire-mode
|
||||||
|
:config
|
||||||
|
(solaire-global-mode +1))
|
||||||
|
|
||||||
(use-package treemacs
|
(use-package treemacs
|
||||||
:ensure t
|
:ensure t
|
||||||
:defer t
|
:defer t
|
||||||
|
@ -395,6 +413,9 @@ Other buffer group by `centaur-tabs-get-group-name' with project name."
|
||||||
:ensure t
|
:ensure t
|
||||||
:config (global-company-mode t))
|
:config (global-company-mode t))
|
||||||
|
|
||||||
|
(use-package ivy
|
||||||
|
:init (ivy-mode 1))
|
||||||
|
|
||||||
(use-package which-key
|
(use-package which-key
|
||||||
:ensure t
|
:ensure t
|
||||||
:config
|
:config
|
||||||
|
@ -426,13 +447,17 @@ Other buffer group by `centaur-tabs-get-group-name' with project name."
|
||||||
:type 'list
|
:type 'list
|
||||||
:version "green")
|
:version "green")
|
||||||
|
|
||||||
(global-display-line-numbers-mode)
|
;;(global-display-line-numbers-mode)
|
||||||
|
|
||||||
(use-package markdown-mode
|
(use-package markdown-mode
|
||||||
:ensure t
|
:ensure t
|
||||||
:mode ("README\\.md\\'" . gfm-mode)
|
:mode ("README\\.md\\'" . gfm-mode)
|
||||||
:init (setq markdown-command "multimarkdown"))
|
:init (setq markdown-command "multimarkdown"))
|
||||||
|
|
||||||
|
(use-package org-modern
|
||||||
|
:init
|
||||||
|
(global-org-modern-mode))
|
||||||
|
|
||||||
(use-package docker
|
(use-package docker
|
||||||
:ensure t
|
:ensure t
|
||||||
:bind ("C-c d" . docker))
|
:bind ("C-c d" . docker))
|
||||||
|
@ -454,6 +479,8 @@ Other buffer group by `centaur-tabs-get-group-name' with project name."
|
||||||
("\\.html\\'" . web-mode))
|
("\\.html\\'" . web-mode))
|
||||||
:commands web-mode)
|
:commands web-mode)
|
||||||
|
|
||||||
|
(modify-syntax-entry ?` "\"" js-mode-syntax-table)
|
||||||
|
|
||||||
(use-package prettier-js
|
(use-package prettier-js
|
||||||
:ensure t)
|
:ensure t)
|
||||||
(add-hook 'web-mode-hook #'(lambda ()
|
(add-hook 'web-mode-hook #'(lambda ()
|
||||||
|
@ -461,6 +488,9 @@ Other buffer group by `centaur-tabs-get-group-name' with project name."
|
||||||
'("\\.jsx?\\'" . prettier-js-mode))
|
'("\\.jsx?\\'" . prettier-js-mode))
|
||||||
(enable-minor-mode
|
(enable-minor-mode
|
||||||
'("\\.tsx?\\'" . prettier-js-mode))))
|
'("\\.tsx?\\'" . prettier-js-mode))))
|
||||||
|
(use-package uxntal-mode)
|
||||||
|
(use-package hy-mode)
|
||||||
|
(use-package lua-mode)
|
||||||
(use-package elm-mode)
|
(use-package elm-mode)
|
||||||
(use-package go-mode)
|
(use-package go-mode)
|
||||||
(use-package rust-mode)
|
(use-package rust-mode)
|
||||||
|
@ -475,12 +505,13 @@ Other buffer group by `centaur-tabs-get-group-name' with project name."
|
||||||
(setq lsp-keymap-prefix "C-c l")
|
(setq lsp-keymap-prefix "C-c l")
|
||||||
:hook (
|
:hook (
|
||||||
(elm-mode . lsp-deferred)
|
(elm-mode . lsp-deferred)
|
||||||
(go-mode . lsp-deffered)
|
(go-mode . lsp-deferred)
|
||||||
(rust-mode . lsp-deffered)
|
(rust-mode . lsp-deferred)
|
||||||
(web-mode . lsp-deferred)
|
(web-mode . lsp-deferred)
|
||||||
(lsp-mode . lsp-enable-which-key-integration)))
|
(lsp-mode . lsp-enable-which-key-integration)))
|
||||||
|
|
||||||
(use-package lsp-ui :commands lsp-ui-mode)
|
(use-package lsp-ui :commands lsp-ui-mode)
|
||||||
|
(use-package company-lsp :commands company-lsp)
|
||||||
(use-package lsp-treemacs :commands lsp-treemacs-errors-list)
|
(use-package lsp-treemacs :commands lsp-treemacs-errors-list)
|
||||||
(use-package verb)
|
(use-package verb)
|
||||||
|
|
||||||
|
@ -497,10 +528,22 @@ Other buffer group by `centaur-tabs-get-group-name' with project name."
|
||||||
;; 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.
|
||||||
|
'(custom-safe-themes
|
||||||
|
'("5409f053b500223bdcc4d4214986b4b57a55529b1e4659d6c48049751f1be43b" "f5f80dd6588e59cfc3ce2f11568ff8296717a938edd448a947f9823a4e282b66" "02d422e5b99f54bd4516d4157060b874d14552fe613ea7047c4a5cfa1288cf4f" "8d8207a39e18e2cc95ebddf62f841442d36fcba01a2a9451773d4ed30b632443" "be84a2e5c70f991051d4aaf0f049fa11c172e5d784727e0b525565bb1533ec78" default))
|
||||||
'(inhibit-startup-screen t))
|
'(inhibit-startup-screen t))
|
||||||
|
;; Must be used *after* the theme is loaded
|
||||||
(custom-set-faces
|
(custom-set-faces
|
||||||
;; custom-set-faces was added by Custom.
|
;; electric buffer list
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
`(cm-electric-emacs-buffer-mode-face ((t (:foreground ,(doom-color 'violet)))))
|
||||||
;; Your init file should contain only one such instance.
|
`(cm-electric-c-buffer-mode-face ((t (:foreground ,(doom-color 'blue)))))
|
||||||
;; If there is more than one, they won't work right.
|
|
||||||
)
|
`(cm-electric-cm-dir-face ((t (:foreground ,(doom-color 'magenta)))))
|
||||||
|
`(cm-electric-custom-dir-face ((t (:foreground ,(doom-color 'orange)))))
|
||||||
|
`(cm-electric-emacs-face ((t (:inherit cm-electric-custom-dir-face))))
|
||||||
|
`(cm-electric-profile-dir-face ((t (:foreground ,(doom-color 'yellow)))))
|
||||||
|
|
||||||
|
`(cm-electric-buffer-mode-face ((t (:foreground ,(doom-color 'violet)))))
|
||||||
|
`(cm-electric-cet-dir-face ((t (:foreground ,(doom-color 'violet)))))
|
||||||
|
`(cm-electric-root-face ((t (:foreground ,(doom-color 'violet)))))
|
||||||
|
`(cm-electric-fundamental-face ((t (:foreground ,(doom-color 'violet)))))
|
||||||
|
`(cm-electric-rs-file-face ((t (:foreground ,(doom-color 'violet))))))
|
||||||
|
|
Loading…
Reference in New Issue