mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-13 19:57:19 +00:00
Change emacs theme to solarized gruvbox.
This commit is contained in:
parent
bb73f7cacf
commit
ea40736d6b
1 changed files with 40 additions and 21 deletions
|
@ -1,7 +1,9 @@
|
||||||
{ config, pkgs, inputs, nurNoPkgs, ... }:
|
{ config, pkgs, inputs, nurNoPkgs, ... }:
|
||||||
|
|
||||||
let pcfg = config.programs.emacs.init.usePackage;
|
let
|
||||||
in {
|
pcfg = config.programs.emacs.init.usePackage;
|
||||||
|
in
|
||||||
|
{
|
||||||
imports = [ nurNoPkgs.repos.rycee.hmModules.emacs-init ];
|
imports = [ nurNoPkgs.repos.rycee.hmModules.emacs-init ];
|
||||||
|
|
||||||
programs.emacs.enable = true;
|
programs.emacs.enable = true;
|
||||||
|
@ -18,84 +20,98 @@ in {
|
||||||
recommendedGcSettings = true;
|
recommendedGcSettings = true;
|
||||||
usePackageVerbose = false;
|
usePackageVerbose = false;
|
||||||
earlyInit = ''
|
earlyInit = ''
|
||||||
; -*-emacs-lisp-*-
|
; -*-emacs-lisp-*-
|
||||||
;; Disable Toolbar
|
;; Disable Toolbar
|
||||||
(tool-bar-mode -1)
|
(tool-bar-mode -1)
|
||||||
|
|
||||||
;; Disable scrollbar
|
;; Disable scrollbar
|
||||||
(scroll-bar-mode -1)
|
(scroll-bar-mode -1)
|
||||||
|
|
||||||
;; Disable menubar
|
;; Disable menubar
|
||||||
(menu-bar-mode -1)
|
(menu-bar-mode -1)
|
||||||
|
|
||||||
(setq debug-on-error t)
|
(setq debug-on-error t)
|
||||||
|
|
||||||
;; Use UTF-8
|
;; Use UTF-8
|
||||||
(set-terminal-coding-system 'utf-8)
|
(set-terminal-coding-system 'utf-8)
|
||||||
(set-keyboard-coding-system 'utf-8)
|
(set-keyboard-coding-system 'utf-8)
|
||||||
(prefer-coding-system 'utf-8)
|
(prefer-coding-system 'utf-8)
|
||||||
|
|
||||||
;; Minimize native-comp warnings
|
;; Minimize native-comp warnings
|
||||||
(setq native-comp-async-report-warnings-errors nil)
|
(setq native-comp-async-report-warnings-errors nil)
|
||||||
(setq warning-minimum-level 'error)
|
(setq warning-minimum-level 'error)
|
||||||
'';
|
|
||||||
|
|
||||||
prelude = ''
|
|
||||||
; -*-emacs-lisp-*-
|
|
||||||
;; Disable startup message.
|
;; Disable startup message.
|
||||||
(setq inhibit-startup-screen t
|
(setq inhibit-startup-screen t
|
||||||
inhibit-startup-echo-area-message (user-login-name))
|
inhibit-startup-echo-area-message (user-login-name))
|
||||||
|
|
||||||
|
;; Empty initial scratch buffer.
|
||||||
|
(setq initial-major-mode 'emacs-lisp-mode
|
||||||
|
initial-scratch-message nil)
|
||||||
|
'';
|
||||||
|
|
||||||
|
prelude = ''
|
||||||
|
; -*-emacs-lisp-*-
|
||||||
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
|
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
|
||||||
("melpa-stable" . "https://stable.melpa.org/packages/")
|
("melpa-stable" . "https://stable.melpa.org/packages/")
|
||||||
("gnu" . "https://elpa.gnu.org/packages/")
|
("gnu" . "https://elpa.gnu.org/packages/")
|
||||||
("nongnu" . "https://elpa.nongnu.org/nongnu/")))
|
("nongnu" . "https://elpa.nongnu.org/nongnu/")))
|
||||||
;; Empty initial scratch buffer.
|
|
||||||
(setq initial-major-mode 'emacs-lisp-mode
|
|
||||||
initial-scratch-message nil)
|
|
||||||
(setenv "PATH" (concat "${config.home.profileDirectory}/bin:" (getenv "PATH")))
|
(setenv "PATH" (concat "${config.home.profileDirectory}/bin:" (getenv "PATH")))
|
||||||
|
'';
|
||||||
|
|
||||||
|
postlude = ''
|
||||||
|
;-*-emacs-lisp-*-
|
||||||
;; Accept 'y' and 'n' rather than 'yes' and 'no'.
|
;; Accept 'y' and 'n' rather than 'yes' and 'no'.
|
||||||
(defalias 'yes-or-no-p 'y-or-n-p)
|
(defalias 'yes-or-no-p 'y-or-n-p)
|
||||||
|
|
||||||
;; Typically, I only want spaces when pressing the TAB key. I also
|
;; Typically, I only want spaces when pressing the TAB key. I also
|
||||||
;; want 4 of them.
|
;; want 4 of them.
|
||||||
(setq-default indent-tabs-mode nil
|
(setq-default indent-tabs-mode nil
|
||||||
tab-width 4
|
tab-width 4
|
||||||
c-basic-offset 4)
|
c-basic-offset 4)
|
||||||
|
|
||||||
;; Increase emacs data read limit (default too low for LSP)
|
;; Increase emacs data read limit (default too low for LSP)
|
||||||
(setq read-process-output-max (* 1024 1024))
|
(setq read-process-output-max (* 1024 1024))
|
||||||
'';
|
|
||||||
|
|
||||||
postlude = ''
|
|
||||||
;-*-emacs-lisp-*-
|
|
||||||
;; Stop creating backup and autosave files.
|
;; Stop creating backup and autosave files.
|
||||||
(setq make-backup-files nil
|
(setq make-backup-files nil
|
||||||
auto-save-default nil)
|
auto-save-default nil)
|
||||||
|
|
||||||
;; Always show line and column number in the mode line.
|
;; Always show line and column number in the mode line.
|
||||||
(line-number-mode)
|
(line-number-mode)
|
||||||
(column-number-mode)
|
(column-number-mode)
|
||||||
|
|
||||||
;; Soft wrap lines
|
;; Soft wrap lines
|
||||||
(visual-line-mode)
|
(visual-line-mode)
|
||||||
|
|
||||||
;; Use one space to end sentences.
|
;; Use one space to end sentences.
|
||||||
(setq sentence-end-double-space nil)
|
(setq sentence-end-double-space nil)
|
||||||
;; I typically want to use UTF-8.
|
|
||||||
(prefer-coding-system 'utf-8)
|
|
||||||
;; Enable highlighting of current line.
|
;; Enable highlighting of current line.
|
||||||
(global-hl-line-mode 1)
|
(global-hl-line-mode 1)
|
||||||
;; When finding file in non-existing directory, offer to create the
|
|
||||||
;; parent directory.
|
|
||||||
(defun with-buffer-name-prompt-and-make-subdirs ()
|
(defun with-buffer-name-prompt-and-make-subdirs ()
|
||||||
|
"Offer to create parent directory when finding file in a non-existent directory."
|
||||||
(let ((parent-directory (file-name-directory buffer-file-name)))
|
(let ((parent-directory (file-name-directory buffer-file-name)))
|
||||||
(when (and (not (file-exists-p parent-directory))
|
(when (and (not (file-exists-p parent-directory))
|
||||||
(y-or-n-p (format "Directory `%s' does not exist! Create it? " parent-directory)))
|
(y-or-n-p (format "Directory `%s' does not exist! Create it? " parent-directory)))
|
||||||
(make-directory parent-directory t))))
|
(make-directory parent-directory t))))
|
||||||
(add-to-list 'find-file-not-found-functions #'with-buffer-name-prompt-and-make-subdirs)
|
(add-to-list 'find-file-not-found-functions #'with-buffer-name-prompt-and-make-subdirs)
|
||||||
;; Reduce wrist pain
|
|
||||||
(global-set-key (kbd "M-n") "~")
|
(global-set-key (kbd "M-n") "~")
|
||||||
(global-set-key (kbd "M-N") "`")
|
(global-set-key (kbd "M-N") "`")
|
||||||
|
|
||||||
;; Keybind to format/prettify document, uses either format-all or
|
;; Keybind to format/prettify document, uses either format-all or
|
||||||
;; lsp-mode depending on availability
|
;; lsp-mode depending on availability
|
||||||
(global-set-key (kbd "C-c C-y") 'my/format-document)
|
(global-set-key (kbd "C-c C-y") 'my/format-document)
|
||||||
|
|
||||||
;; Don't warn when cannot guess python indent level
|
;; Don't warn when cannot guess python indent level
|
||||||
(setq-default python-indent-guess-indent-offset-verbose nil)
|
(setq-default python-indent-guess-indent-offset-verbose nil)
|
||||||
|
|
||||||
;; Disable scroll + C to zoom
|
;; Disable scroll + C to zoom
|
||||||
(global-unset-key (kbd "C-<wheel-down>"))
|
(global-unset-key (kbd "C-<wheel-down>"))
|
||||||
(global-unset-key (kbd "C-<wheel-up>"))
|
(global-unset-key (kbd "C-<wheel-up>"))
|
||||||
(load-theme 'doom-gruvbox t)
|
|
||||||
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
usePackage = {
|
usePackage = {
|
||||||
|
@ -183,8 +199,6 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
doom-themes.enable = true;
|
|
||||||
|
|
||||||
edit-indirect.enable = true;
|
edit-indirect.enable = true;
|
||||||
|
|
||||||
editorconfig = {
|
editorconfig = {
|
||||||
|
@ -727,6 +741,11 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
solarized-theme = {
|
||||||
|
enable = true;
|
||||||
|
init = "(load-theme 'solarized-gruvbox-dark t)";
|
||||||
|
};
|
||||||
|
|
||||||
swiper = {
|
swiper = {
|
||||||
enable = true;
|
enable = true;
|
||||||
bind = { "C-s" = "swiper"; };
|
bind = { "C-s" = "swiper"; };
|
||||||
|
|
Loading…
Add table
Reference in a new issue