Change multi-web-mode to web-mode.

This commit is contained in:
kj 2022-08-11 12:16:02 -04:00
parent 8d430b9d3c
commit cddf20683e
3 changed files with 11 additions and 8 deletions

View File

@ -292,15 +292,17 @@
;; Terminal
(use-package vterm :ensure t :defer t :straight t)
(use-package multi-web-mode
(use-package web-mode
:straight t
:defer t
:config
(setq mweb-default-major-mode 'html-mode)
(setq mweb-tags '((php-mode "<\\?php\\|<\\? \\|<\\?=" "\\?>")
(js-mode "<script +\\(type=\"text/javascript\"\\|language=\"javascript\"\\)[^>]*>" "</script>")
(css-mode "<style +type=\"text/css\"[^>]*>" "</style>")))
(setq mweb-filename-extensions '("php" "htm" "html")))
(setq web-mode-markup-indent-offset 2
web-mode-css-indent-offset 2
web-mode-code-indent-offset 2
web-mode-enable-current-element-highlight t
web-mode-enable-current-column-highlight t)
)
;; Cuando iniicias un atajo de teclas te muestra las posibilidades
(use-package which-key

View File

@ -26,7 +26,7 @@
(global-set-key (kbd "C-x mj") 'js-mode)
(global-set-key (kbd "C-x mp") 'php-mode)
(global-set-key (kbd "C-x mr") 'rust-mode)
(global-set-key (kbd "C-x mw") 'multi-web-mode)
(global-set-key (kbd "C-x mw") 'web-mode)
;; Atajos de windmove
(global-set-key (kbd "C-x <left>") 'windmove-left)

View File

@ -57,6 +57,7 @@
;; Remove php extension on form lsp
(setq lsp-language-id-configuration
(remove '(".*\\.php$" . "php") lsp-language-id-configuration))
(add-to-list 'lsp-language-id-configuration '(web-mode . "php"))
;; Disable `lsp-mode' in `git-timemachine-mode'
(defun my-lsp--init-if-visible (fn &rest args)