This new release of the openHAB Alignment Tool v2 implements the formatting functions with the help of the Visual Studio Code Formatter API. So the extension is now a "real" VSC Formatter. With that VSC functions like Format-On-Saved are supported.
Furthermore there are two new special comments you can use in *.items
files:
// #OHNG#
starts a new formatting group. So the column width will belong to the widest item in the following group and not the whole file.// #OHFS#Multiline#OHFS#
you can change the formatting style for the following code. The default style for all documents will get overridden for the part after the special comment.
The new version (v2.0.0) is already available in the VSC Marketplace:
https://marketplace.visualstudio.com/items?itemName=max-beckenbauer.oh-alignment-tool