Update .emacs

This commit is contained in:
zongor 2024-08-02 15:46:23 -04:00
parent 5cee73cb8c
commit 6977dbb45c
1 changed files with 56 additions and 13 deletions

67
.emacs
View File

@ -46,7 +46,7 @@
(electric-pair-mode 1)
(setf electric-pair-skip-self nil)
(set-frame-font "Fira Code 8")
(set-frame-font "Fira Code 11")
;; setup fira code font ligatures
(let ((alist '((33 . ".\\(?:\\(?:\\(?:!\\.\\|!\\)\\|\\(?:==\\|=\\)\\)\\)") ;; !
@ -82,7 +82,6 @@
(set-char-table-range composition-function-table (car char-regexp)
`([,(cdr char-regexp) 0 font-shape-gstring]))))
(scroll-bar-mode -1)
(tool-bar-mode -1)
(menu-bar-mode -1)
@ -119,6 +118,10 @@
(point))))
(comment-or-uncomment-region start end)))
(use-package exec-path-from-shell
:init
(exec-path-from-shell-initialize))
(use-package undo-tree
:config (global-undo-tree-mode 1)
: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 "J") 'forward-paragraph)
(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 "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-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
:after evil
:ensure t
@ -168,8 +181,13 @@
(setq doom-themes-enable-bold t
doom-themes-enable-italic t)
(load-theme 'doom-monokai-classic t)
;; (load-theme 'mazarbul t)
(doom-themes-org-config))
(use-package solaire-mode
:config
(solaire-global-mode +1))
(use-package treemacs
:ensure t
:defer t
@ -395,14 +413,17 @@ Other buffer group by `centaur-tabs-get-group-name' with project name."
:ensure t
:config (global-company-mode t))
(use-package ivy
:init (ivy-mode 1))
(use-package which-key
:ensure t
:config
(which-key-mode))
(use-package column-enforce-mode
:init
(global-column-enforce-mode))
:init
(global-column-enforce-mode))
(use-package magit
:ensure t
@ -426,13 +447,17 @@ Other buffer group by `centaur-tabs-get-group-name' with project name."
:type 'list
:version "green")
(global-display-line-numbers-mode)
;;(global-display-line-numbers-mode)
(use-package markdown-mode
:ensure t
:mode ("README\\.md\\'" . gfm-mode)
:init (setq markdown-command "multimarkdown"))
(use-package org-modern
:init
(global-org-modern-mode))
(use-package docker
:ensure t
:bind ("C-c d" . docker))
@ -454,6 +479,8 @@ Other buffer group by `centaur-tabs-get-group-name' with project name."
("\\.html\\'" . web-mode))
:commands web-mode)
(modify-syntax-entry ?` "\"" js-mode-syntax-table)
(use-package prettier-js
:ensure t)
(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))
(enable-minor-mode
'("\\.tsx?\\'" . prettier-js-mode))))
(use-package uxntal-mode)
(use-package hy-mode)
(use-package lua-mode)
(use-package elm-mode)
(use-package go-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")
:hook (
(elm-mode . lsp-deferred)
(go-mode . lsp-deffered)
(rust-mode . lsp-deffered)
(go-mode . lsp-deferred)
(rust-mode . lsp-deferred)
(web-mode . lsp-deferred)
(lsp-mode . lsp-enable-which-key-integration)))
(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 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.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-safe-themes
'("5409f053b500223bdcc4d4214986b4b57a55529b1e4659d6c48049751f1be43b" "f5f80dd6588e59cfc3ce2f11568ff8296717a938edd448a947f9823a4e282b66" "02d422e5b99f54bd4516d4157060b874d14552fe613ea7047c4a5cfa1288cf4f" "8d8207a39e18e2cc95ebddf62f841442d36fcba01a2a9451773d4ed30b632443" "be84a2e5c70f991051d4aaf0f049fa11c172e5d784727e0b525565bb1533ec78" default))
'(inhibit-startup-screen t))
;; Must be used *after* the theme is loaded
(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.
)
;; electric buffer list
`(cm-electric-emacs-buffer-mode-face ((t (:foreground ,(doom-color 'violet)))))
`(cm-electric-c-buffer-mode-face ((t (:foreground ,(doom-color 'blue)))))
`(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))))))