A work-in-progress extension for vscode similar to it's phpstorm counterpart
If you are getting irrelevant global keywords in key completion, you most likely want to untick the PHP > Suggest: Basic in vscode Preferences (php.suggest.basic
)
Place caret between quotes when typing the associative array key and hit Ctrl+Space to get completions
Supposedly will achieve this: bmewburn/vscode-intelephense#249
Uses vscode-intelephense for php syntax tree traversal.
List of features implemented so far: (yet to be updated)
- Specify associative array keys in phpdoc for completion and type inference with PSALM format.
- Infer array key types
- Infer function call result types
- ...
vscode repo page: https://marketplace.visualstudio.com/items?itemName=klesun.deep-assoc-completion-vscode
git clone
this project- run
npm ci
(if you forget to do that you'll getThe terminal process terminated with exit code: 1
error) - open this project root in vscode
- hit F5 to run sandbox instance of vscode with this extension plugged in
Smoke Tests repository: https://github.com/klesun-misc/deep-assoc-lsp-tests
This extension is an order we received on https://klesun-productions.com
Thanks to Louis and Mike for being homies