feat(emacs): :)

This commit is contained in:
Flinner Yuu 2022-05-23 00:43:17 +03:00
parent 7ea0d660e7
commit f0a4dd630f
Signed by: flinner
GPG Key ID: 95CE0DA7F0E58CA6
1 changed files with 99 additions and 26 deletions

View File

@ -257,6 +257,12 @@ Self explanatory
(setq org-roam-v2-ack t) ; anonying startup message (setq org-roam-v2-ack t) ; anonying startup message
#+end_src #+end_src
** Tab Width
*8* Spaces for a single tab is too much
#+begin_src emacs-lisp
(setq-default tab-width 4)
#+end_src
* Auth! * Auth!
should i really be commiting this? :> should i really be commiting this? :>
** auth sources ** auth sources
@ -445,7 +451,8 @@ Capture
"o" '(:ignore t :which-key "Open") "o" '(:ignore t :which-key "Open")
"oT" '(vterm :which-key "Vterm in current window") "oT" '(vterm :which-key "Vterm in current window")
;"ot" '(vterm-other-window :which-key "Vterm in other window") ; use C-t
;"ot" '(vterm-toggle :which-key "Vterm in other window")
"ob" '(bookmark-jump :which-key "Bookmark Jump") "ob" '(bookmark-jump :which-key "Bookmark Jump")
"oB" '(bookmark-set :which-key "Bookmark set") "oB" '(bookmark-set :which-key "Bookmark set")
"op" '(list-processes :which-key "List Proccess") "op" '(list-processes :which-key "List Proccess")
@ -575,6 +582,7 @@ Capture
(define-key evil-insert-state-map "\C-b" 'evil-backward-char) (define-key evil-insert-state-map "\C-b" 'evil-backward-char)
(define-key evil-visual-state-map "\C-b" 'evil-backward-char) (define-key evil-visual-state-map "\C-b" 'evil-backward-char)
(define-key evil-insert-state-map "\C-d" 'evil-delete-char) (define-key evil-insert-state-map "\C-d" 'evil-delete-char)
(define-key evil-normal-state-map "\C-i" 'evil-jump-forward) (define-key evil-normal-state-map "\C-i" 'evil-jump-forward)
@ -797,6 +805,7 @@ slow loading! defer it
:defer 5 :defer 5
:diminish company-mode :diminish company-mode
:custom :custom
(company-tooltip-minimum-width 40) ;reduce flicker due to changing width
(global-company-mode t) (global-company-mode t)
(company-idle-delay 0.3) ;; how long to wait until popup (company-idle-delay 0.3) ;; how long to wait until popup
(company-minimum-prefix-length 1) ;; The minimum prefix length for idle completion. (company-minimum-prefix-length 1) ;; The minimum prefix length for idle completion.
@ -1073,7 +1082,7 @@ Allow fast code insertion
:olp ("Ideas" "Project") :olp ("Ideas" "Project")
:todo-state "") :todo-state "")
("Blogs" :keys "b" ("Blogs" :keys "b"
:olp ("Ideas" "Blog") :olp ("Blog")
:todo-state "") :todo-state "")
("placeholder" :keys "w" ("placeholder" :keys "w"
:headline "Watch" :headline "Watch"
@ -1593,6 +1602,10 @@ Lsp UI
#+end_src #+end_src
** Git ** Git
#+begin_src emacs-lisp
(setq vc-handled-backends '(Git))
#+end_src
*** Magit *** Magit
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package magit (use-package magit
@ -1601,6 +1614,12 @@ Lsp UI
(magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)) (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))
#+end_src #+end_src
Magit TODOs!
#+begin_src emacs-lisp
(use-package magit-todos
:after magit
:config (magit-todos-mode 1))
#+end_src
*** TODO Forge *** TODO Forge
#+begin_src emacs-lisp #+begin_src emacs-lisp
;(use-package forge) ;(use-package forge)
@ -1831,9 +1850,9 @@ Auto format
svelte svelte
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package svelte-mode (use-package svelte-mode
:config :hook (svelte-mode . lsp)
(add-hook 'before-save-hook 'lsp-format-buffer) (svelte-mode . (lambda ()
:hook (svelte-mode . lsp)) (add-hook 'before-save-hook 'lsp-format-buffer nil t))))
#+end_src #+end_src
prettier prettier
@ -1913,6 +1932,9 @@ Better Diff in header sizes
AucTex AucTex
#+begin_src emacs-lisp #+begin_src emacs-lisp
;; latexmk ;; latexmk
(use-package magic-latex-buffer
:custom (magic-latex-buffer 1)
:defer t)
(use-package auctex-latexmk (use-package auctex-latexmk
:defer t) :defer t)
;; company ;; company
@ -2085,6 +2107,37 @@ ivy bibtex
*** Verilog *** Verilog
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq verilog-linter "verilator --lint-only") (setq verilog-linter "verilator --lint-only")
#+end_src
*** Bash
#+begin_src emacs-lisp
(use-package flymake-shellcheck
:commands flymake-shellcheck-load
:init
(add-hook 'sh-mode-hook 'flymake-shellcheck-load))
#+end_src
** Tramp
#+begin_src emacs-lisp
; moved to Git
; https://emacs.stackexchange.com/questions/16489/tramp-is-unbearably-slow-osx-ssh
; (setq vc-handled-backends '(Git))
(setq tramp-backup-directory-alist backup-directory-alist)
(setq vc-ignore-dir-regexp
(format "\\(%s\\)\\|\\(%s\\)"
vc-ignore-dir-regexp
tramp-file-name-regexp))
(setq vc-handled-backends '(Git))
;https://libredd.it/r/emacs/comments/320cvb/projectile_slows_tramp_mode_to_a_crawl_is_there_a/
(add-hook 'find-file-hook
(lambda ()
(when (file-remote-p default-directory)
(setq-local projectile-mode-line "Projectile"
vc-handled-backends '()))))
#+end_src #+end_src
* Misc * Misc
@ -2103,12 +2156,22 @@ ivy bibtex
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package vterm (use-package vterm
:commands vterm :commands vterm
;; :bind (:map vterm-mode-map
;; ("C-t" . vterm-toggle))
:config
;;Toggle vterm
(evil-define-key '(normal visual insert) 'vterm-mode-map (kbd "C-t") 'vterm-toggle)
:custom :custom
; claimed to be faster: https://teddit.net/r/emacs/comments/tpey9g/making_vterm_snappy_by_setting_vtermtimerdelay_to/ ; claimed to be faster: https://teddit.net/r/emacs/comments/tpey9g/making_vterm_snappy_by_setting_vtermtimerdelay_to/
(vterm-timer-delay nil) (vterm-timer-delay nil)
:ensure t) :ensure t)
#+end_src #+end_src
#+begin_src emacs-lisp
(use-package vterm-toggle)
#+end_src
** COMMENT ranger ** COMMENT ranger
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package ranger (use-package ranger
@ -2172,12 +2235,19 @@ ivy bibtex
icon "" icon ""
icon-color "#BA68C8") icon-color "#BA68C8")
(setq message "" (setq message ""
icon "" icon ""; "";; I want it to be empty
icon-color "#FDD835")) icon-color "#FDD835"))
(concat "%{F" icon-color "}" icon "%{F-}" message))) (concat "%{F" icon-color "}" icon "%{F-}" message)))
#+end_src #+end_src
** Gemini
#+begin_src emacs-lisp
(use-package elpher
:defer t
:hook (elpher-mode . olivetti-mode) )
#+end_src
* Elfeed org * Elfeed org
=;; (setq rmh-elfeed-org-files (list "~/Documents/private.el/elfeed.org"))= =;; (setq rmh-elfeed-org-files (list "~/Documents/private.el/elfeed.org"))=
** Elfeed-org ** Elfeed-org
@ -2564,12 +2634,11 @@ I prefer text/plain, over everything >:)
* Telega * Telega
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package telega (use-package telega
:commands (telega)
:init :init
(defun my/telega/olivetti () (setq-local olivetti-body-width 80)) (defun my/telega/olivetti () (setq-local olivetti-body-width 80))
(defun my/telega/company-backends () (defun my/telega/company-backends ()
(setq-local company-backends (setq-local company-backends
(append '(telega-company-username telega-company-botcmd ) (append '(telega-company-username telega-company-botcmd telega-company-emoji)
company-backends))) company-backends)))
:hook (telega-chat-mode . olivetti-mode) :hook (telega-chat-mode . olivetti-mode)
(telega-chat-mode . my/telega/olivetti) (telega-chat-mode . my/telega/olivetti)
@ -2577,11 +2646,15 @@ I prefer text/plain, over everything >:)
;; installed telegram-tdlib from AUR ;; installed telegram-tdlib from AUR
:config :config
(telega-mode-line-mode) (telega-mode-line-mode)
(telega-appindicator-mode)
(telega-notifications-mode) (telega-notifications-mode)
:custom (telega-server-libs-prefix "/usr") :custom (telega-server-libs-prefix "/usr")
(telega-chat-bidi-display-reordering 'right-to-left) (telega-chat-bidi-display-reordering 'right-to-left)
(telega-sticker-size '(10 . 24)) (telega-sticker-size '(10 . 24))
(telega-emoji-use-images nil)) (telega-emoji-use-images nil)
(telega-symbol-checkmark "🄌")
(telega-symbol-heavy-checkmark "⬤")
)
#+end_src #+end_src