I have setup web-mode and lsp mode for PHP programming in my config file. It is very minimal and flymake
works perfectly.
I am struggling to find a way to get code formatting to work. I was told that I could install PHP_beautifier from Pear (which i did) and use it in emacs. But I am not sure how exactly?
There is no such package in emacs either.
My question is what is the best way to auto-format code on save with PHP?
(use-package lsp-mode
:ensure t
:config
(setq lsp-headerline-breadcrumb-enable nil) ;; works
(setq lsp-enable-symbol-highlighting nil) ;; works
(setq lsp-signature-render-documentation nil)
(setq lsp-completion-provider :none) ;; works
(setq lsp-diagnostics-provider :flymake) ;; underline error
)
(use-package web-mode
:ensure t
:init
(setq web-mode-code-indent-offset 4)
(setq web-mode-markup-indent-offset 4)
(setq web-mode-enable-sql-detection t)
)