(Emacs/config)+js-mode configuration
Having to use JS in my Emacs means disabling a few things.
This commit is contained in:
@@ -2222,7 +2222,8 @@ limit), so set it for specific modes need the help.
|
|||||||
"w" #'whitespace-mode)
|
"w" #'whitespace-mode)
|
||||||
:hook
|
:hook
|
||||||
(before-save-hook . whitespace-cleanup)
|
(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)
|
. whitespace-mode)
|
||||||
:init
|
:init
|
||||||
(setq whitespace-line-column nil
|
(setq whitespace-line-column nil
|
||||||
@@ -2243,7 +2244,7 @@ use 70 fill columns while code should stick to 80.
|
|||||||
:hook
|
:hook
|
||||||
(text-mode-hook . auto-fill-mode)
|
(text-mode-hook . auto-fill-mode)
|
||||||
((c-mode-hook c++-mode-hook haskell-mode-hook python-mode-hook
|
((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))
|
. display-fill-column-indicator-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Show-paren-mode
|
** Show-paren-mode
|
||||||
@@ -2460,7 +2461,7 @@ description I give won't do it justice.
|
|||||||
:config
|
:config
|
||||||
(add-multiple-to-list aggressive-indent-excluded-modes
|
(add-multiple-to-list aggressive-indent-excluded-modes
|
||||||
'c-mode 'c++-mode 'cc-mode
|
'c-mode 'c++-mode 'cc-mode
|
||||||
'asm-mode)
|
'asm-mode 'js-mode)
|
||||||
(global-aggressive-indent-mode))
|
(global-aggressive-indent-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Compilation
|
** Compilation
|
||||||
@@ -3551,7 +3552,6 @@ Firstly, web mode for consistent colouring of syntax.
|
|||||||
:straight t
|
:straight t
|
||||||
:defer t
|
:defer t
|
||||||
:mode ("\\.html" . web-mode)
|
:mode ("\\.html" . web-mode)
|
||||||
:mode ("\\.js" . web-mode)
|
|
||||||
:mode ("\\.css" . web-mode)
|
:mode ("\\.css" . web-mode)
|
||||||
:custom
|
:custom
|
||||||
((web-mode-code-indent-offset 2)
|
((web-mode-code-indent-offset 2)
|
||||||
@@ -3606,6 +3606,17 @@ Emmet for super speed code writing.
|
|||||||
" </body>
|
" </body>
|
||||||
</html>"))
|
</html>"))
|
||||||
#+end_src
|
#+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
|
*** WAIT Typescript
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:header-args:emacs-lisp: :tangle no
|
:header-args:emacs-lisp: :tangle no
|
||||||
|
|||||||
Reference in New Issue
Block a user