From 7f5fc74cddcb2d375a25682b79b8ed5c6a714b2c Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 7 Oct 2024 15:57:40 +0100 Subject: Some changes --- Emacs/.config/emacs/config.org | 103 +++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 55 deletions(-) (limited to 'Emacs/.config/emacs') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index b316958..4ac9def 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -1327,19 +1327,6 @@ really need this in my config at all times. Enable when needed. :straight t :defer t) #+end_src -** WAIT Hl-line -:PROPERTIES: -:header-args:emacs-lisp: :tangle no :results none -:END: -Highlights the current line. - -#+begin_src emacs-lisp -(use-package hl-line - :straight t - :defer t - :hook (text-mode-hook . hl-line-mode) - :hook (prog-mode-hook . hl-line-mode)) -#+end_src ** Recentf Recentf provides a method of keeping track of recently opened files. @@ -2402,8 +2389,10 @@ playing. :init (setq empv-audio-dir (expand-file-name "~/Media/audio") empv-video-dir (expand-file-name "~/Media/videos") - empv-audio-file-extensions '("mp3" "ogg" "wav" "m4a" "flac" "aac" "opus") - empv-video-file-extensions '("mkv" "mp4" "avi" "mov" "webm")) + empv-audio-file-extensions (list "mp3" "ogg" "wav" "m4a" + "flac" "aac" "opus") + empv-video-file-extensions (list "mkv" "mp4" "avi" "mov" + "webm")) :hydra (empv-hydra nil "Hydra for EMPV" @@ -2790,7 +2779,8 @@ description I give won't do it justice. (add-multiple-to-list aggressive-indent-excluded-modes 'c-mode 'c++-mode 'cc-mode 'asm-mode 'js-mode 'typescript-mode - 'tsx-mode 'typescript-ts-mode 'tsx-ts-mode) + 'tsx-mode 'typescript-ts-mode 'tsx-ts-mode + 'tuareg-mode) (global-aggressive-indent-mode)) #+end_src ** Compilation @@ -2890,27 +2880,26 @@ Here I: (leader "p" `(,project-prefix-map :which-key "Project")) :config + (defun +project/command (folder) + (format "ctags -Re -f %sTAGS %s*" + folder folder)) + + (defun +project/root () + (if (project-current) + (project-root (project-current)) + default-directory)) + (defun +project/generate-tags () (interactive) - (let* ((project (project-current)) - (folder (format "%s" (if project - (project-root project) - default-directory))) - (tags-file (concat folder "TAGS"))) - (set-process-sentinel - (start-process-shell-command - "PROJECT-GENERATE-TAGS" - "*gen-tags*" - (format "ctags -Re -f %s %s" - tags-file - (concat folder "*"))) - (lambda (p event) - (when (string= event "finished\n") - (visit-tags-table (concat (if (project-current) - (project-root (project-current)) - default-directory) - "TAGS")) - (message "Finished generating tags!"))))))) + (set-process-sentinel + (start-process-shell-command + "PROJECT-GENERATE-TAGS" + "*tags*" + (+project/tags-command (+project/root))) + (lambda (p event) + (when (string= event "finished\n") + (message "Finished generating tags!") + (visit-tags-table (format "%sTAGS" (+project/root)))))))) #+end_src ** devdocs When man pages aren't enough, you need some documentation lookup @@ -3976,37 +3965,41 @@ typing. It's nice because it adds good auto completion. :init (setq typescript-indent-level 2)) #+end_src -** WAIT Scheme -:PROPERTIES: -:header-args:emacs-lisp: :tangle no :results none -:END: +** Scheme Another Lisp but simpler than the rest. A beauty of engineering and -fun to write programs in. +fun to write programs in. Here I setup ~geiser~, which is the +premiere way to interact with scheme REPLs. #+begin_src emacs-lisp -(use-package cmuscheme +(use-package geiser + :defer t + :straight t :display - ("\\*scheme\\*" - (display-buffer-reuse-window display-buffer-at-bottom) + ("\\*Geiser.*" + (display-buffer-reuse-mode-window display-buffer-at-bottom) (window-height . 0.3)) :general (shell-leader - "S" #'run-scheme) + "S" #'geiser) (local-leader :keymaps 'scheme-mode-map - "t" #'run-scheme - "e" #'scheme-send-last-sexp) - (local-leader - :keymaps 'scheme-mode-map - :infix "c" - "c" #'scheme-compile-definition - "f" #'scheme-compile-file - "r" #'scheme-compile-region) + "t" #'geiser + "m" #'geiser-doc-look-up-manual + "d" #'geiser-doc-symbol-at-point) (local-leader :keymaps 'scheme-mode-map - :infix "s" - "f" #'scheme-send-definition - "r" #'scheme-send-region)) + :infix "e" + "e" #'geiser-eval-last-sexp + "b" #'geiser-eval-buffer + "d" #'geiser-eval-definition + "r" #'geiser-eval-region) + :init + (with-eval-after-load "evil" + (evil-set-initial-state 'geiser-debug-mode-map 'emacs))) + +(use-package geiser-guile + :defer t + :straight t) #+end_src ** WAIT Ocaml :PROPERTIES: -- cgit v1.2.3-13-gbd6f