summaryrefslogtreecommitdiff
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
parent18cccf8ce0b0ac454b74f6ce81219a42117aa447 (diff)
Remove smartparens mode
-rw-r--r--examples/test.js2
-rw-r--r--lisp/general.el7
-rw-r--r--lisp/web.el33
3 files changed, 6 insertions, 36 deletions
diff --git a/examples/test.js b/examples/test.js
index 15c71d7..fc33c2a 100644
--- a/examples/test.js
+++ b/examples/test.js
@@ -16,7 +16,7 @@ class MyBigClass {
constructor(pValue) {
this.mValue = pValue;
}
-
+
getValue() {
return this.mValue;
}
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