Skip to content

plone/plone-vs-utilities

Repository files navigation

Plone Utilities

Plone logo

This extensions provides several utilities to work with Plone sites.

Visual Studio Code Snippets for Plone

Currently this extension provides a good set of XML-Registry and Supermodel Snippets, as well as Python Snippets. You also have useful plone.autoform and ZCML permission Snippets to setup fieldsets and custom widgets.

It also provides Snippets for Volto Block View and Edit components, and Volto block configuration, Volto block schema and Volto schema enhancers aswell.

Plone XML (supermodel) Snippets for VS Code

Plone XML Snippets for VS Code

Plone Python (plone.schema) Snippets for VS Code

Plone Python Snippets for VS Code

Volto Snippets for VS Code

Volto Snippets for VS Code

ZCML an TAL/ZPT Language Configuration and Formatter for VSCode

ZCML is an XML extension used by Zope applications to configure themselves. Its used extensively in Plone.

But formatting ZCML is hard and we have never been satisfied by existing formatters. To solve that Alessandro Pisa created zpretty a very opinionated ZCML formatter.

This extension integrates zpretty into VSCode to format your ZCMLs.

The code of this addon is based on VSCode Custom Local Formatters, I have also extracted the XML language definition and grammar from VSCode itself and use them to create the ZCML language in VSCode.

The extension provides to configuration settings (with sane defaults), to provide the absolute path of your zpretty executable and the options passed to it.

If you have any questions or want to provide some feedback, add a GitHub Issue

zpretty also provides an XML formatter, very useful to format Zope Page Templates.

This extensions provides also a language configuration for ZPT files (TAL language), and also a file formatter to get a pretty output.

Install

This extension is already in the official Extension Marketplace and can be installed directly from VS Code.

Manual Install

To install it manually in your VS Code editor, check out this repository and symlink it under the name "plone" into your extensions directory on Linux usually: ~/.vscode/extensions/.

You have to reload the editor window or restart vs code, to load the snippets.

Configure

This add on has several configuration options that can be modified using VS Code settings:

  • zcmlLanguage.zprettypath: path to zpretty. By default it tries to run using uvx: uvx zpretty.

  • zcmlLanguage.zprettyoptions: options to format ZCML code. By default it passes the -z option to run zpretty in ZCML mode.

  • talLanguage.zprettyoptions. options to format XML code. By default it passes nothing, to let zpretty guess the file format.

Contribute

If you have ideas to improve this extension, let us know! You can add an issue in this repository or even better make a pull request with your improvements.

We are also very welcoming any help in improving the quality and usefulness of these snippets.

Extension integration

This extension replaces 2 other extensions that were providing the same features and were used by community members:

Thanks them for their work!

About

No description, website, or topics provided.

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  

Packages

No packages published