From dab319bbf8dfbef560f9e73ff1991f16cb0daa79 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Mon, 11 Apr 2022 17:33:24 -0500 Subject: [PATCH] adding hl-line-mode --- README.org | 31 +++++++++++++++++++++++++++++++ init.el | 22 +++++----------------- 2 files changed, 36 insertions(+), 17 deletions(-) diff --git a/README.org b/README.org index c677c900..eef79138 100644 --- a/README.org +++ b/README.org @@ -537,6 +537,29 @@ Visual fill column does a lot of the same as olivetti, but works with visual lin :after org) #+end_src +*** Lin and Pulsar +These two packages created by Prot are interesting to me and may help to make sure I do not loose my place in emacs so much. +#+begin_src emacs-lisp :tangle no +(use-package lin + :config + (setq lin-mode-hooks + '(bongo-mode-hook + dired-mode-hook + elfeed-search-mode-hook + git-rebase-mode-hook + ibuffer-mode-hook + ilist-mode-hook + ledger-report-mode-hook + log-view-mode-hook + magit-log-mode-hook + mu4e-headers-mode + notmuch-search-mode-hook + notmuch-tree-mode-hook + occur-mode-hook + org-agenda-mode-hook + tabulated-list-mode-hook))) +#+end_src + ** Completion My completion framework is a combination of packages so that everything remains seperate and lightweight. @@ -1171,6 +1194,12 @@ Before getting into languages, often times compilation of things use ansi-colors (add-hook 'comint-mode-hook 'ansi-color-for-comint-mode-on) #+END_SRC +Let's also set =hl-line-mode= to be on for comint and prog modes +#+BEGIN_SRC emacs-lisp +(add-hook 'comint-mode-hook 'hl-line-mode) +(add-hook 'prog-mode-hook 'hl-line-mode) +#+END_SRC + *** C++ In c++ I just want to make sure lsp is called when enter cc-mode #+BEGIN_SRC emacs-lisp @@ -1658,6 +1687,8 @@ Part of this config includes some special capture templates for my work as a you (add-hook 'org-agenda-finalize-hook 'evil-normal-state) (add-hook 'org-agenda-finalize-hook 'chris/org-agenda-setup) + (advice-add 'org-agenda-todo :after #'org-save-all-org-buffers) + (setq org-refile-targets '((org-agenda-files . (:maxlevel . 6)))) (setq org-agenda-window-setup 'current-window) diff --git a/init.el b/init.el index c3cf4c7e..6f349e91 100644 --- a/init.el +++ b/init.el @@ -733,6 +733,9 @@ targets." (defvar read-symbol-positions-list nil) (add-hook 'comint-mode-hook 'ansi-color-for-comint-mode-on) +(add-hook 'comint-mode-hook 'hl-line-mode) +(add-hook 'prog-mode-hook 'hl-line-mode) + (add-hook 'c++-mode-hook 'lsp) (use-package lua-mode @@ -1077,6 +1080,8 @@ targets." (add-hook 'org-agenda-finalize-hook 'evil-normal-state) (add-hook 'org-agenda-finalize-hook 'chris/org-agenda-setup) + (advice-add 'org-agenda-todo :after #'org-save-all-org-buffers) + (setq org-refile-targets '((org-agenda-files . (:maxlevel . 6)))) (setq org-agenda-window-setup 'current-window) @@ -2087,20 +2092,3 @@ interfere with the default `bongo-playlist-buffer'." gcmh-verbose nil)) (setq warning-suppress-types '((comp))) -(custom-set-variables - ;; custom-set-variables was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(pdf-misc-print-program "/usr/bin/lpr" t) - '(pdf-misc-print-program-args '("-o media=Letter" "-o fitplot") t) - '(safe-local-variable-values - '((aggressive-indent-mode) - (projectile-project-run-cmd . "./build/bin/presenter") - (projectile-project-compilation-cmd . "cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -B build/ . && make --dir build/")))) -(custom-set-faces - ;; custom-set-faces was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - )