aboutsummaryrefslogtreecommitdiff
path: root/Emacs/.config/emacs
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2020-09-21 22:12:33 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2020-09-21 22:12:33 +0100
commit706426dbb0cde612229eab523516b0304d3e9c3b (patch)
tree25d8962efddc51e187427ee18176db19b2483129 /Emacs/.config/emacs
parent3aa078733b15ae970fa4620f24e5d00fe029a927 (diff)
downloaddotfiles-706426dbb0cde612229eab523516b0304d3e9c3b.tar.gz
dotfiles-706426dbb0cde612229eab523516b0304d3e9c3b.tar.bz2
dotfiles-706426dbb0cde612229eab523516b0304d3e9c3b.zip
(Emacs)~Move smartparens and hook to text packages
Diffstat (limited to 'Emacs/.config/emacs')
-rw-r--r--Emacs/.config/emacs/config.org57
1 files changed, 28 insertions, 29 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org
index fe6b077..5ef614c 100644
--- a/Emacs/.config/emacs/config.org
+++ b/Emacs/.config/emacs/config.org
@@ -1316,7 +1316,34 @@ Now, the binding
:states '(normal insert)
(kbd "M-d") #'+text/delete-till-sentence)
#+end_src
-** Programming packages
+*** Smartparens
+Smartparens is a smarter electric-parens, it's much more aware of
+stuff and easier to use.
+#+begin_src emacs-lisp
+(use-package smartparens
+ :hook
+ (prog-mode-hook . smartparens-mode)
+ (text-mode-hook . smartparens-mode)
+ :after evil
+ :config
+ (setq sp-highlight-pair-overlay nil
+ sp-highlight-wrap-overlay t
+ sp-highlight-wrap-tag-overlay t)
+
+ (let ((unless-list '(sp-point-before-word-p
+ sp-point-after-word-p
+ sp-point-before-same-p)))
+ (sp-pair "'" nil :unless unless-list)
+ (sp-pair "\"" nil :unless unless-list))
+ (sp-local-pair sp-lisp-modes "(" ")" :unless '(:rem sp-point-before-same-p))
+ (require 'smartparens-config))
+#+end_src
+*** Show-paren-mode
+Show parenthesis for Emacs
+#+begin_src emacs-lisp
+(add-hook 'prog-mode-hook #'show-paren-mode)
+#+end_src
+** General Programming Configuration
*** Eldoc
Eldoc presents documentation to the user upon placing ones cursor upon
any symbol. This is very useful when programming as it:
@@ -1560,34 +1587,6 @@ better than the default asterisks.
(use-package org-superstar
:hook (org-mode-hook . org-superstar-mode))
#+end_src
-** Core text manipulation
-*** Smartparens
-Smartparens is a smarter electric-parens, it's much more aware of
-stuff and easier to use.
-#+begin_src emacs-lisp
-(use-package smartparens
- :hook
- (prog-mode-hook . smartparens-mode)
- (text-mode-hook . smartparens-mode)
- :after evil
- :config
- (setq sp-highlight-pair-overlay nil
- sp-highlight-wrap-overlay t
- sp-highlight-wrap-tag-overlay t)
-
- (let ((unless-list '(sp-point-before-word-p
- sp-point-after-word-p
- sp-point-before-same-p)))
- (sp-pair "'" nil :unless unless-list)
- (sp-pair "\"" nil :unless unless-list))
- (sp-local-pair sp-lisp-modes "(" ")" :unless '(:rem sp-point-before-same-p))
- (require 'smartparens-config))
-#+end_src
-*** Show-paren-mode
-Show parenthesis for Emacs
-#+begin_src emacs-lisp
-(add-hook 'prog-mode-hook #'show-paren-mode)
-#+end_src
** C/C++
Setup for C and C++ modes via the cc-mode package.
*** Preamble