You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

1.2 KiB

Dev - Format

Package

Define format dev package.

  (use-package emacs
    :after uno-dev
    :config
    (provide 'uno-dev-format))

Default Formatting

  (use-package emacs
    :after uno-dev-format
    :custom
    (indent-tabs-mode nil)
    (tab-width 2))

Smartparens

Helpers are borrowed from Spacemacs.

  (use-package smartparens
    :after uno-dev-format
    :custom
    (sp-show-pair-delay 0.2)
    (sp-show-pair-from-inside t)
    (sp-cancel-autoskip-on-backward-movement nil)
    (sp-highlight-pair-overlay nil)
    (sp-highlight-wrap-overlay nil)
    (sp-highlight-wrap-tag-overlay nil)
    :hook
    ((comint-mode uno-prog-mode) . smartparens-strict-mode)
    (minibuffer-setup . uno/dev/format/minibuffer-smartparens)
    :init
    (defun uno/dev/format/minibuffer-smartparens ()
      "Enable `smartparens-mode' in the minibuffer, during `eval-expression'."
      (when (or (eq this-command 'eval-expression)
                (eq this-command 'eldoc-eval-expression))
        (smartparens-strict-mode 1)))
    :config
    (show-smartparens-global-mode 1)
    (sp-local-pair 'minibuffer-inactive-mode "'" nil :actions nil))