summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormattkae <mattkae@protonmail.com>2022-12-21 21:43:08 -0500
committermattkae <mattkae@protonmail.com>2022-12-21 21:43:08 -0500
commit3593ec5d351aef3443817fd2837edcb87d62b9fd (patch)
tree05c110b119b3989864bcd0c1f1e9601ebb04af83 /lisp
parent18cccf8ce0b0ac454b74f6ce81219a42117aa447 (diff)
Remove smartparens mode
Diffstat (limited to 'lisp')
-rw-r--r--lisp/general.el7
-rw-r--r--lisp/web.el33
2 files changed, 5 insertions, 35 deletions
diff --git a/lisp/general.el b/lisp/general.el
index 9516133..1b4f220 100644
--- a/lisp/general.el
+++ b/lisp/general.el
@@ -48,13 +48,6 @@
;; Line numbers
(global-linum-mode 1)
-;; Smart parentheses
-(smartparens-global-mode 1)
-(with-eval-after-load 'smartparens
- (sp-with-modes
- '(c++-mode c-mode javascript-mode typescript-mode python-mode)
- (sp-local-pair "{" nil :post-handlers '(:add ("||\n[i]" "RET")))))
-
;; Show number of matches
(setq isearch-lazy-highlight t)
(setq isearch-lazy-count t)
diff --git a/lisp/web.el b/lisp/web.el
index d05fa34..e7af0d4 100644
--- a/lisp/web.el
+++ b/lisp/web.el
@@ -1,7 +1,7 @@
;;; Code:
-;; web mode
+;; Web general
(defun my-web-mode-colors ()
"Set colors for web mode."
(set-face-background 'web-mode-current-element-highlight-face "#FFFDD0")
@@ -21,37 +21,14 @@
)
(add-to-list 'auto-mode-alist '("\\.js\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.php\\'" . web-mode))
+(setq-default js-indent-level 2)
;; JavaScript
(add-to-list 'auto-mode-alist '("\\.js\\'" . javascript-mode))
(push '("\\.js[x]?\\'" . javascript-mode) auto-mode-alist)
-(defun setup-js2-mode()
- "Hooks for Javscript 2 Mode."
- (setq js-indent-level 2)
- (company-mode t)
- (smartparens-mode 1)
-)
-(add-hook 'js-mode-hook 'setup-js2-mode)
-;(setq js2-highlight-level 3)
-;(setq js2-idle-timer-delay 0)
-
;; TypeScript
-(defun setup-typescript()
- "Set up tiny things for TypeScript."
- (setq typescript-indent-level 2)
- (company-mode t)
- (company-quickhelp-mode t)
- (smartparens-mode 1)
-)
-(add-hook 'typescript-mode-hook #'setup-typescript)
-
-(require 'web-mode)
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . web-mode))
-(add-hook 'web-mode-hook
- (lambda ()
- (when (string-equal "tsx" (file-name-extension buffer-file-name))
- (setup-typescript))))
;; Eslint through Flycheck.
(require 'flycheck)
@@ -92,9 +69,9 @@
;; CSS eldoc
(use-package css-eldoc
- :commands turn-on-css-eldoc
- :config
- (add-hook 'css-mode-hook 'turn-on-css-eldoc))
+ :commands turn-on-css-eldoc)
+
+(add-hook 'css-mode-hook 'turn-on-css-eldoc)
(provide 'web)
;;; web.el ends here