ffixing a lot of broken code

This commit is contained in:
Chris Cochrun 2023-03-23 15:08:20 -05:00
parent acd99a5c59
commit ca404b36b5
2 changed files with 10 additions and 99 deletions

61
init.el
View file

@ -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