andy-blum / drupal-smart-snippets

This extension adds rich language support for Drupal Hooks, Services, and Render Elements to VS Code.
https://marketplace.visualstudio.com/items?itemName=andrewdavidblum.drupal-smart-snippets
MIT License
21 stars 4 forks source link

fix(elements): update scraper to get attributes from AST #37

Closed andy-blum closed 1 month ago

andy-blum commented 1 month ago

Closes #27

Uses PHP attributes to get element names

ultimike commented 1 month ago

Cool. Thanks. Is there an easy way to get this before the next release?

andy-blum commented 1 month ago

If you scan the changes in the JSON file and think it looks good I'll just release a new version

ultimike commented 1 month ago

The underscore stuff looks reasonable, but I did notice a bunch of changes similar to:

-      "@FormElement (\"link\")",
+      "@RenderElement (\"link\")",

Where it changes from FormElement to RenderElement. Are these correct?

-mike

andy-blum commented 1 month ago

This is correct - we went off the rails in #31.

Screenshot 2024-10-24 at 8 58 26 PM