From cddf20683e1a5634cc1992a0d1b379263da85714 Mon Sep 17 00:00:00 2001 From: kj Date: Thu, 11 Aug 2022 12:16:02 -0400 Subject: [PATCH] Change multi-web-mode to web-mode. --- configs/base-extensions.el | 14 ++++++++------ configs/base-keys.el | 2 +- configs/base-lsp.el | 3 ++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/configs/base-extensions.el b/configs/base-extensions.el index e8c206d..cb323c1 100644 --- a/configs/base-extensions.el +++ b/configs/base-extensions.el @@ -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 "") - (css-mode ""))) - (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 diff --git a/configs/base-keys.el b/configs/base-keys.el index 05e6189..6233e76 100644 --- a/configs/base-keys.el +++ b/configs/base-keys.el @@ -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 ") 'windmove-left) diff --git a/configs/base-lsp.el b/configs/base-lsp.el index b0c4965..7fc5058 100644 --- a/configs/base-lsp.el +++ b/configs/base-lsp.el @@ -56,7 +56,8 @@ (with-no-warnings ;; Remove php extension on form lsp (setq lsp-language-id-configuration - (remove '(".*\\.php$" . "php") 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)