diff --git a/.swp b/.swp new file mode 100644 index 0000000..02973bf Binary files /dev/null and b/.swp differ diff --git a/Emacs-Logo.svg b/Emacs-Logo.svg new file mode 100644 index 0000000..04ee5ca --- /dev/null +++ b/Emacs-Logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/config.el b/config.el index d403a2c..16969c8 100644 --- a/config.el +++ b/config.el @@ -75,7 +75,7 @@ ;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how ;; they are implemented. -(setq doom-theme 'catppuccin) +;; (setq doom-theme 'catppuccin) ;;(setq org-startup-with-inline-images t) ;; for inline images in org mode (setq org-display-inline-images t) @@ -344,3 +344,105 @@ Uses `current-date-time-format' for the formatting the date/time." ;; (nth (random (length alternatives)) alternatives)))) (setq vterm-shell "/usr/bin/env zsh") + +;; for installing c and cpp tree sitter languages +;; probably only need this once and run +;; M-x treesit-install-language-grammar RET c RET +;; M-x treesit-install-language-grammar RET cpp RET +;; can comment out after +;; (after! treesit +;; (setq treesit-language-source-alist +;; '((c "https://github.com/tree-sitter/tree-sitter-c") +;; (cpp "https://github.com/tree-sitter/tree-sitter-cpp")))) + + +;; for org blocks: +(setq company-org-block-edit-style 'auto) ;; 'auto, 'prompt, or 'inline + +(add-hook 'org-mode-hook + (lambda () + (add-to-list (make-local-variable 'company-backends) + 'company-org-block))) + + + +;; for better csv handling +;; disable line wrap +(defun disable-linewrap () + "csv line wrap setup" + (visual-line-mode -1) + (toggle-truncate-lines 1)) + +(add-hook 'csv-mode-hook #'disable-linewrap) + +;; auto detect separator +(add-hook 'csv-mode-hook #'csv-guess-set-separator) +;; turn on field alignment +(add-hook 'csv-mode-hook #'csv-align-mode) +;; add csv header line +(add-hook 'csv-mode-hook #'csv-header-line) + +(defun toggle-csv-mode-hooks () + "Toggle my CSV mode hooks (add/remove)." + (interactive) + (if (memq #'disable-linewrap csv-mode-hook) + (progn + (remove-hook 'csv-mode-hook #'disable-linewrap) + (visual-line-mode t) + (toggle-truncate-lines) + (remove-hook 'csv-mode-hook #'csv-guess-set-separator) + (csv-guess-set-separator) + (remove-hook 'csv-mode-hook #'csv-align-mode) + (csv-align-mode) + (remove-hook 'csv-mode-hook #'csv-header-line) + (csv-header-line) + (normal-mode) + (message "CSV hooks removed")) + (progn + (add-hook 'csv-mode-hook #'disable-linewrap) + (add-hook 'csv-mode-hook #'csv-guess-set-separator) + (add-hook 'csv-mode-hook #'csv-align-mode) + (add-hook 'csv-mode-hook #'csv-header-line) + (normal-mode) + (message "CSV hooks added")))) + +;; (map! :map csv-mode-map "SPC t ;" #'toggle-csv-mode-hooks) +(map! :after csv-mode + :map csv-mode-map + :desc "Toggle CSV hooks" + :n "SPC t ;" #'toggle-csv-mode-hooks) +;; :leader +;; "t;" #'toggle-csv-mode-hooks) + + +;; make invisible characters more visible +(setq! glyphless-char-display-control '((format-control . empty-box) (variation-selectors . thin-space) (no-font . hex-code))) + + + +;; A starting point for a conservative, MISRA-friendly layout. +;; CC Mode style approximating the example (Allman + 4 spaces + aligned args). +(c-add-style + "misra-allman" + '("bsd" + (c-basic-offset . 4) + (indent-tabs-mode . nil) + + ;; Make { for functions and control statements go on the next line when typing. + ;; Note: this affects "on-the-fly" formatting; reindent won't move braces by itself. + (c-hanging-braces-alist . ((defun-open before) + (substatement-open before))) + + ;; Keep the brace itself not additionally indented relative to the if/for/while. + ;; After-the-fact cleanup: turn "} else {" into "}\nelse\n{". + (c-cleanup-list . (brace-else-brace)) ; key part for else placement + + (c-offsets-alist . ((statement-block-intro . +) + (substatement-open . 0) + (case-label . +) + (statement-case-intro . +) + (arglist-cont-nonempty . c-lineup-arglist) + ;; Align wrapped function call/decl arguments under the first arg. + (arglist-intro . +) + (arglist-cont-nonempty . c-lineup-arglist) + (arglist-close . 0))))) diff --git a/custom.el b/custom.el new file mode 100644 index 0000000..8cf235e --- /dev/null +++ b/custom.el @@ -0,0 +1,27 @@ +;;; -*- lexical-binding: t -*- +(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. + '(custom-safe-themes + '("0c83e0b50946e39e237769ad368a08f2cd1c854ccbcd1a01d39fdce4d6f86478" + "5c8a1b64431e03387348270f50470f64e28dfae0084d33108c33a81c1e126ad6" + "0325a6b5eea7e5febae709dab35ec8648908af12cf2d2b569bedc8da0a3a81c1" + "d97ac0baa0b67be4f7523795621ea5096939a47e8b46378f79e78846e0e4ad3d" + "014cb63097fc7dbda3edf53eb09802237961cbb4c9e9abd705f23b86511b0a69" + "b5fd9c7429d52190235f2383e47d340d7ff769f141cd8f9e7a4629a81abc6b19" + "7ec8fd456c0c117c99e3a3b16aaf09ed3fb91879f6601b1ea0eeaee9c6def5d9" + "fffef514346b2a43900e1c7ea2bc7d84cbdd4aa66c1b51946aade4b8d343b55a" + "7771c8496c10162220af0ca7b7e61459cb42d18c35ce272a63461c0fc1336015" + "f64189544da6f16bab285747d04a92bd57c7e7813d8c24c30f382f087d460a33" + "0d2c5679b6d087686dcfd4d7e57ed8e8aedcccc7f1a478cd69704c02e4ee36fe" + "77fff78cc13a2ff41ad0a8ba2f09e8efd3c7e16be20725606c095f9a19c24d3d" + "4594d6b9753691142f02e67b8eb0fda7d12f6cc9f1299a49b819312d6addad1d" + "3061706fa92759264751c64950df09b285e3a2d3a9db771e99bcbb2f9b470037" default))) +(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. + ) diff --git a/doomEmacs.svg b/doomEmacs.svg new file mode 100644 index 0000000..3c1aa1e --- /dev/null +++ b/doomEmacs.svg @@ -0,0 +1,274 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/e.png b/e.png new file mode 100644 index 0000000..524268a Binary files /dev/null and b/e.png differ diff --git a/emacs.svg b/emacs.svg new file mode 100644 index 0000000..fb4402b --- /dev/null +++ b/emacs.svg @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/init.el b/init.el index 65e7c19..33bf1fe 100644 --- a/init.el +++ b/init.el @@ -94,7 +94,7 @@ ;;collab ; buffers with friends debugger ; FIXME stepping through code, to help you add bugs ;;direnv - ;;docker + docker ;;editorconfig ; let someone else argue about tabs vs spaces ;;ein ; tame Jupyter notebooks with emacs (eval +overlay) ; run code, run (also, repls) @@ -102,7 +102,7 @@ llm ; when I said you needed friends, I didn't mean... lsp ; M-x vscode magit ; a git porcelain for Emacs - ;;make ; run make tasks from Emacs + make ; run make tasks from Emacs ;;pass ; password manager for nerds pdf ; pdf enhancements ;;terraform ; infrastructure as code @@ -181,7 +181,7 @@ ;;zig ; C, but simpler :email - ;;(mu4e +org +gmail) + (mu4e +org +gmail) ;;notmuch ;;(wanderlust +gmail) diff --git a/packages.el b/packages.el index 128ae8f..6251b9b 100644 --- a/packages.el +++ b/packages.el @@ -53,3 +53,6 @@ (package! org-fragtog) (package! ox-reveal) (package! pdf-tools) +(package! cdlatex) +(package! doxymin) +(package! citeproc)