diff --git a/README.org b/README.org index 15a7df9e..d8abb5f2 100644 --- a/README.org +++ b/README.org @@ -1969,6 +1969,20 @@ In c++ I just want to make sure lsp is called when enter c++-mode (add-hook 'c++-mode-hook 'eglot) #+END_SRC +*** Web +For developing websites, I like to use web-mode +#+begin_src emacs-lisp +(use-package web-mode + :config + (add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.phtml?\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.[agj]sp\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.mustache\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.djhtml?\\'" . web-mode))) +#+end_src + *** Lua Since I use the Awesome WM I thought it'd be good to have lua around. It's also in a lot of things. #+begin_src emacs-lisp diff --git a/init.el b/init.el index 88e0ce61..6282f32b 100644 --- a/init.el +++ b/init.el @@ -1365,6 +1365,16 @@ targets." (add-hook 'c++-mode-hook 'eglot) +(use-package web-mode + :config + (add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.phtml?\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.[agj]sp\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.mustache\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.djhtml?\\'" . web-mode))) + (use-package lua-mode :mode ("\\.lua\\'" . lua-mode)) @@ -2357,19 +2367,3 @@ interfere with the default `bongo-playlist-buffer'." gcmh-verbose nil)) (setq warning-suppress-types '((comp))) -(custom-set-variables - ;; custom-set-variables was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(pdf-misc-print-program "/usr/bin/lpr") - '(pdf-misc-print-program-args '("-o media=Letter" "-o fitplot")) - '(safe-local-variable-values - '((projectile-project-run-cmd . "./build/bin/presenter") - (projectile-project-compilation-cmd . "cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -B build/ . && make -j8 --dir build/ && rm -rf ~/.cache/librepresenter/LibrePresenter/qmlcache/")))) -(custom-set-faces - ;; custom-set-faces was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(org-modern-tag ((t :background "#9aedfe" :foreground "#282a36"))))