aboutsummaryrefslogtreecommitdiff
path: root/doom
diff options
context:
space:
mode:
Diffstat (limited to 'doom')
-rw-r--r--doom/config.el55
-rw-r--r--doom/init.el22
2 files changed, 65 insertions, 12 deletions
diff --git a/doom/config.el b/doom/config.el
index 1b28487..3be5137 100644
--- a/doom/config.el
+++ b/doom/config.el
@@ -36,7 +36,7 @@
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
-(setq display-line-numbers-type t)
+(setq display-line-numbers-type 'relative)
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
@@ -96,5 +96,58 @@
(add-hook 'doom-load-theme-hook #'my/make-all-faces-transparent)
(add-hook 'after-make-frame-functions #'my/make-all-faces-transparent)
(add-hook 'window-setup-hook #'my/make-all-faces-transparent)
+(add-hook 'server-after-make-frame-hook #'my/make-all-faces-transparent)
(my/make-all-faces-transparent)
+
+(after! diff-hl
+ (global-diff-hl-mode +1)
+ (diff-hl-flydiff-mode +1)
+ (unless (display-graphic-p)
+ (diff-hl-margin-mode +1))
+ (set-face-attribute 'diff-hl-insert nil :foreground "green" :background 'unspecified)
+ (set-face-attribute 'diff-hl-delete nil :foreground "red" :background 'unspecified)
+ (set-face-attribute 'diff-hl-change nil :foreground "yellow" :background 'unspecified))
+(add-hook 'after-make-frame-functions
+ (lambda (frame)
+ (unless (display-graphic-p frame)
+ (diff-hl-margin-mode +1))))
+
+(defun my/yank-to-clipboard ()
+ "Yank to system clipboard via Evil's + register."
+
+ (let ((evil-this-register ?+))
+ (call-interactively #'evil-yank)))
+
+(defun my/yank-line-to-clipboard ()
+ "Yank current line to system clipboard via Evil's + register."
+ (interactive)
+ (let ((evil-this-register ?+))
+ (call-interactively #'evil-yank-line)))
+
+(map! :leader
+ :desc "Yank to system clipboard" "y" #'my/yank-to-clipboard
+ :desc "Yank line to system clipboard" "Y" #'my/yank-line-to-clipboard)
+
+(defun my/setup-selection-face ()
+ (unless (display-graphic-p)
+ (set-face-attribute 'region nil
+ :background "brightblack"
+ :foreground "white"
+ :extend t)))
+(add-hook 'doom-load-theme-hook #'my/setup-selection-face 10)
+
+(after! evil-goggles
+ (set-face-attribute 'evil-goggles-default-face nil
+ :background "brightblack"
+ :foreground "white"))
+
+(setq scroll-margin 8)
+
+(after! which-key
+ (setq which-key-idle-delay 0.5))
+
+(add-function :after after-focus-change-function
+ (lambda ()
+ (unless (frame-focus-state)
+ (save-some-buffers t))))
diff --git a/doom/init.el b/doom/init.el
index d566163..7201554 100644
--- a/doom/init.el
+++ b/doom/init.el
@@ -114,12 +114,12 @@
:lang
;;agda ; types of types of types of types...
;;beancount ; mind the GAAP
- ;;(cc +lsp) ; C > C++ == 1
+ (cc +lsp) ; C > C++ == 1
;;clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c
- ;;csharp ; unity, .NET, and mono shenanigans
+ csharp ; unity, .NET, and mono shenanigans
;;data ; config/data formats
;;(dart +flutter) ; paint ui and not much else
;;dhall
@@ -141,24 +141,24 @@
;;idris ; a language you can depend on
;;json ; At least it ain't XML
;;(java +lsp) ; the poster child for carpal tunnel syndrome
- ;;javascript ; all(hope(abandon(ye(who(enter(here))))))
- ;;julia ; a better, faster MATLAB
+ javascript ; all(hope(abandon(ye(who(enter(here))))))
+ julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
- ;;latex ; writing papers in Emacs has never been so fun
+ latex ; writing papers in Emacs has never been so fun
;;lean ; for folks with too much to prove
;;ledger ; be audit you can be
- ;;lua ; one-based indices? one-based indices
+ lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
;;nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
- (org +roam +present) ; organize your plain life in plain text
+ (org +roam) ; organize your plain life in plain text
;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;graphviz ; diagrams for confusing yourself even more
;;purescript ; javascript, but functional
- ;;python ; beautiful is better than ugly
- ;;qt ; the 'cutest' gui framework ever
+ python ; beautiful is better than ugly
+ qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6
;;rest ; Emacs as a REST client
@@ -178,11 +178,11 @@
:email
;;(mu4e +org +gmail)
- ;;notmuch
+;;notmuch
;;(wanderlust +gmail)
:app
- ;;calendar
+ calendar
;;emms
;;everywhere ; *leave* Emacs!? You must be joking
;;irc ; how neckbeards socialize