weh
This commit is contained in:
parent
34fd407bf2
commit
983077017a
26
config.org
26
config.org
|
@ -1,3 +1,5 @@
|
||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
#+TITLE: Emacs Configuration
|
#+TITLE: Emacs Configuration
|
||||||
#+AUTHOR: Mars (@pupbrained)
|
#+AUTHOR: Mars (@pupbrained)
|
||||||
#+EMAIL: mars@pupbrained.xyz
|
#+EMAIL: mars@pupbrained.xyz
|
||||||
|
@ -295,8 +297,8 @@
|
||||||
(when (not (derived-mode-p 'python-ts-mode))
|
(when (not (derived-mode-p 'python-ts-mode))
|
||||||
(add-hook 'before-save-hook #'eglot-format-buffer -10 t)))
|
(add-hook 'before-save-hook #'eglot-format-buffer -10 t)))
|
||||||
(add-hook 'eglot-managed-mode-hook #'eglot-format-buffer-on-save)
|
(add-hook 'eglot-managed-mode-hook #'eglot-format-buffer-on-save)
|
||||||
(add-to-list 'eglot-server-programs '(nix-mode . ("nixd")))
|
|
||||||
(add-to-list 'eglot-server-programs
|
(add-to-list 'eglot-server-programs
|
||||||
|
'(nix-mode . ("nixd"))
|
||||||
`(c++-mode . ("clangd" "--clang-tidy" "--completion-style=detailed" "--header-insertion=never")))
|
`(c++-mode . ("clangd" "--clang-tidy" "--completion-style=detailed" "--header-insertion=never")))
|
||||||
:hook
|
:hook
|
||||||
(rust-mode . eglot-ensure)
|
(rust-mode . eglot-ensure)
|
||||||
|
@ -337,11 +339,11 @@
|
||||||
(use-package eldoc-box
|
(use-package eldoc-box
|
||||||
:custom
|
:custom
|
||||||
(eldoc-box-max-pixel-width 1024)
|
(eldoc-box-max-pixel-width 1024)
|
||||||
|
:custom-face
|
||||||
|
(eldoc-box-body ((t (:family "Iosevka Comfy Motion" :background "#181825" :foreground "#cdd6f4"))))
|
||||||
:config
|
:config
|
||||||
(setq eldoc-message-function #'ignore)
|
(setq eldoc-message-function #'ignore
|
||||||
(setq eldoc-idle-delay 0)
|
eldoc-idle-delay 0))
|
||||||
(custom-set-faces
|
|
||||||
'(eldoc-box-body ((t (:family "Iosevka Comfy Motion" :height 140 :background "#181825" :foreground "#cdd6f4"))))))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Apheleia
|
*** Apheleia
|
||||||
|
@ -351,12 +353,10 @@
|
||||||
:ensure t
|
:ensure t
|
||||||
:config
|
:config
|
||||||
(add-to-list 'apheleia-formatters
|
(add-to-list 'apheleia-formatters
|
||||||
'(alejandra "alejandra" "--quiet" "-"))
|
'(alejandra "alejandra" "--quiet" "-")
|
||||||
(add-to-list 'apheleia-formatters
|
|
||||||
'(clang-format "clang-format"))
|
'(clang-format "clang-format"))
|
||||||
(add-to-list 'apheleia-mode-alist
|
(add-to-list 'apheleia-mode-alist
|
||||||
'(nix-mode . alejandra))
|
'(nix-mode . alejandra)
|
||||||
(add-to-list 'apheleia-mode-alist
|
|
||||||
'(c-mode . clang-format))
|
'(c-mode . clang-format))
|
||||||
(add-to-list 'apheleia-mode-alist
|
(add-to-list 'apheleia-mode-alist
|
||||||
'(c++-mode . clang-format))
|
'(c++-mode . clang-format))
|
||||||
|
@ -433,14 +433,6 @@
|
||||||
(add-hook 'prog-mode-hook 'rainbow-delimiters-mode))
|
(add-hook 'prog-mode-hook 'rainbow-delimiters-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Disable Bars
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(menu-bar-mode -1)
|
|
||||||
(scroll-bar-mode -1)
|
|
||||||
(tool-bar-mode -1)
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Line Numbers
|
** Line Numbers
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
|
@ -1,4 +1,54 @@
|
||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;;; early-init.el --- Emacs pre package.el & GUI configuration -*- lexical-binding: t; -*-
|
||||||
(setq package-enable-at-startup nil)
|
(setq package-enable-at-startup nil)
|
||||||
(setq tab-always-indent 'complete)
|
(setq inhibit-default-init nil)
|
||||||
(setq text-mode-ispell-word-completion nil)
|
|
||||||
(setq read-extended-command-predicate #'command-completion-default-include-p)
|
(setq native-comp-async-report-warnings-errors nil)
|
||||||
|
|
||||||
|
(defvar default-file-name-handler-alist file-name-handler-alist)
|
||||||
|
(setq file-name-handler-alist nil)
|
||||||
|
|
||||||
|
(setq gc-cons-threshold most-positive-fixnum
|
||||||
|
gc-cons-percentage 1)
|
||||||
|
|
||||||
|
(defun +gc-after-focus-change ()
|
||||||
|
"Run GC when frame loses focus."
|
||||||
|
(run-with-idle-timer
|
||||||
|
5 nil
|
||||||
|
(lambda () (unless (frame-focus-state) (garbage-collect)))))
|
||||||
|
|
||||||
|
(defun +reset-init-values ()
|
||||||
|
(run-with-idle-timer
|
||||||
|
1 nil
|
||||||
|
(lambda ()
|
||||||
|
(setq file-name-handler-alist default-file-name-handler-alist
|
||||||
|
gc-cons-percentage 0.1
|
||||||
|
gc-cons-threshold 100000000)
|
||||||
|
(message "gc-cons-threshold & file-name-handler-alist restored")
|
||||||
|
(when (boundp 'after-focus-change-function)
|
||||||
|
(add-function :after after-focus-change-function #'+gc-after-focus-change)))))
|
||||||
|
|
||||||
|
(with-eval-after-load 'elpaca
|
||||||
|
(add-hook 'elpaca-after-init-hook '+reset-init-values))
|
||||||
|
|
||||||
|
(push '(menu-bar-lines . 0) default-frame-alist)
|
||||||
|
(push '(tool-bar-lines . 0) default-frame-alist)
|
||||||
|
(push '(vertical-scroll-bars) default-frame-alist)
|
||||||
|
|
||||||
|
(setq server-client-instructions nil)
|
||||||
|
|
||||||
|
(setq frame-inhibit-implied-resize t)
|
||||||
|
|
||||||
|
(push '(font . "Iosevka Comfy Motion") default-frame-alist)
|
||||||
|
(set-face-font 'default "Iosevka Comfy Motion")
|
||||||
|
(set-face-font 'variable-pitch "Iosevka Comfy Motion Duo")
|
||||||
|
(copy-face 'default 'fixed-pitch)
|
||||||
|
|
||||||
|
(advice-add #'x-apply-session-resources :override #'ignore)
|
||||||
|
|
||||||
|
(setq desktop-restore-forces-onscreen nil)
|
||||||
|
|
||||||
|
(setq ring-bell-function #'ignore
|
||||||
|
inhibit-startup-screen t)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue