This commit is contained in:
Mateusz Słodkowicz 2024-11-20 00:57:28 +01:00
parent 1e436f0842
commit 443da9482a
Signed by: materus
GPG Key ID: 28D140BCA60B4FD1
2 changed files with 13 additions and 5 deletions

View File

@ -1,5 +1,6 @@
;;; -*- lexical-binding: t; -*- ;;; -*- lexical-binding: t; -*-
;; [[file:emacs-materus-config.org::*Early Init Variables][Early Init Variables:1]]
(defvar materus/init-early t (defvar materus/init-early t
"Is emacs using materus early init") ; Var to ensure early-init loaded, not used anymore but keeping it anyway "Is emacs using materus early init") ; Var to ensure early-init loaded, not used anymore but keeping it anyway
(setq materus/init-early t) ; Probably useless (setq materus/init-early t) ; Probably useless
@ -45,13 +46,17 @@
(defvar materus-emacs-gc-cons-threshold (* 32 1024 1024) (defvar materus-emacs-gc-cons-threshold (* 32 1024 1024)
"The value of `gc-cons-threshold' after Emacs startup.") ; Define after init garbage collector threshold "The value of `gc-cons-threshold' after Emacs startup.") ; Define after init garbage collector threshold
;; Early Init Variables:1 ends here
;; [[file:emacs-materus-config.org::*Garbage Collector][Garbage Collector:1]]
(setq gc-cons-threshold most-positive-fixnum) ; Set `gc-cons-threshold' so it won't collectect during initialization (setq gc-cons-threshold most-positive-fixnum) ; Set `gc-cons-threshold' so it won't collectect during initialization
(add-hook 'emacs-startup-hook (add-hook 'emacs-startup-hook
(lambda () (lambda ()
(setq gc-cons-threshold materus-emacs-gc-cons-threshold))) ; Set `gc-cons-threshold' to desired value after startup (setq gc-cons-threshold materus-emacs-gc-cons-threshold))) ; Set `gc-cons-threshold' to desired value after startup
;; Garbage Collector:1 ends here
;; [[file:emacs-materus-config.org::*Early Frame Settings][Early Frame Settings:1]]
(setq frame-inhibit-implied-resize t) (setq frame-inhibit-implied-resize t)
(setq frame-resize-pixelwise t) (setq frame-resize-pixelwise t)
(setq window-resize-pixelwise t) ; Allow pixelwise resizing of window and frame (setq window-resize-pixelwise t) ; Allow pixelwise resizing of window and frame
@ -69,7 +74,9 @@
(advice-remove #'tty-run-terminal-initialization #'ignore) (advice-remove #'tty-run-terminal-initialization #'ignore)
(tty-run-terminal-initialization (selected-frame) nil t) (tty-run-terminal-initialization (selected-frame) nil t)
))) )))
;; Early Frame Settings:1 ends here
;; [[file:emacs-materus-config.org::*Native compilation][Native compilation:1]]
(setq native-comp-async-report-warnings-errors nil) ; Silence warnings (setq native-comp-async-report-warnings-errors nil) ; Silence warnings
(setq native-comp-speed 3) ; Set native-comp speed (setq native-comp-speed 3) ; Set native-comp speed
@ -86,3 +93,4 @@
(startup-redirect-eln-cache (startup-redirect-eln-cache
(convert-standard-filename (convert-standard-filename
(expand-file-name "var/eln-cache/" user-emacs-directory)))) (expand-file-name "var/eln-cache/" user-emacs-directory))))
;; Native compilation:1 ends here

View File

@ -61,9 +61,10 @@ My emacs config, tangled file is [[file:etc/materus/emacs-config.el][there]]
* Init Files * Init Files
** Early Init ** Early Init
:PROPERTIES: :PROPERTIES:
:header-args: :tangle early-init.el :header-args: :tangle early-init.el :comments link
:END: :END:
Early init file, setting for GC and some paths. Early init file, setting for GC and some paths.
Tangled file is [[./early-init.el][there]]
#+begin_src emacs-lisp :comments no #+begin_src emacs-lisp :comments no
;;; -*- lexical-binding: t; -*- ;;; -*- lexical-binding: t; -*-
#+end_src #+end_src
@ -369,7 +370,7 @@ Graphical related settings.
(lambda (frame) (when (= (length (frame-list)) 2) (lambda (frame) (when (= (length (frame-list)) 2)
(set-frame-parameter frame 'fullscreen 'maximized))))) (set-frame-parameter frame 'fullscreen 'maximized)))))
(when (display-graphic-p) (when (display-graphic-p)
(set-frame-font "Hack Nerd Font" nil t) (set-frame-font "Hack Nerd Font" nil t)
) )
@ -381,8 +382,8 @@ Graphical related settings.
(tool-bar-mode -1) (tool-bar-mode -1)
(setq-default cursor-type '(bar . 1)) (setq-default cursor-type '(bar . 1))
;; Rainbow mode ;; Rainbow mode
(use-package rainbow-mode (use-package rainbow-mode
@ -706,7 +707,6 @@ Other configs
(use-package lsp-pyright) (use-package lsp-pyright)
(setq lsp-pyright-langserver-command "pyright") (setq lsp-pyright-langserver-command "pyright")
(add-hook 'python-mode-hook 'lsp-deferred) (add-hook 'python-mode-hook 'lsp-deferred)
#+end_src #+end_src
** Java ** Java
#+begin_src emacs-lisp #+begin_src emacs-lisp