In VS Code, how can I make variable names auto-complete without typing the $ symbol? For example, when I type data, it should automatically suggest and complete it as $data. When I used IntelliJ IDEA before, it worked like this. How can I achieve the same behavior in VS Code?
I have already installed PHP Intelephense ext
In VS Code, how can I make variable names auto-complete without typing the $ symbol? For example, when I type data, it should automatically suggest and complete it as $data. When I used IntelliJ IDEA before, it worked like this. How can I achieve the same behavior in VS Code?
I have already installed PHP Intelephense ext
Share Improve this question asked Nov 28, 2024 at 10:07 CamusLCamusL 1 2- 2 How should it know you do not mean a keyword instead of a variable? – Markus Zeller Commented Nov 28, 2024 at 10:10
- 1 @MarkusZeller In most languages, variables don't start with a special character, yet auto-completion does work. – Olivier Commented Nov 28, 2024 at 10:21
1 Answer
Reset to default 0It seems PHP IntelliSense extension works better and might be more suitable in your case than PHP Intelephense extension. At least from its homepage, it seems it could help you autocomplete without $. There are couple of examples on how to using the extension.