Skip to content

Commit

Permalink
emacs: set web-mode code indent to 2
Browse files Browse the repository at this point in the history
  • Loading branch information
tiborpilz committed Sep 20, 2023
1 parent d5999f8 commit d32d9d4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
5 changes: 4 additions & 1 deletion home/config/doom/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,10 @@
:mode "\\.svelte\\'")

(with-eval-after-load 'web-mode
(setq web-mode-script-padding 0))
(setq web-mode-script-padding 0)
(setq web-mode-style-padding 0)
(setq web-mode-code-indent-offset 2)
(setq web-mode-markup-indent-offset 2))

(use-package! lsp-tailwindcss
:defer t
Expand Down
8 changes: 6 additions & 2 deletions home/config/doom/config.org
Original file line number Diff line number Diff line change
Expand Up @@ -542,12 +542,16 @@ root directory.

***** Formatting

Remove 1 space padding from <script> tags
Remove 1 space padding from <script> tags, set indent to 2.

#+begin_src elisp
(with-eval-after-load 'web-mode
(setq web-mode-script-padding 0))
(setq web-mode-script-padding 0)
(setq web-mode-style-padding 0)
(setq web-mode-code-indent-offset 2)
(setq web-mode-markup-indent-offset 2))
#+end_src

***** Folding
**** Tailwind
Add the tailwind lsp package
Expand Down
2 changes: 1 addition & 1 deletion home/config/doom/init.el
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
(evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
(format) ; automated prettiness
(format) ; automated prettiness
;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim
;;multiple-cursors ; editing in many places at once
Expand Down

0 comments on commit d32d9d4

Please sign in to comment.