Skip to content

Commit 8c7acca

Browse files
committed
Add PHPStorm instructions
1 parent cca36c3 commit 8c7acca

1 file changed

Lines changed: 43 additions & 11 deletions

File tree

docs/SETUP.md

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ Then run `composer dump-autoload -o`.
3939

4040
PHPantom communicates over stdin/stdout using the standard [Language Server Protocol](https://microsoft.github.io/language-server-protocol/). Any editor with LSP support can use it. Point the client at the `phpantom_lsp` binary with `php` as the file type. No special initialization options are required.
4141

42+
---
43+
4244
### Zed
4345

4446
A Zed extension is included in the `zed-extension/` directory:
@@ -62,6 +64,8 @@ To make PHPantom the default PHP language server, add to your Zed `settings.json
6264
}
6365
```
6466

67+
---
68+
6569
### Neovim
6670

6771
> [!NOTE]
@@ -76,24 +80,52 @@ vim.lsp.config['phpantom'] = {
7680
vim.lsp.enable('phpantom')
7781
```
7882

83+
---
84+
7985
### VS Code
8086

81-
1. **Install a generic LSP client extension.**
82-
- We recommend [Generic LSP Client (v2)](https://marketplace.visualstudio.com/items?itemName=zsol.vscode-glspc) for maximum flexibility.
83-
- Install via VS Code Marketplace:
87+
1. **Install a generic LSP client extension**
88+
89+
* Recommended: [Generic LSP Client (v2)](https://marketplace.visualstudio.com/items?itemName=zsol.vscode-glspc)
90+
* Install via VS Code Marketplace:
91+
8492
```vscode-extensions
8593
zsol.vscode-glspc
8694
```
8795
88-
2. **Download PHPantom LSP binary:**
89-
- Download: [GitHub Releases](https://github.com/AJenbo/phpantom_lsp/releases/latest)
90-
- Extract the binary and put it where you like
96+
2. **Download PHPantom LSP binary**
97+
98+
* Get it from [GitHub Releases](https://github.com/AJenbo/phpantom_lsp/releases/latest)
99+
* Extract the binary and place it in a preferred location
100+
101+
3. **Configure the extension**
102+
103+
* Open VS Code settings for Generic LSP Client (v2)
104+
* Set the path to your PHPantom binary
105+
* Add the Language ID: `php`
106+
* Restart VS Code
107+
108+
---
109+
110+
### PHPStorm
111+
112+
1. **Download PHPantom LSP binary**
113+
114+
* Get it from [GitHub Releases](https://github.com/AJenbo/phpantom_lsp/releases/latest)
115+
* Extract the binary to a preferred location
116+
117+
2. **Install and configure LSP plugin**
118+
119+
* Go to **Editor → Plugins** and install [LSP4IJ](https://plugins.jetbrains.com/plugin/23257-lsp4ij)
120+
* Restart PHPStorm
121+
* Navigate to **Languages & Frameworks → Language Servers**
122+
* Click **+** to add a new server
123+
124+
* Name: `PHPantom`
125+
* Command: path to your PHPantom binary
126+
* Mapping: add a new Language and set it to `PHP`
91127
92-
3. **Configure the extension:**
93-
- Open VS Code settings for Generic LSP Client (v2).
94-
- Set the path to your actual binary location.
95-
- Add Language ID `php`
96-
- Restart VS Code
128+
---
97129
98130
### Sublime Text
99131

0 commit comments

Comments
 (0)