diff --git a/README.org b/README.org index c0e75f6d..68b40890 100644 --- a/README.org +++ b/README.org @@ -389,7 +389,7 @@ Let's use =no-littering= in order to stop emacs from filling all our folders wit ** Ligatures Here let's try to add ligatures to our font system since the VictorMono Nerd Font supports all ligatures being a "Nerd Font". -#+begin_src emacs-lisp :tangle no +#+begin_src emacs-lisp :tangle yes (let ((alist '((?! . "\\(?:!\\(?:==\\|[!=]\\)\\)") (?# . "\\(?:#\\(?:###?\\|_(\\|[!#(:=?[_{]\\)\\)") (?$ . "\\(?:\\$>\\)") @@ -1542,39 +1542,6 @@ Made for `org-tab-first-hook' in evil-mode." (call-interactively #'tab-to-tab-stop) t))) -;;;###autoload -(defun +org-yas-expand-maybe-h () - "Expand a yasnippet snippet, if trigger exists at point or region is active. -Made for `org-tab-first-hook'." - (when (and (modulep! :editor snippets) - (require 'yasnippet nil t) - (bound-and-true-p yas-minor-mode)) - (and (let ((major-mode (cond ((org-in-src-block-p t) - (org-src-get-lang-mode (org-eldoc-get-src-lang))) - ((org-inside-LaTeX-fragment-p) - 'latex-mode) - (major-mode))) - (org-src-tab-acts-natively nil) ; causes breakages - ;; Smart indentation doesn't work with yasnippet, and painfully slow - ;; in the few cases where it does. - (yas-indent-line 'fixed)) - (cond ((and (or (not (bound-and-true-p evil-local-mode)) - (evil-insert-state-p) - (evil-emacs-state-p)) - (or (and (bound-and-true-p yas--tables) - (gethash major-mode yas--tables)) - (progn (yas-reload-all) t)) - (yas--templates-for-key-at-point)) - (yas-expand) - t) - ((use-region-p) - (yas-insert-snippet) - t))) - ;; HACK Yasnippet breaks org-superstar-mode because yasnippets is - ;; overzealous about cleaning up overlays. - (when (bound-and-true-p org-superstar-mode) - (org-superstar-restart))))) - ;;;###autoload (defun +org-cycle-only-current-subtree-h (&optional arg) "Toggle the local fold at the point, and no deeper. @@ -1648,7 +1615,7 @@ So, how do we use this? Well, let's try like this. *** Ox-Spectacle Spectacle.js is another beautiful slideshow builder that org can export to using ox-spectacle. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle no (use-package ox-spectacle :config @@ -2319,7 +2286,7 @@ Devdocs.io is a pretty great place to see documentation on nearly any developer ** YASnippet YASnippet is a templating system. It's powerful. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle no (use-package yasnippet :config (setq yas-snippet-dirs (list (expand-file-name "yasnippets/" user-emacs-directory))) @@ -2567,7 +2534,7 @@ Finally, here are some auto modes I'd like to setup *** Tree Sitter I'm gonna try this to speed up emacs and make it nicer -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle no (use-package tree-sitter :config (global-tree-sitter-mode +1) @@ -2575,6 +2542,9 @@ I'm gonna try this to speed up emacs and make it nicer (use-package tree-sitter-langs) #+end_src +#+begin_src emacs-lisp + +#+end_src *** C++ In c++ I just want to make sure lsp is called when enter c++-mode #+BEGIN_SRC emacs-lisp @@ -3853,7 +3823,7 @@ I use transmission on a server to manage my torrents ** HASS Hass is a package to control Home Assistant. I use HA so... I like HASS. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle no (use-package hass :init (setq hass-host "home.cochrun.xyz" @@ -3951,7 +3921,7 @@ I like to track my time with ActivityWatch so I can notice and kill bad habits. ** LanguageTool I am going to try and use LanguageTool to fix grammatical issues. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle no (use-package langtool) #+end_src diff --git a/init.el b/init.el index 36e22c4f..d3af5882 100644 --- a/init.el +++ b/init.el @@ -1213,39 +1213,6 @@ Made for `org-tab-first-hook' in evil-mode." (call-interactively #'tab-to-tab-stop) t))) -;;;###autoload -(defun +org-yas-expand-maybe-h () - "Expand a yasnippet snippet, if trigger exists at point or region is active. -Made for `org-tab-first-hook'." - (when (and (modulep! :editor snippets) - (require 'yasnippet nil t) - (bound-and-true-p yas-minor-mode)) - (and (let ((major-mode (cond ((org-in-src-block-p t) - (org-src-get-lang-mode (org-eldoc-get-src-lang))) - ((org-inside-LaTeX-fragment-p) - 'latex-mode) - (major-mode))) - (org-src-tab-acts-natively nil) ; causes breakages - ;; Smart indentation doesn't work with yasnippet, and painfully slow - ;; in the few cases where it does. - (yas-indent-line 'fixed)) - (cond ((and (or (not (bound-and-true-p evil-local-mode)) - (evil-insert-state-p) - (evil-emacs-state-p)) - (or (and (bound-and-true-p yas--tables) - (gethash major-mode yas--tables)) - (progn (yas-reload-all) t)) - (yas--templates-for-key-at-point)) - (yas-expand) - t) - ((use-region-p) - (yas-insert-snippet) - t))) - ;; HACK Yasnippet breaks org-superstar-mode because yasnippets is - ;; overzealous about cleaning up overlays. - (when (bound-and-true-p org-superstar-mode) - (org-superstar-restart))))) - ;;;###autoload (defun +org-cycle-only-current-subtree-h (&optional arg) "Toggle the local fold at the point, and no deeper. @@ -1307,11 +1274,6 @@ All my (performant) foldings needs are met between this and `org-show-subtree' org-re-reveal-mobile-app t) ) -(use-package ox-spectacle - :config - - ) - (use-package unicode-fonts :ensure t :config @@ -1724,11 +1686,6 @@ targets." (chris/leader-keys 'normal "hd" 'devdocs-lookup)) -(use-package yasnippet - :config - (setq yas-snippet-dirs (list (expand-file-name "yasnippets/" user-emacs-directory))) - (yas-global-mode 1)) - (use-package tempel :bind (("M-+" . tempel-complete) ;; Alternative tempel-expand ("M-'" . tempel-insert) @@ -1918,11 +1875,7 @@ targets." (add-to-list 'auto-mode-alist '("\\.yuck?\\'" . lisp-data-mode)) -(use-package tree-sitter - :config - (global-tree-sitter-mode +1) - ) -(use-package tree-sitter-langs) + (defun astyle-this-buffer () "Use astyle command to auto format c/c++ code." @@ -2899,16 +2852,6 @@ interfere with the default `bongo-playlist-buffer'." :keymaps 'override "ot" 'transmission)) -(use-package hass - :init - (setq hass-host "home.cochrun.xyz" - hass-port "443" - hass-apikey "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiI2NDE1YTU5NzAzZDA0NDY0YTM0MmYzNTI1MjU0NjMwNyIsImlhdCI6MTY1Mjc1NjcwOSwiZXhwIjoxOTY4MTE2NzA5fQ.gGuxtwE2Xc1nGSgqpHiT2us-q04GWjtqnpgSHxvXgNI") - (hass-setup) - :general - (chris/leader-keys - "oh" 'hass-dash-open)) - (use-package auth-source-pass :defer 1 :config (auth-source-pass-enable)) @@ -2964,8 +2907,6 @@ interfere with the default `bongo-playlist-buffer'." "v" 'chris/elfeed-bongo-insert-item "N" 'mastodon-notifications--timeline)) -(use-package langtool) - (use-package qrencode) ;; Reduce rendering/line scan work for Emacs by not rendering cursors or regions