Skip to content

Instantly share code, notes, and snippets.

@DominicWatts
Created February 24, 2021 21:42
Show Gist options
  • Save DominicWatts/58eabf486f4ee4ca1cd55841936c64a0 to your computer and use it in GitHub Desktop.
Save DominicWatts/58eabf486f4ee4ca1cd55841936c64a0 to your computer and use it in GitHub Desktop.
Magento 2 VSCode xml validation
https://marketplace.visualstudio.com/items?itemName=redhat.vscode-xml
https://marketplace.visualstudio.com/items?itemName=viperet.vscode-magento-wizard
php bin/magento dev:urn-catalog:generate ./.vscode/catalog_tmp.xml
MagentoWizard: Generate XML Catalog command
select catalog_tmp.xml
@DomPixie
Copy link

DomPixie commented Mar 3, 2022

That's for formatting only

@pczerkas
Copy link

Should be:
php bin/magento dev:urn-catalog:generate --ide=vscode ./.vscode/catalog_tmp.xml

@ejecatech
Copy link

ejecatech commented Jun 8, 2024

Doing MagentoWizard: Generate XML Catalog command creates the catalog.xml file but it was not detected in XML files. Adding path to the catalog.xml file in Red Hat XML plugin's "XML: Catalogs(xml.catalogs) setting did the trick.

So add this in VSCode settings.json

"xml.catalogs": [
    "/abs/path/to/project/.vscode/catalog.xml"
],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment