configurations: emacs changes
This commit is contained in:
parent
868a49fb74
commit
eb746b0e7c
|
@ -11,7 +11,6 @@ let
|
||||||
persp-mode
|
persp-mode
|
||||||
dashboard
|
dashboard
|
||||||
magit
|
magit
|
||||||
helm
|
|
||||||
avy
|
avy
|
||||||
corfu
|
corfu
|
||||||
vterm
|
vterm
|
||||||
|
@ -32,6 +31,7 @@ let
|
||||||
treemacs-projectile
|
treemacs-projectile
|
||||||
tree-edit
|
tree-edit
|
||||||
vertico
|
vertico
|
||||||
|
marginalia
|
||||||
nerd-icons
|
nerd-icons
|
||||||
nerd-icons-completion
|
nerd-icons-completion
|
||||||
perspective
|
perspective
|
||||||
|
@ -63,6 +63,7 @@ let
|
||||||
right-click-context
|
right-click-context
|
||||||
moe-theme
|
moe-theme
|
||||||
doom-themes
|
doom-themes
|
||||||
|
orderless
|
||||||
];
|
];
|
||||||
|
|
||||||
default-config = ''
|
default-config = ''
|
||||||
|
@ -125,8 +126,8 @@ in
|
||||||
|
|
||||||
programs.emacs = {
|
programs.emacs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = with pkgs;
|
package =
|
||||||
lib.mkDefault (pkgs.emacs29.override ({
|
lib.mkDefault (pkgs.emacs29.override {
|
||||||
withSQLite3 = true;
|
withSQLite3 = true;
|
||||||
withWebP = true;
|
withWebP = true;
|
||||||
withX = true;
|
withX = true;
|
||||||
|
@ -135,8 +136,8 @@ in
|
||||||
withGconf = true;
|
withGconf = true;
|
||||||
withImageMagick = true;
|
withImageMagick = true;
|
||||||
withXwidgets = true;
|
withXwidgets = true;
|
||||||
}));
|
});
|
||||||
extraPackages = epkgs: ((packages epkgs));
|
extraPackages = epkgs: (packages epkgs);
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,62 @@
|
||||||
|
(require 'recentf)
|
||||||
|
(require 'no-littering)
|
||||||
|
(add-to-list 'recentf-exclude
|
||||||
|
(recentf-expand-file-name no-littering-var-directory))
|
||||||
|
(add-to-list 'recentf-exclude
|
||||||
|
(recentf-expand-file-name no-littering-etc-directory))
|
||||||
|
|
||||||
|
(setq native-comp-async-report-warnings-errors nil)
|
||||||
|
(setq package-enable-at-startup nil)
|
||||||
|
(setq frame-inhibit-implied-resize t)
|
||||||
|
(defvar materus/init-early nil)
|
||||||
|
(unless materus/init-early
|
||||||
|
(tool-bar-mode -1)
|
||||||
|
(setq initial-major-mode 'fundamental-mode)
|
||||||
|
(setq-default package-quickstart t)
|
||||||
|
(setq native-comp-speed 3)
|
||||||
|
(add-hook 'emacs-startup-hook (lambda () (package-initialize)
|
||||||
|
(setq gc-cons-threshold 100000000 ; ~100mb
|
||||||
|
gc-cons-percentage 0.1)
|
||||||
|
))
|
||||||
|
(unless (daemonp)
|
||||||
|
(setq gc-cons-threshold most-positive-fixnum ; 2^61 bytes
|
||||||
|
gc-cons-percentage 0.6)
|
||||||
|
(setq package-enable-at-startup nil)
|
||||||
|
|
||||||
|
(advice-add #'tty-run-terminal-initialization :override #'ignore)
|
||||||
|
(add-hook 'window-setup-hook
|
||||||
|
(lambda ()
|
||||||
|
(advice-remove #'tty-run-terminal-initialization #'ignore)
|
||||||
|
(tty-run-terminal-initialization (selected-frame) nil t)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(setq custom-file (concat user-emacs-directory "etc/custom.el"))
|
||||||
|
|
||||||
|
(setq auto-save-default nil)
|
||||||
|
(setq backup-directory-alist
|
||||||
|
`((".*" . ,(concat user-emacs-directory "var/backups/"))))
|
||||||
|
(setq auto-save-file-name-transforms
|
||||||
|
`((".*" ,(concat user-emacs-directory "var/recovery/") t)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;;. Graphical
|
||||||
|
(setq frame-resize-pixelwise t)
|
||||||
|
(when (display-graphic-p)
|
||||||
|
(set-frame-font "Hack Nerd Font" nil t)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(setq read-process-output-max (* 1024 1024 3))
|
||||||
|
(when (or (not (display-graphic-p)) (daemonp))
|
||||||
|
(xterm-mouse-mode 1)
|
||||||
|
)
|
||||||
|
|
||||||
|
(setq ring-bell-function 'ignore)
|
|
@ -56,4 +56,7 @@
|
||||||
(add-hook 'nix-mode-hook 'display-line-numbers-mode)
|
(add-hook 'nix-mode-hook 'display-line-numbers-mode)
|
||||||
|
|
||||||
(add-hook 'java-mode-hook 'lsp-deferred)
|
(add-hook 'java-mode-hook 'lsp-deferred)
|
||||||
(add-hook 'nix-mode-hook 'display-line-numbers-mode)
|
(add-hook 'nix-mode-hook 'display-line-numbers-mode)
|
||||||
|
|
||||||
|
(add-hook 'emacs-lisp-mode-hook 'display-line-numbers-mode)
|
||||||
|
(add-hook 'emacs-lisp-mode-hook 'company-mode)
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
(straight-use-package 'persp-mode)
|
(straight-use-package 'persp-mode)
|
||||||
(straight-use-package 'dashboard)
|
(straight-use-package 'dashboard)
|
||||||
(straight-use-package 'magit)
|
(straight-use-package 'magit)
|
||||||
(straight-use-package 'helm)
|
|
||||||
(straight-use-package 'avy)
|
(straight-use-package 'avy)
|
||||||
(straight-use-package 'corfu)
|
(straight-use-package 'corfu)
|
||||||
(straight-use-package 'vterm)
|
(straight-use-package 'vterm)
|
||||||
|
@ -41,6 +40,7 @@
|
||||||
(straight-use-package 'treemacs-projectile)
|
(straight-use-package 'treemacs-projectile)
|
||||||
(straight-use-package 'tree-edit)
|
(straight-use-package 'tree-edit)
|
||||||
(straight-use-package 'vertico)
|
(straight-use-package 'vertico)
|
||||||
|
(straight-use-package 'marginalia)
|
||||||
(straight-use-package 'nerd-icons)
|
(straight-use-package 'nerd-icons)
|
||||||
(straight-use-package 'nerd-icons-completion)
|
(straight-use-package 'nerd-icons-completion)
|
||||||
(straight-use-package 'perspective)
|
(straight-use-package 'perspective)
|
||||||
|
@ -71,4 +71,5 @@
|
||||||
(straight-use-package 'no-littering)
|
(straight-use-package 'no-littering)
|
||||||
(straight-use-package 'right-click-context)
|
(straight-use-package 'right-click-context)
|
||||||
(straight-use-package 'moe-theme)
|
(straight-use-package 'moe-theme)
|
||||||
(straight-use-package 'doom-themes)
|
(straight-use-package 'doom-themes)
|
||||||
|
(straight-use-package 'orderless)
|
|
@ -1,48 +1,5 @@
|
||||||
(require 'recentf)
|
(defvar materus/cfg nil)
|
||||||
(require 'no-littering)
|
(setq materus/cfg (concat user-emacs-directory "etc/materus"))
|
||||||
(add-to-list 'recentf-exclude
|
|
||||||
(recentf-expand-file-name no-littering-var-directory))
|
|
||||||
(add-to-list 'recentf-exclude
|
|
||||||
(recentf-expand-file-name no-littering-etc-directory))
|
|
||||||
|
|
||||||
(setq native-comp-async-report-warnings-errors nil)
|
|
||||||
(setq package-enable-at-startup nil)
|
|
||||||
(setq frame-inhibit-implied-resize t)
|
|
||||||
(defvar materus/init-early nil)
|
|
||||||
(unless materus/init-early
|
|
||||||
(tool-bar-mode -1)
|
|
||||||
(setq initial-major-mode 'fundamental-mode)
|
|
||||||
(setq-default package-quickstart t)
|
|
||||||
(setq native-comp-speed 3)
|
|
||||||
(add-hook 'emacs-startup-hook (lambda () (package-initialize)
|
|
||||||
(setq gc-cons-threshold 100000000 ; ~100mb
|
|
||||||
gc-cons-percentage 0.1)
|
|
||||||
))
|
|
||||||
(unless (daemonp)
|
|
||||||
(setq gc-cons-threshold most-positive-fixnum ; 2^61 bytes
|
|
||||||
gc-cons-percentage 0.6)
|
|
||||||
(setq package-enable-at-startup nil)
|
|
||||||
|
|
||||||
(advice-add #'tty-run-terminal-initialization :override #'ignore)
|
|
||||||
(add-hook 'window-setup-hook
|
|
||||||
(lambda ()
|
|
||||||
(advice-remove #'tty-run-terminal-initialization #'ignore)
|
|
||||||
(tty-run-terminal-initialization (selected-frame) nil t)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(setq custom-file (concat user-emacs-directory "etc/custom.el"))
|
|
||||||
|
|
||||||
(setq auto-save-default nil)
|
|
||||||
(setq backup-directory-alist
|
|
||||||
`((".*" . ,(concat user-emacs-directory "var/backups/"))))
|
|
||||||
(setq auto-save-file-name-transforms
|
|
||||||
`((".*" ,(concat user-emacs-directory "var/recovery/") t)))
|
|
||||||
|
|
||||||
|
|
||||||
; Load packages
|
; Load packages
|
||||||
(require 'telephone-line)
|
(require 'telephone-line)
|
||||||
|
@ -56,25 +13,20 @@
|
||||||
(require 'treemacs)
|
(require 'treemacs)
|
||||||
(require 'treemacs-projectile)
|
(require 'treemacs-projectile)
|
||||||
(require 'treemacs-nerd-icons)
|
(require 'treemacs-nerd-icons)
|
||||||
|
(require 'vertico)
|
||||||
;Graphical
|
(require 'orderless)
|
||||||
(setq frame-resize-pixelwise t)
|
(require 'marginalia)
|
||||||
(when (display-graphic-p)
|
|
||||||
(set-frame-font "Hack Nerd Font" nil t)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(setq read-process-output-max (* 1024 1024 3))
|
|
||||||
(when (or (not (display-graphic-p)) (daemonp))
|
|
||||||
(xterm-mouse-mode 1)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
(tool-bar-mode -1)
|
(tool-bar-mode -1)
|
||||||
(load-theme 'doom-horizon t)
|
(load-theme 'doom-horizon t)
|
||||||
|
|
||||||
(setq ring-bell-function 'ignore)
|
|
||||||
(setq-default cursor-type '(bar . 1))
|
(setq-default cursor-type '(bar . 1))
|
||||||
(pixel-scroll-precision-mode 1)
|
(pixel-scroll-precision-mode 1)
|
||||||
|
|
||||||
|
@ -116,6 +68,15 @@
|
||||||
;Enable treemacs
|
;Enable treemacs
|
||||||
(global-set-key (kbd "C-H-t") 'treemacs)
|
(global-set-key (kbd "C-H-t") 'treemacs)
|
||||||
|
|
||||||
|
;; Enable vertico
|
||||||
|
(vertico-mode 1)
|
||||||
|
(marginalia-mode 1)
|
||||||
|
|
||||||
|
|
||||||
|
;(setq completion-styles '(orderless basic)
|
||||||
|
; completion-category-defaults nil
|
||||||
|
; completion-category-overrides '((file (styles partial-completion))))
|
||||||
|
|
||||||
;CUA
|
;CUA
|
||||||
(cua-mode 1)
|
(cua-mode 1)
|
||||||
(global-set-key (kbd "C-y") 'undo-redo)
|
(global-set-key (kbd "C-y") 'undo-redo)
|
||||||
|
@ -129,4 +90,7 @@
|
||||||
(define-key key-translation-map (kbd "∇") 'event-apply-hyper-modifier )
|
(define-key key-translation-map (kbd "∇") 'event-apply-hyper-modifier )
|
||||||
|
|
||||||
;(global-set-key (kbd "C-∇") (kbd "C-H"))
|
;(global-set-key (kbd "C-∇") (kbd "C-H"))
|
||||||
;(global-set-key (kbd "H-∇") (lambda () (interactive) (insert-char #x2207)))
|
;(global-set-key (kbd "H-∇") (lambda () (interactive) (insert-char #x2207)))
|
||||||
|
|
||||||
|
|
||||||
|
(load (concat materus/cfg "/lsp"))
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
(setq-default materus/nix-packages (require 'doom-themes nil 'noerror))
|
(setq-default materus/nix-packages (require 'doom-themes nil 'noerror))
|
||||||
(unless materus/nix-packages (load (concat user-emacs-directory "etc/materus/packages")))
|
(unless materus/nix-packages (load (concat user-emacs-directory "etc/materus/packages")))
|
||||||
|
(load (concat user-emacs-directory "etc/materus/internals"))
|
||||||
(load (concat user-emacs-directory "etc/materus/start"))
|
(load (concat user-emacs-directory "etc/materus/start"))
|
||||||
(load (concat user-emacs-directory "etc/materus/lsp"))
|
|
||||||
|
|
Loading…
Reference in New Issue