diff options
-rw-r--r-- | lisp/general.el | 2 | ||||
-rw-r--r-- | lisp/org-custom.el | 7 | ||||
-rw-r--r-- | lisp/vc-annotate-lens-mode.el | 59 |
3 files changed, 45 insertions, 23 deletions
diff --git a/lisp/general.el b/lisp/general.el index c8f4ca0..2b1bcca 100644 --- a/lisp/general.el +++ b/lisp/general.el @@ -43,7 +43,7 @@ ;; Default Values (setq-default indent-tabs-mode nil) ; use spaces only if nil (setq-default tab-width 2) ; Assuming you want your tabs to be four spaces wide -(set-face-attribute 'default nil :font "Source Code Pro-12") +(set-face-attribute 'default nil :font "Source Code Pro-11") (set-fontset-font t '(?😊 . ?😎) "Segoe UI Emoji") ;;(set-face-attribute 'default nil :height 110 :family "Consolas") diff --git a/lisp/org-custom.el b/lisp/org-custom.el index da23201..d618f13 100644 --- a/lisp/org-custom.el +++ b/lisp/org-custom.el @@ -78,5 +78,12 @@ (add-hook 'org-mode-hook 'org-custom-hook) +(use-package org-alert + :ensure t + :config + (setq org-alert-interval 300 + org-alert-notify-cutoff 10 + org-alert-notify-after-event-cutoff 10)) + (provide 'org-custom) ;;; org-custom.el ends here diff --git a/lisp/vc-annotate-lens-mode.el b/lisp/vc-annotate-lens-mode.el index 830f568..8580aef 100644 --- a/lisp/vc-annotate-lens-mode.el +++ b/lisp/vc-annotate-lens-mode.el @@ -1,6 +1,17 @@ - ;;; Code: +;;; Commit +;; commit 6257322d751dc36eaaf509682da164f6aef3ff90 +;; Author: Matthew Kosarek <mattkae@protonmail.com> +;; Date: Sat Sep 3 12:01:26 2022 -0400 + +;; Big upgrade to javascript/typescript to use a lanugage server + +;; diff --git a/init.el b/init.el +;; --- a/init.el +;; +++ b/init.el + + (make-variable-buffer-local (defvar vc-annotate-lens-cursor-position 0 "Holds the cursor position from the last run of post-command-hooks.")) @@ -8,31 +19,35 @@ (defun do-stuff-if-moved-post-command () "Show version control history of the current line in a flash." (unless (equal (line-number-at-pos) vc-annotate-lens-cursor-position) - (remove-overlays) - (overlay-put (make-overlay (point-at-eol) (+ 3 (point-at-eol))) 'display "Hello world\n") - (let* ((lfrom (line-number-at-pos (point) t)) - (lto (line-number-at-pos (1- (point)) t)) - (file buffer-file-name) - (backend (vc-backend file)) - (buf (get-buffer-create "*VC_LENS*"))) - - (vc-call region-history (buffer-file-name) buf lfrom lto) - (with-current-buffer buf - (save-restriction - (widen) - (buffer-substring-no-properties (point-min) (point-max)))) + (setq vc-annotate-lens-cursor-position (line-number-at-pos))) + + (remove-overlays) ; TODO: Only remove the overlay that we last displayed + + (let ((git-info (shell-command-to-string (format "git log -u -L%d,%d:%s" vc-annotate-lens-cursor-position vc-annotate-lens-cursor-position buffer-file-name)))) + + (let (( git-info-split (split-string git-info "\n" ))) + (message "%s" 'git-info-split) + (let (( author-line (nth 1 git-info-split)) + ( date-line (nth 2 git-info-split))) + (overlay-put (make-overlay (point-at-eol) (+ 3 (point-at-eol))) 'display + author-line) + ) ) ) - (setq vc-annotate-lens-cursor-position (line-number-at-pos))) - -(define-minor-mode vc-annotate-lens-mode - "Show 'vc-annotate' information when you move to a line." - :lighter " vc-annotate-lens" ) -(add-hook 'vc-annotate-lens-mode-on-hook (lambda () (add-hook 'post-command-hook #'do-stuff-if-moved-post-command))) -(add-hook 'vc-annotate-lens-mode-off-hook (lambda () (remove-hook 'post-command-hook #'do-stuff-if-moved-post-command))) +(do-stuff-if-moved-post-command) + + + + (define-minor-mode vc-annotate-lens-mode + "Show 'vc-annotate' information when you move to a line." + :lighter " vc-annotate-lens" + ) + + (add-hook 'vc-annotate-lens-mode-on-hook (lambda () (add-hook 'post-command-hook #'do-stuff-if-moved-post-command))) + (add-hook 'vc-annotate-lens-mode-off-hook (lambda () (remove-hook 'post-command-hook #'do-stuff-if-moved-post-command))) -(provide 'vc-annotate-lens-mode) + (provide 'vc-annotate-lens-mode) ;;; vc-annotate-lens-mode.el ends here. |