From 47207d57ad47908567c228ebf4568f7ec0ccc662 Mon Sep 17 00:00:00 2001 From: bard Date: Sun, 22 Oct 2023 21:38:25 -0400 Subject: cpp mode and helm --- bard-emacs-modules/bard-emacs-package.el | 47 ++++++++++++++++++++++++++++++-- bard-emacs-modules/bard-emacs-ui.el | 6 ---- bard-emacs-modules/bard-emms.el | 14 ---------- bard-emacs-modules/bard-lang.el | 9 ------ bookmarks | 8 +++--- init.el | 16 +++++++++-- 6 files changed, 63 insertions(+), 37 deletions(-) delete mode 100644 bard-emacs-modules/bard-emms.el delete mode 100644 bard-emacs-modules/bard-lang.el diff --git a/bard-emacs-modules/bard-emacs-package.el b/bard-emacs-modules/bard-emacs-package.el index 8075eaf..f654e63 100644 --- a/bard-emacs-modules/bard-emacs-package.el +++ b/bard-emacs-modules/bard-emacs-package.el @@ -75,6 +75,31 @@ :init (global-company-mode 1)) +(use-package helm + :ensure t + :init + (helm-mode 1) + :bind (("M-x" . helm-M-x) + ("C-x C-f" . helm-find-files) + ("C-x b" . helm-mini) + ("M-s" . helm-occur)) + :config + (define-key helm-map (kbd "C-") 'backward-kill-word) + (define-key helm-map (kbd "") 'helm-execute-persistent-action) ; rebind tab to do persistent action + (define-key helm-map (kbd "C-i") 'helm-execute-persistent-action) ; make TAB works in terminal + (define-key helm-map (kbd "C-z") 'helm-select-action)) + +(use-package helm-rg + :ensure t + :config + (setq helm-rg-default-extra-args '("--hidden" "--smart-case")) + (setq helm-rg-prompt "Search for: ") + (setq helm-rg-result-file-action + (lambda (path) + (find-file path))) + (setq helm-rg-use-fuzzy-match t) + :bind (("C-c s" . 'helm-rg))) + (use-package orderless :ensure t) @@ -169,8 +194,8 @@ '(("TODO" error bold) ("FIXME" error bold) ("WAIT" warning bold) - ("HACK" font-lock-constant-face bold) - ("DEPRECATED" font-lock-doc-face bold) + ("HACK" completions-common-part bold) + ("DEPRECATED" completions-annotations bold) ("DONE" font-lock-doc-face bold) ("BUG" error bold)))) @@ -195,3 +220,21 @@ (use-package haskell-mode :ensure t) + +(use-package flycheck + :ensure t + :init + (global-flycheck-mode t)) + +(use-package smartparens + :ensure t + :config + (smartparens-global-mode t) + (show-smartparens-global-mode t) + :bind + (("C-" . sp-down-sexp)) + ("C-" . sp-up-sexp) + ("M-" . sp-backward-up-sexp) + ("M-" . sp-backward-up-sexp) + ("C-M-a" . sp-beginning-of-sexp) + ("C-M-e" . sp-end-of-sexp)) diff --git a/bard-emacs-modules/bard-emacs-ui.el b/bard-emacs-modules/bard-emacs-ui.el index c76786a..aaf728a 100644 --- a/bard-emacs-modules/bard-emacs-ui.el +++ b/bard-emacs-modules/bard-emacs-ui.el @@ -43,12 +43,6 @@ (add-to-list 'default-frame-alist '(font . "Iosevka Comfy-14.5")) -;; Common UI hook -(defun bard/text-hook () - (bard/olivetti-toggle) - (display-line-numbers-mode 0) - (hl-todo-mode 1)) - ;; olivetti (use-package olivetti :config diff --git a/bard-emacs-modules/bard-emms.el b/bard-emacs-modules/bard-emms.el deleted file mode 100644 index a562337..0000000 --- a/bard-emacs-modules/bard-emms.el +++ /dev/null @@ -1,14 +0,0 @@ -;; |------------------------------------| -;; | EMMS | -;; |------------------------------------| - -(require 'emms-setup) - -(emms-all) -(setq emms-player-list '(emms-player-mpv) - emms-info-functions '(emms-info-native) - emms-playlist-buffer-name "*Music*") - -;; Keymaps -(define-key global-map (kbd "") #'emms) -(define-key global-map (kbd "M-") #'emms-browser) diff --git a/bard-emacs-modules/bard-lang.el b/bard-emacs-modules/bard-lang.el deleted file mode 100644 index 2400ea5..0000000 --- a/bard-emacs-modules/bard-lang.el +++ /dev/null @@ -1,9 +0,0 @@ -(defun bard/common-modes-hook () - "Commonly used modes, bundled in one hook" - (display-line-numbers-mode 1) - (electric-pair-mode 1) - (hl-todo-mode 1)) - -(add-hook 'emacs-lisp-mode-hook 'bard/common-modes-hook) -(add-hook 'haskell-mode-hook 'bard/common-modes-hook) -(add-hook 'clojure-mode-hook 'bard/common-modes-hook) diff --git a/bookmarks b/bookmarks index e9fac9c..0602744 100644 --- a/bookmarks +++ b/bookmarks @@ -8,10 +8,10 @@ (rear-context-string) (position . 1)) ("org-capture-last-stored" - (filename . "~/Notes/Org-Roam/media.org") - (front-context-string . "*** Source: [[ht") - (rear-context-string . ":44] \n** Quotes\n") - (position . 2004)) + (filename . "~/Notes/Org-Roam/todo.org") + (front-context-string . "*** TODO write s") + (rear-context-string . "esharing server\n") + (position . 980)) ("School" (filename . "~/Documents/School/") (front-context-string . "APUSH.pdf\n -rw-") diff --git a/init.el b/init.el index d2fae05..8900b72 100644 --- a/init.el +++ b/init.el @@ -26,6 +26,7 @@ ;;; Code: ;; Add the directories to the load path +(add-to-list 'load-path "~/.emacs.d/elisp/") (add-to-list 'load-path (expand-file-name "bard-elisp" user-emacs-directory)) (add-to-list 'load-path (expand-file-name "bard-emacs-modules" user-emacs-directory)) @@ -63,8 +64,6 @@ ;; | General Keybinds | ;; |------------------------------------| ;; Buffer switching -(global-set-key (kbd "C-.") 'next-buffer) -(global-set-key (kbd "C-,") 'previous-buffer) (global-set-key (kbd "C-x C-b") 'ibuffer) ;; Desktop/session save @@ -74,3 +73,16 @@ (provide 'init) ;;; init.el ends here +(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. + '(package-selected-packages + '(helm-rg helm smartparens smart-parens flycheck vterm zenburn-theme yasnippet-snippets which-key vertico use-package toc-org tao-theme sly rainbow-mode projectile pdf-tools org-roam-ui org-cliplink orderless olivetti multiple-cursors modus-themes mixed-pitch marginalia magit hl-todo haskell-mode expand-region elfeed-org elfeed-goodies ef-themes dashboard counsel company clojure-snippets cider))) +(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. + '(org-agenda-structure ((t (:inherit bold :foreground "#70a89f" :height 1.5 :family "Iosevka Comfy Motion Duo"))))) -- cgit v1.2.3