update .emacs
This commit is contained in:
parent
1c5959169b
commit
6ee77b9ee7
297
.emacs
297
.emacs
|
@ -34,11 +34,10 @@
|
||||||
|
|
||||||
(straight-use-package 'use-package)
|
(straight-use-package 'use-package)
|
||||||
(setq straight-use-package-by-default t)
|
(setq straight-use-package-by-default t)
|
||||||
|
(global-set-key [f11] 'toggle-frame-fullscreen)
|
||||||
(setq browse-url-browser-function 'eww-browse-url)
|
|
||||||
;; C-x SPC -- box select kode
|
|
||||||
(global-set-key [f10] 'toggle-frame-fullscreen)
|
|
||||||
(global-set-key (kbd "C-s") 'ripgrep-regexp)
|
(global-set-key (kbd "C-s") 'ripgrep-regexp)
|
||||||
|
(global-set-key (kbd "C-,") 'move-to-previous-window)
|
||||||
|
(global-set-key (kbd "C-.") 'move-to-next-window)
|
||||||
(global-set-key (kbd "M-i") 'xref-find-definitions)
|
(global-set-key (kbd "M-i") 'xref-find-definitions)
|
||||||
(global-set-key (kbd "C-M-i") 'xref-pop-marker-stack)
|
(global-set-key (kbd "C-M-i") 'xref-pop-marker-stack)
|
||||||
|
|
||||||
|
@ -118,14 +117,6 @@
|
||||||
(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
|
|
||||||
:config (global-undo-tree-mode 1)
|
|
||||||
:diminish undo-tree-mode)
|
|
||||||
|
|
||||||
(use-package evil
|
(use-package evil
|
||||||
:ensure t
|
:ensure t
|
||||||
:init
|
:init
|
||||||
|
@ -150,17 +141,18 @@
|
||||||
(define-key evil-normal-state-map (kbd "C-M-u") 'eval-buffer)
|
(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 "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-M-\\") 'format-all-buffer)
|
||||||
(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
|
;; (evil-define-key 'normal Buffer-menu-mode-map (kbd "RET") )
|
||||||
:commands format-all-mode
|
(evil-define-key 'normal neotree-mode-map (kbd "TAB") 'neotree-enter)
|
||||||
:hook (prog-mode . format-all-mode)
|
(evil-define-key 'normal neotree-mode-map (kbd "SPC") 'neotree-quick-look)
|
||||||
:config
|
(evil-define-key 'normal neotree-mode-map (kbd "q") 'neotree-hide)
|
||||||
(setq-default format-all-formatters
|
(evil-define-key 'normal neotree-mode-map (kbd "RET") 'neotree-enter)
|
||||||
'(("C" (astyle "--mode=c"))
|
(evil-define-key 'normal neotree-mode-map (kbd "g") 'neotree-refresh)
|
||||||
("Shell" (shfmt "-i" "4" "-ci")))))
|
(evil-define-key 'normal neotree-mode-map (kbd "n") 'neotree-next-line)
|
||||||
|
(evil-define-key 'normal neotree-mode-map (kbd "p") 'neotree-previous-line)
|
||||||
|
(evil-define-key 'normal neotree-mode-map (kbd "A") 'neotree-stretch-toggle)
|
||||||
|
(evil-define-key 'normal neotree-mode-map (kbd "H") 'neotree-hidden-file-toggle))
|
||||||
|
|
||||||
(use-package evil-collection
|
(use-package evil-collection
|
||||||
:after evil
|
:after evil
|
||||||
|
@ -168,8 +160,6 @@
|
||||||
:config
|
:config
|
||||||
(evil-collection-init))
|
(evil-collection-init))
|
||||||
|
|
||||||
(use-package all-the-icons)
|
|
||||||
|
|
||||||
(use-package dashboard
|
(use-package dashboard
|
||||||
:ensure t
|
:ensure t
|
||||||
:config
|
:config
|
||||||
|
@ -178,15 +168,17 @@
|
||||||
(use-package doom-themes
|
(use-package doom-themes
|
||||||
:ensure t
|
:ensure t
|
||||||
:config
|
:config
|
||||||
(setq doom-themes-enable-bold t
|
;; Global settings (defaults)
|
||||||
doom-themes-enable-italic t)
|
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
|
||||||
|
doom-themes-enable-italic t) ; if nil, italics is universally disabled
|
||||||
(load-theme 'doom-monokai-classic t)
|
(load-theme 'doom-monokai-classic t)
|
||||||
;; (load-theme 'mazarbul t)
|
;; Enable custom neotree theme (all-the-icons must be installed!)
|
||||||
|
(doom-themes-neotree-config)
|
||||||
|
;; Corrects (and improves) org-mode's native fontification.
|
||||||
(doom-themes-org-config))
|
(doom-themes-org-config))
|
||||||
|
|
||||||
(use-package solaire-mode
|
(use-package all-the-icons
|
||||||
:config
|
:if (display-graphic-p))
|
||||||
(solaire-global-mode +1))
|
|
||||||
|
|
||||||
(use-package treemacs
|
(use-package treemacs
|
||||||
:ensure t
|
:ensure t
|
||||||
|
@ -249,6 +241,10 @@
|
||||||
treemacs-width-is-initially-locked t
|
treemacs-width-is-initially-locked t
|
||||||
treemacs-workspace-switch-cleanup nil)
|
treemacs-workspace-switch-cleanup nil)
|
||||||
|
|
||||||
|
;; The default width and height of the icons is 22 pixels. If you are
|
||||||
|
;; using a Hi-DPI display, uncomment this to double the icon size.
|
||||||
|
;;(treemacs-resize-icons 44)
|
||||||
|
|
||||||
(treemacs-follow-mode nil)
|
(treemacs-follow-mode nil)
|
||||||
(treemacs-filewatch-mode t)
|
(treemacs-filewatch-mode t)
|
||||||
(treemacs-fringe-indicator-mode 'always)
|
(treemacs-fringe-indicator-mode 'always)
|
||||||
|
@ -289,6 +285,16 @@
|
||||||
:after (treemacs magit)
|
:after (treemacs magit)
|
||||||
:ensure t)
|
:ensure t)
|
||||||
|
|
||||||
|
(use-package treemacs-persp ;;treemacs-perspective if you use perspective.el vs. persp-mode
|
||||||
|
:after (treemacs persp-mode) ;;or perspective vs. persp-mode
|
||||||
|
:ensure t
|
||||||
|
:config (treemacs-set-scope-type 'Perspectives))
|
||||||
|
|
||||||
|
(use-package treemacs-tab-bar ;;treemacs-tab-bar if you use tab-bar-mode
|
||||||
|
:after (treemacs)
|
||||||
|
:ensure t
|
||||||
|
:config (treemacs-set-scope-type 'Tabs))
|
||||||
|
|
||||||
(use-package centaur-tabs
|
(use-package centaur-tabs
|
||||||
:init
|
:init
|
||||||
(setq centaur-tabs-enable-key-bindings t)
|
(setq centaur-tabs-enable-key-bindings t)
|
||||||
|
@ -367,6 +373,19 @@ Other buffer group by `centaur-tabs-get-group-name' with project name."
|
||||||
("g t" . centaur-tabs-forward)
|
("g t" . centaur-tabs-forward)
|
||||||
("g T" . centaur-tabs-backward)))
|
("g T" . centaur-tabs-backward)))
|
||||||
|
|
||||||
|
(use-package undo-tree
|
||||||
|
:config (global-undo-tree-mode 1)
|
||||||
|
:diminish undo-tree-mode)
|
||||||
|
|
||||||
|
(use-package format-all
|
||||||
|
:hook ((format-all-mode-hook . format-all-ensure-formatter)))
|
||||||
|
|
||||||
|
(use-package rainbow-delimiters
|
||||||
|
:hook ((prog-mode-hook . rainbow-delimiters-mode)))
|
||||||
|
|
||||||
|
(use-package dumb-jump
|
||||||
|
:hook ((xref-backend-functions . dumb-jump-xref-activate)))
|
||||||
|
|
||||||
(use-package elfeed
|
(use-package elfeed
|
||||||
:config
|
:config
|
||||||
(global-set-key (kbd "C-x w") 'elfeed)
|
(global-set-key (kbd "C-x w") 'elfeed)
|
||||||
|
@ -405,35 +424,115 @@ Other buffer group by `centaur-tabs-get-group-name' with project name."
|
||||||
("https://feeds.npr.org/344098539/podcast.xml" podcast))))
|
("https://feeds.npr.org/344098539/podcast.xml" podcast))))
|
||||||
|
|
||||||
(use-package projectile
|
(use-package projectile
|
||||||
:config
|
|
||||||
(setq company-minimum-prefix-length 1
|
|
||||||
company-idle-delay 0.0))
|
|
||||||
|
|
||||||
(use-package company
|
|
||||||
:ensure t
|
:ensure t
|
||||||
:config (global-company-mode t))
|
:init
|
||||||
|
(projectile-mode +1)
|
||||||
|
:bind (:map projectile-mode-map
|
||||||
|
("s-p" . projectile-command-map)
|
||||||
|
("C-c p" . projectile-command-map)))
|
||||||
|
|
||||||
(use-package ivy
|
(use-package ivy
|
||||||
:init (ivy-mode 1))
|
:init (ivy-mode 1))
|
||||||
|
|
||||||
(use-package which-key
|
(use-package org-modern
|
||||||
|
:config
|
||||||
|
(setq
|
||||||
|
;; Edit settings
|
||||||
|
org-auto-align-tags nil
|
||||||
|
org-tags-column 0
|
||||||
|
org-catch-invisible-edits 'show-and-error
|
||||||
|
org-special-ctrl-a/e t
|
||||||
|
org-insert-heading-respect-content t
|
||||||
|
|
||||||
|
;; Org styling, hide markup etc.
|
||||||
|
org-hide-emphasis-markers t
|
||||||
|
org-pretty-entities t
|
||||||
|
org-ellipsis "…"
|
||||||
|
|
||||||
|
;; Agenda styling
|
||||||
|
org-agenda-tags-column 0
|
||||||
|
org-agenda-block-separator ?─
|
||||||
|
org-agenda-time-grid
|
||||||
|
'((daily today require-timed)
|
||||||
|
(800 1000 1200 1400 1600 1800 2000)
|
||||||
|
" ┄┄┄┄┄ " "┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄")
|
||||||
|
org-agenda-current-time-string
|
||||||
|
"◀── now ─────────────────────────────────────────────────")
|
||||||
|
:init
|
||||||
|
(add-hook 'org-mode-hook #'org-modern-mode)
|
||||||
|
(add-hook 'org-mode-hook (lambda ()
|
||||||
|
(setq buffer-face-mode-face '(:family "Fira Code" :height 100))
|
||||||
|
(buffer-face-mode)))
|
||||||
|
(add-hook 'org-agenda-finalize-hook #'org-modern-agenda))
|
||||||
|
|
||||||
|
(use-package restclient)
|
||||||
|
(use-package markdown-mode
|
||||||
|
:ensure t
|
||||||
|
:mode ("README\\.md\\'" . gfm-mode)
|
||||||
|
:init (setq markdown-command "multimarkdown"))
|
||||||
|
|
||||||
|
(use-package docker
|
||||||
|
:ensure t
|
||||||
|
:bind ("C-c d" . docker))
|
||||||
|
(use-package docker-compose-mode)
|
||||||
|
|
||||||
|
(use-package web-mode
|
||||||
|
:config
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.jsx?$" . web-mode))
|
||||||
|
(setq web-mode-content-types-alist '(("jsx" . "\\.js[x]?\\'"))))
|
||||||
|
|
||||||
|
(use-package typescript-mode)
|
||||||
|
(use-package tide
|
||||||
|
:ensure t
|
||||||
|
:after (typescript-mode company flycheck)
|
||||||
|
:hook ((typescript-mode . tide-setup)
|
||||||
|
(typescript-mode . tide-hl-identifier-mode)
|
||||||
|
(before-save . tide-format-before-save)))
|
||||||
|
(use-package uxntal-mode)
|
||||||
|
(use-package hy-mode)
|
||||||
|
(use-package lua-mode)
|
||||||
|
(use-package elm-mode)
|
||||||
|
(use-package go-mode)
|
||||||
|
(use-package rust-mode)
|
||||||
|
(use-package cargo)
|
||||||
|
(use-package ccls
|
||||||
|
:ensure t
|
||||||
|
:init (setq ccls-executable "/usr/bin/ccls")
|
||||||
|
:hook ((c-mode c++-mode objc-mode cuda-mode) .
|
||||||
|
(lambda () (require 'ccls) (lsp))))
|
||||||
|
|
||||||
|
(use-package lsp-mode
|
||||||
|
:commands (lsp lsp-deferred)
|
||||||
|
:init
|
||||||
|
(setq lsp-keymap-prefix "C-c l")
|
||||||
|
:hook
|
||||||
|
((go-mode) . lsp)
|
||||||
|
((rust-mode) . lsp))
|
||||||
|
|
||||||
|
(use-package lsp-ui
|
||||||
|
:hook (lsp-mode . lsp-ui-mode)
|
||||||
|
:config
|
||||||
|
(setq lsp-ui-doc-enable t))
|
||||||
|
|
||||||
|
(use-package sly
|
||||||
:ensure t
|
:ensure t
|
||||||
:config
|
:config
|
||||||
(which-key-mode))
|
(setq inferior-lisp-program "sbcl"))
|
||||||
|
|
||||||
(use-package column-enforce-mode
|
(use-package vterm
|
||||||
:init
|
:ensure t)
|
||||||
(global-column-enforce-mode))
|
|
||||||
|
|
||||||
(use-package magit
|
(use-package dash)
|
||||||
:ensure t
|
(use-package column-enforce-mode)
|
||||||
:bind (
|
(use-package desktop)
|
||||||
("C-x g" . magit-status)))
|
(use-package magit)
|
||||||
(use-package magit-lfs
|
(use-package magit-lfs
|
||||||
:ensure t
|
:ensure t
|
||||||
:pin melpa)
|
:pin melpa)
|
||||||
(use-package forge
|
(use-package forge
|
||||||
:after magit)
|
:after magit)
|
||||||
|
(use-package ripgrep)
|
||||||
|
|
||||||
(use-package git-gutter
|
(use-package git-gutter
|
||||||
:ensure t
|
:ensure t
|
||||||
:init (global-git-gutter-mode t))
|
:init (global-git-gutter-mode t))
|
||||||
|
@ -447,103 +546,25 @@ 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)
|
(defun display-line-numbers--turn-on ()
|
||||||
|
"Turn on line numbers except for certain major modes.
|
||||||
(use-package markdown-mode
|
Exempt major modes are defined in `display-line-numbers-exempt-modes'."
|
||||||
:ensure t
|
(unless (or (minibufferp)
|
||||||
:mode ("README\\.md\\'" . gfm-mode)
|
(member major-mode display-line-numbers-exempt-modes))
|
||||||
:init (setq markdown-command "multimarkdown"))
|
(display-line-numbers-mode)))
|
||||||
|
;(global-column-enforce-mode)
|
||||||
(use-package org-modern
|
(global-display-line-numbers-mode)
|
||||||
:init
|
|
||||||
(global-org-modern-mode))
|
|
||||||
|
|
||||||
(use-package docker
|
|
||||||
:ensure t
|
|
||||||
:bind ("C-c d" . docker))
|
|
||||||
(use-package docker-compose-mode)
|
|
||||||
|
|
||||||
(use-package json-mode
|
|
||||||
:ensure t)
|
|
||||||
|
|
||||||
(use-package web-mode
|
|
||||||
:ensure t
|
|
||||||
:config
|
|
||||||
(setq web-mode-markup-indent-offset 2)
|
|
||||||
(setq web-mode-code-indent-offset 2)
|
|
||||||
(setq web-mode-css-indent-offset 2)
|
|
||||||
:mode (("\\.js\\'" . web-mode)
|
|
||||||
("\\.jsx\\'" . web-mode)
|
|
||||||
("\\.ts\\'" . web-mode)
|
|
||||||
("\\.tsx\\'" . web-mode)
|
|
||||||
("\\.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 ()
|
|
||||||
(enable-minor-mode
|
|
||||||
'("\\.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)
|
|
||||||
(use-package cargo)
|
|
||||||
(use-package ccls
|
|
||||||
:hook ((c-mode c++-mode objc-mode cuda-mode) .
|
|
||||||
(lambda () (require 'ccls) (lsp))))
|
|
||||||
|
|
||||||
(use-package lsp-mode
|
|
||||||
:commands (lsp lsp-deferred)
|
|
||||||
:init
|
|
||||||
(setq lsp-keymap-prefix "C-c l")
|
|
||||||
:hook (
|
|
||||||
(elm-mode . lsp-deferred)
|
|
||||||
(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)
|
|
||||||
|
|
||||||
(use-package sly
|
|
||||||
:ensure t
|
|
||||||
:config
|
|
||||||
(setq inferior-lisp-program "sbcl"))
|
|
||||||
|
|
||||||
(use-package vterm
|
|
||||||
:ensure t)
|
|
||||||
|
|
||||||
(custom-set-variables
|
(custom-set-variables
|
||||||
;; custom-set-variables was added by Custom.
|
;; custom-set-variables was added by Custom.
|
||||||
;; 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
|
'(inhibit-startup-screen t)
|
||||||
'("5409f053b500223bdcc4d4214986b4b57a55529b1e4659d6c48049751f1be43b" "f5f80dd6588e59cfc3ce2f11568ff8296717a938edd448a947f9823a4e282b66" "02d422e5b99f54bd4516d4157060b874d14552fe613ea7047c4a5cfa1288cf4f" "8d8207a39e18e2cc95ebddf62f841442d36fcba01a2a9451773d4ed30b632443" "be84a2e5c70f991051d4aaf0f049fa11c172e5d784727e0b525565bb1533ec78" default))
|
'(neo-theme 'icons))
|
||||||
'(inhibit-startup-screen t))
|
|
||||||
;; Must be used *after* the theme is loaded
|
|
||||||
(custom-set-faces
|
(custom-set-faces
|
||||||
;; electric buffer list
|
;; custom-set-faces was added by Custom.
|
||||||
`(cm-electric-emacs-buffer-mode-face ((t (:foreground ,(doom-color 'violet)))))
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
`(cm-electric-c-buffer-mode-face ((t (:foreground ,(doom-color 'blue)))))
|
;; Your init file should contain only one such instance.
|
||||||
|
;; 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