configurations: emacs changes 2

This commit is contained in:
Mateusz Słodkowicz 2024-10-30 22:06:16 +01:00
parent eb746b0e7c
commit 2971dd2dc7
Signed by: materus
GPG Key ID: 28D140BCA60B4FD1
10 changed files with 27 additions and 22 deletions

View File

@ -17,7 +17,7 @@
enableTerminal = lib.mkDefault true;
enableTerminalExtra = lib.mkDefault true;
enableNixDevel = lib.mkDefault true;
editor.emacs.enable = true;
editor.emacs.enable = false;
editor.code.fhs.enable = true;
editor.code.fhs.packages = (ps: with ps; let llvmpkgs = llvmPackages_18; in [
llvmpkgs.clang

View File

@ -163,6 +163,8 @@ in
speedtest() {
${lib.getExe pkgs.curl} -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | ${lib.getExe pkgs.python3}
}
${lib.optionalString config.materus.profile.editor.emacs.enable ''alias "e"="emacsclient -nw -c --alternate-editor= "''}
'' +

View File

@ -52,11 +52,9 @@
)
(xterm-mouse-mode 1)
(setq read-process-output-max (* 1024 1024 3))
(when (or (not (display-graphic-p)) (daemonp))
(xterm-mouse-mode 1)
)
(setq ring-bell-function 'ignore)

View File

@ -0,0 +1,5 @@
(add-hook 'c-mode-hook 'lsp-deferred)
(add-hook 'c-mode-hook 'display-line-numbers-mode)
(add-hook 'c++-mode-hook 'lsp-deferred)
(add-hook 'c++-mode-hook 'display-line-numbers-mode)

View File

@ -42,21 +42,11 @@
:priority 0
:server-id 'nixd)))
;; Hooks
(add-hook 'c-mode-hook 'lsp-deferred)
(add-hook 'c-mode-hook 'display-line-numbers-mode)
(add-hook 'c++-mode-hook 'lsp-deferred)
(add-hook 'c++-mode-hook 'display-line-numbers-mode)
(load (concat materus/cfg "/lsp/cpp"))
(load (concat materus/cfg "/lsp/java"))
(load (concat materus/cfg "/lsp/nix"))
(load (concat materus/cfg "/lsp/lisp"))
(add-hook 'nix-mode-hook 'lsp-deferred)
(add-hook 'nix-mode-hook 'display-line-numbers-mode)
(add-hook 'java-mode-hook 'lsp-deferred)
(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)

View File

@ -0,0 +1 @@
(add-hook 'java-mode-hook 'lsp-deferred)

View File

@ -0,0 +1,2 @@
(add-hook 'emacs-lisp-mode-hook 'display-line-numbers-mode)
(add-hook 'emacs-lisp-mode-hook 'company-mode)

View File

@ -0,0 +1,2 @@
(add-hook 'nix-mode-hook 'lsp-deferred)
(add-hook 'nix-mode-hook 'display-line-numbers-mode)

View File

@ -25,7 +25,12 @@
(tool-bar-mode -1)
(load-theme 'doom-horizon t)
(if (daemonp)
(add-hook 'after-make-frame-functions
(lambda (frame)
(with-selected-frame frame (load-theme 'doom-horizon t))))
(load-theme 'doom-horizon t))
(setq-default cursor-type '(bar . 1))
(pixel-scroll-precision-mode 1)
@ -93,4 +98,4 @@
;(global-set-key (kbd "H-∇") (lambda () (interactive) (insert-char #x2207)))
(load (concat materus/cfg "/lsp"))
(load (concat materus/cfg "/lsp/default"))

View File

@ -1,4 +1,4 @@
(setq-default materus/nix-packages (require 'doom-themes nil 'noerror))
(setq-default materus/nix-packages (require 'evil nil 'noerror))
(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"))