and cleanup - Require init-tex module in main init.el Change marginalia - initialization from hook to immediate mode activation Enable - yasnippet globally in init-edit Remove unused init-snippet.el - module Simplify init-tex.el by removing redundant - cdlatex-yasnippet integration Add lexical binding and proper - package demand configuration for AuCTeX Clean up commented code in - init-org.el ```
39 lines
952 B
EmacsLisp
39 lines
952 B
EmacsLisp
;; -*- lexical-binding: t -*-
|
|
|
|
(use-package smartparens
|
|
:demand t
|
|
:hook (prog-mode text-mode markdown-mode)
|
|
:config
|
|
(require 'smartparens-config))
|
|
|
|
(use-package winum
|
|
:init
|
|
(winum-mode)
|
|
:config
|
|
(winum-set-keymap-prefix (kbd "C-c w")))
|
|
|
|
;; Yasnippet settings
|
|
(use-package yasnippet
|
|
:ensure t
|
|
:hook ((LaTeX-mode . yas-minor-mode)
|
|
(post-self-insert . my/yas-try-expanding-auto-snippets))
|
|
:config
|
|
(yas-global-mode)
|
|
(use-package warnings
|
|
:config
|
|
(cl-pushnew '(yasnippet backquote-change)
|
|
warning-suppress-types
|
|
:test 'equal))
|
|
|
|
(setq yas-triggers-in-field t)
|
|
|
|
;; Function that tries to autoexpand YaSnippets
|
|
;; The double quoting is NOT a typo!
|
|
(defun my/yas-try-expanding-auto-snippets ()
|
|
(when (and (boundp 'yas-minor-mode) yas-minor-mode)
|
|
(let ((yas-buffer-local-condition ''(require-snippet-condition . auto)))
|
|
(yas-expand)))))
|
|
|
|
|
|
(provide 'init-edit)
|