aboutsummaryrefslogtreecommitdiff
path: root/Emacs/.config
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2024-08-15 15:45:38 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2024-08-15 15:46:05 +0100
commitc4acd38936aeaa2fb352c14e94f97d7249c6ec6b (patch)
treecb5f7b11aa892c832740765cbbdd067af9bdbbc4 /Emacs/.config
parentd0cd7fb3163465aad1b44fdef6b1b1513f439b65 (diff)
downloaddotfiles-c4acd38936aeaa2fb352c14e94f97d7249c6ec6b.tar.gz
dotfiles-c4acd38936aeaa2fb352c14e94f97d7249c6ec6b.tar.bz2
dotfiles-c4acd38936aeaa2fb352c14e94f97d7249c6ec6b.zip
(Emacs/config)+js-mode configuration
Having to use JS in my Emacs means disabling a few things.
Diffstat (limited to 'Emacs/.config')
-rw-r--r--Emacs/.config/emacs/config.org19
1 files changed, 15 insertions, 4 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org
index 70e1606..db56299 100644
--- a/Emacs/.config/emacs/config.org
+++ b/Emacs/.config/emacs/config.org
@@ -2222,7 +2222,8 @@ limit), so set it for specific modes need the help.
"w" #'whitespace-mode)
:hook
(before-save-hook . whitespace-cleanup)
- ((c-mode-hook c++-mode-hook haskell-mode-hook python-mode-hook org-mode-hook text-mode-hook)
+ ((c-mode-hook c++-mode-hook haskell-mode-hook python-mode-hook
+ org-mode-hook text-mode-hook js-mode-hook)
. whitespace-mode)
:init
(setq whitespace-line-column nil
@@ -2243,7 +2244,7 @@ use 70 fill columns while code should stick to 80.
:hook
(text-mode-hook . auto-fill-mode)
((c-mode-hook c++-mode-hook haskell-mode-hook python-mode-hook
- org-mode-hook text-mode-hook)
+ org-mode-hook text-mode-hook js-mode-hook)
. display-fill-column-indicator-mode))
#+end_src
** Show-paren-mode
@@ -2460,7 +2461,7 @@ description I give won't do it justice.
:config
(add-multiple-to-list aggressive-indent-excluded-modes
'c-mode 'c++-mode 'cc-mode
- 'asm-mode)
+ 'asm-mode 'js-mode)
(global-aggressive-indent-mode))
#+end_src
** Compilation
@@ -3551,7 +3552,6 @@ Firstly, web mode for consistent colouring of syntax.
:straight t
:defer t
:mode ("\\.html" . web-mode)
- :mode ("\\.js" . web-mode)
:mode ("\\.css" . web-mode)
:custom
((web-mode-code-indent-offset 2)
@@ -3606,6 +3606,17 @@ Emmet for super speed code writing.
" </body>
</html>"))
#+end_src
+*** Javascript Mode
+A better mode for JavaScript that also has automatic integration with
+eglot.
+#+begin_src emacs-lisp
+(use-package js
+ :mode ("\\.js" . js-mode)
+ :hook
+ (js-mode-hook . auto-fill-mode)
+ :init
+ (setq js-indent-level 2))
+#+end_src
*** WAIT Typescript
:PROPERTIES:
:header-args:emacs-lisp: :tangle no