From 14019bf969b42ee8047dddd826fb9eccd189bcd8 Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Sun, 7 Jan 2024 20:55:43 +0900 Subject: [PATCH] Use php-ts-mode --- .emacs.d/el-get-init.d/init-php-ts-mode.el | 11 +++++++++++ .emacs.d/init.el | 15 ++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 .emacs.d/el-get-init.d/init-php-ts-mode.el diff --git a/.emacs.d/el-get-init.d/init-php-ts-mode.el b/.emacs.d/el-get-init.d/init-php-ts-mode.el new file mode 100644 index 0000000..944449e --- /dev/null +++ b/.emacs.d/el-get-init.d/init-php-ts-mode.el @@ -0,0 +1,11 @@ +(add-to-list 'auto-mode-alist '("\\.\\(inc\\|php[s34]?\\)$" . php-ts-mode)) +(with-eval-after-load 'php-ts-mode + (with-eval-after-load 'lsp-bridge + (add-hook 'php-ts-mode-hook #'(lambda () + (push '(php-ts-mode . lsp-bridge-php-lsp-server) lsp-bridge-single-lang-server-mode-list) + (lsp-bridge-mode 1)))) + (add-hook 'php-mode-hook 'editorconfig-apply) + (electric-indent-local-mode t) + (electric-layout-mode t) + ;; (setq-local electric-layout-rules '((?{ . around))) + (electric-pair-local-mode t)) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 8ca8726..d1835f3 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -514,11 +514,16 @@ :branch "eccube-engine") (el-get-bundle yaml-mode) -(el-get-bundle php-mode - :type github - :pkgname "emacs-php/php-mode" - :build `(("make" ,(format "EMACS=%s" el-get-emacs))) - :load-path ("lisp")) +;; (el-get-bundle php-mode +;; :type github +;; :pkgname "emacs-php/php-mode" +;; :build `(("make" ,(format "EMACS=%s" el-get-emacs))) +;; :load-path ("lisp")) +(el-get-bundle php-ts-mode + :type github + :pkgname "emacs-php/php-ts-mode" + :branch "master" + :build `(("make" ,(format "EMACS=%s" el-get-emacs)))) (el-get-bundle php-runtime :type github :pkgname "emacs-php/php-runtime.el")