Is there a way to get Visual Studio Code to recognize HTML syntax in PHP files

I am using Visual Studio code on Mac to work with WordPress applications.

Is there a way to make Visual Studio code recognize HTML and use its functions (mostly autocomplete) inside PHP files?

I already looked for this answer before, but I was just told Go to Visual Studio Code Settings: File >> Preferences >> User Settings

// Place your settings in this file to overwrite the default settings
{                
// Configure file associations to languages (e.g. "*.extension": "html"). These have precedence over the default associations of the languages installed.
     "files.associations": {"*.php": "html"}     
 }

But at the same time, you lose all PHP support and autocomplete.

I would like Microsoft to realize that PHP developers typically use PHP and HTML together when building applications / websites. I would like to use VS Code instead of the magnificent, but expensive PHP storm, if possible.

+7
3

, .

PHP HTML .

, HTML PHP ( PHP HTML), .

0

PHP Intelephense. php html ( ), (, , , /). , , HTML .php.

-1

You can try the extension of HTML support in CSS from the Visual Studio Code Marketplace. It is free and is licensed under MIT.

The following languages ​​are supported:

  • HTML
  • laravel- blade
  • razor
  • vu
  • pug
  • nephritis
  • steering wheels
  • Php
  • rod
  • Maryland
  • nunjucks
  • Javascript
  • javascriptreact
-1
source

Source: https://habr.com/ru/post/1684703/


All Articles