diff options
author | Alan Pearce | 2018-04-07 21:19:27 +0200 |
---|---|---|
committer | Alan Pearce | 2018-04-07 21:19:27 +0200 |
commit | 3a96636c6113a4c65b3f975167327b4dfe82c113 (patch) | |
tree | 4915c267969e87a648819265b02a9074013da186 /emacs | |
parent | af93a17bfa2c580c3585f4fa1195fe15e74f3dbe (diff) | |
download | dotfiles-3a96636c6113a4c65b3f975167327b4dfe82c113.tar.lz dotfiles-3a96636c6113a4c65b3f975167327b4dfe82c113.tar.zst dotfiles-3a96636c6113a4c65b3f975167327b4dfe82c113.zip |
Emacs: rip out smartparens
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/.emacs.d/main.el | 49 |
1 files changed, 3 insertions, 46 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el index f46ec80..fae2b95 100644 --- a/emacs/.emacs.d/main.el +++ b/emacs/.emacs.d/main.el @@ -1597,13 +1597,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (add-hook 'docker-compose-mode-hook #'company-mode-on))) (use-package nix-mode - :mode (("\\.nix\\'" . nix-mode)) - :config (progn - (define-hook-helper nix-mode () - (when (fboundp 'smartparens-mode) - (smartparens-strict-mode -1) - (smartparens-mode -1)) - (electric-pair-mode +1)))) + :mode (("\\.nix\\'" . nix-mode))) (define-derived-mode xmonad-mode haskell-mode "XM") (add-to-list 'auto-mode-alist '("xmobarrc\\'" . xmonad-mode)) @@ -1814,11 +1808,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (define-hook-helper org-journal-mode () (use-variable-fonts) - (text-scale-adjust 4) - (if (fboundp 'smartparens-strict-mode) - (smartparens-strict-mode -1)) - (if (fboundp 'show-smartparens-mode) - (show-smartparens-mode -1))) + (text-scale-adjust 4)) (defun org-journal-display-entry-yesterday () "Show org-journal entry for yesterday" (interactive) @@ -2223,7 +2213,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (use-package lsp-javascript-typescript :if (executable-find "javascript-typescript-langserver") :config (progn - (add-hook 'js2-mode-hook #'lsp-javascript-typescript-enable) + (remove-hook 'js2-mode-hook #'lsp-javascript-typescript-enable) (add-hook 'typescript-mode-hook #'lsp-javascript-typescript-enable))) ;;;;;; tern @@ -2644,39 +2634,6 @@ Pass ARG to `comint-delchar-or-maybe-eof'." (put #'paredit-backward-delete 'delete-selection 'supersede) (add-hook 'eval-expression-minibuffer-setup-hook #'enable-paredit-mode))) -;;;;; smartparens - -;; I like to use smartparens where paredit isn’t already useful. Somehow -;; I didn’t find smartparens’ implementation of paredit style to be as -;; nice as the real version - -(eval-when-compile (require 'smartparens nil :noerror)) -(use-package smartparens-config - :ensure smartparens - :config (progn - (sp-use-smartparens-bindings) - (setq sp-highlight-pair-overlay nil) - (fset 'wrap-with-paren "\C-](") ;; `sp-select-next-thing-exchange' - (bind-key "C-(" #'wrap-with-paren smartparens-mode-map) - (bind-key "C-)" #'sp-forward-slurp-sexp smartparens-mode-map) - (bind-key "M-<backspace>" #'backward-kill-word smartparens-mode-map) - (bind-key "M-?" #'sp-convolute-sexp smartparens-mode-map) - (bind-key "C-M-t" #'sp-transpose-sexp smartparens-mode-map) - (bind-key "M-R" #'sp-raise-sexp smartparens-mode-map) - (bind-key "M-S" #'sp-splice-sexp smartparens-mode-map) - (bind-key "C-M-s" #'sp-split-sexp smartparens-mode-map) - (bind-key "M-J" #'sp-join-sexp smartparens-mode-map) - (bind-key "M-<up>" #'sp-splice-sexp-killing-backward smartparens-mode-map) - (bind-key "M-<down>" #'sp-splice-sexp-killing-forward smartparens-mode-map) - (bind-key "C-M-S-k" #'sp-kill-hybrid-sexp smartparens-mode-map) - (bind-key "C-S-<right>" #'sp-slurp-hybrid-sexp smartparens-mode-map) - (show-smartparens-global-mode t) - (smartparens-global-strict-mode t) - (define-hook-helper lisp-mode-common () - (smartparens-strict-mode -1) - (smartparens-mode -1)))) - - ;;;;; move-text ;; Transposing lines, made easier. |