Created
August 29, 2025 04:49
-
-
Save im4aLL/297fb0c2be8d11d11f865d811f6b538d to your computer and use it in GitHub Desktop.
Revisions
-
im4aLL created this gist
Aug 29, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,81 @@ ### Instructions 1. Install LSP and LSP-intelephense from Package Control. 2. Restart 3. Then run `composer global require phpactor/phpactor` 4. Then in LSP settings ```json "clients": { "phpactor": { "enabled": true, "command": ["C:\\Users\\your_username_here\\AppData\\Roaming\\Composer\\vendor\\bin\\phpactor.bat", "language-server"], "selector": "source.php" } } ``` Note: Provide client settings didn't work for https://lsp.sublimetext.io/language_servers/#php ### Now prettier for HTML 1. Install `JsPrettier` from package control 2. Run `npm install --global prettier` 3. Preferences / Package Settings / JsPrettier / Settings user ```json { "auto_format_on_save": true } ``` It will format frontend files ### Format for PHP I tried using prettier php plugin, passed cli argument didn't work neither worked with prettier config file. Then I tried LSP format and it worked. 1. Since you installed LSP, it comes with LSP format automatically 2. Format on save will work only this way Preferences / Settings - Syntax Specific ```json { "lsp_format_on_save": true } ``` ### Bonus setup User settings ```json { "ignored_packages": [ "Vintage", ], "theme": "Spacegray Eighties.sublime-theme", "color_scheme": "Base16 Eighties Dark.sublime-color-scheme", "folder_exclude_patterns": ["node_modules", "vendor"], "font_face": "JetBrains Mono", "font_size": 10.5, "line_height": 1.7, "line_padding_top": 2, "line_padding_bottom": 2, "index_files": true } ``` Installed packages list - A File Icon - Emmet - JsPrettier - LSP - LSP - intelephense - PHP companion - SideBarEnhancement - SublimeLinter - SublimeLinter - php - Theme - Spacegray