最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - How to auto-complete variables in VS Code without typing the $ symbol? - Stack Overflow

programmeradmin2浏览0评论

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
Add a comment  | 

1 Answer 1

Reset to default 0

It 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.

发布评论

评论列表(0)

  1. 暂无评论