Skip to content

Commit 76da0e1

Browse files
authored
Merge pull request #38 from MaxBec/beta
v2.0.0 Release
2 parents 15683f1 + 4bc5200 commit 76da0e1

File tree

12 files changed

+1207
-195
lines changed

12 files changed

+1207
-195
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
All notable changes to the openHAB Alignment Tool extension will be documented in this file.
44

5+
## [2.0.0] - 21.07.2020
6+
7+
## Changed
8+
9+
- Implemented the Visual-Studio-Code formatter API. The extension is now a proper formatting tool and can use all the formatting functions integrated in the standard vsc installation (Like format-on-save, etc.).
10+
11+
## Fixed
12+
13+
- Fixed a lot of bugs regarding special formatting features for the \*.items files.
14+
515
## [1.3.11] - 01.03.2020
616

717
## Added

README.md

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,31 @@
55
[![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/max-beckenbauer.oh-alignment-tool?color=orange&label=Version)](https://img.shields.io/visual-studio-marketplace/v/max-beckenbauer.oh-alignment-tool?color=orange)
66
[![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/stars/max-beckenbauer.oh-alignment-tool?label=Rating&logo=visual-studio-code)](https://img.shields.io/visual-studio-marketplace/stars/max-beckenbauer.oh-alignment-tool?label=Rating&logo=visual-studio-code)
77

8-
This extension adds support for formatting and indenting [openHAB](http://www.openhab.org) files like `*.items`, `*.things`, etc. At the moment only `*.items` and `*.sitemap` files are supported. They can be formatted in a column or multiline style. In the future the other file types and other
9-
format-types will be added. Feel free to enter feature-requests.
8+
This extension adds support for formatting and indenting [openHAB](http://www.openhab.org) files like `*.items`, `*.sitemap`, etc. At the moment only `*.items` and `*.sitemap` files are supported. They can be formatted in a column channel-column or multiline style. In the future the other file types
9+
and other format-types will be added. Feel free to add feature-requests on the github repository.
1010

11-
[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/C0C01XTXB)
11+
If you've found the extension helpful or useful, then please consider throwing a coffee my way to help support my work. As i am a student and would like to invest more time and effort in this project this would really help me.
12+
13+
[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.png)](https://ko-fi.com/C0C01XTXB)
1214

1315
## Features
1416

15-
The tool is available via the Command-Palette. Just type `cmnd+shift+p` and enter `openHAB Alignment`. Then you get the option to format the whole file.
17+
The tool is available as a standard Visual-Studio-Code formatter as it uses the original vsc formatter API. You can force to formatting with right-clicking the document and clicking `Format Document...` or `Format Selection...`. If you have enabled the function in the vsc settings it even can
18+
`Format-On-Save`.
1619

1720
### Item-Formatting:
1821

19-
![formatting item gif](images/item-formatting.gif)
22+
**Column-Style:**
23+
24+
![formatting item gif](images/item-formatting-column.gif)
25+
26+
**Column-Channel-Style:**
27+
28+
![formatting item gif](images/item-formatting-column-channel.gif)
29+
30+
**Multiline-Style:**
31+
32+
![formatting item gif](images/item-formatting-multiline.gif)
2033

2134
### Sitemap-Formatting:
2235

@@ -26,20 +39,21 @@ The tool is available via the Command-Palette. Just type `cmnd+shift+p` and ente
2639

2740
The formatting is available for the following openhab file types:
2841

29-
- `.items`
30-
- `.sitemap`
42+
- `.items` (Fully functional)
43+
- `.sitemap` (Under development)
44+
- `.things` (Under development)
3145

3246
## Extension Settings
3347

3448
### New Line After Item
3549

36-
With this option you can choose if you want to have a new line after each item.
50+
With this option you can choose if you want to have a new line inserted after each item. If there is already a single empty line after an item this settings is ignored.
3751

3852
`"oh-alignment-tool.newLineAfterItem": true`
3953

4054
### Preserve Whitespace
4155

42-
Whitespaces in front of items get preserved and won't be deleted.
56+
Whitespaces (tabs or spaces) in front of items get preserved and won't be deleted.
4357

4458
`"oh-alignment-tool.preserveWhitespace": true`
4559

@@ -57,7 +71,8 @@ The format style option gives you two styles between you can choose.
5771
- ChannelColumn
5872
- Multiline
5973

60-
The Column style formats the files in a column-way. Each item will be on one line and the item parts are separated in columns. The Multiline format prints every part of an item in a new line and indents the different parts.
74+
The Column style formats the files in a column-way. Each item will be on one line and the item parts are separated in columns. With the ChannelColumn style only the channel part of an item gets formatted into multiple lines. The Multiline format prints every part of an item in a new line and indents
75+
the different parts.
6176

6277
## Known Issues
6378

1.96 MB
Loading

images/item-formatting-column.gif

1.93 MB
Loading
1.67 MB
Loading

0 commit comments

Comments
 (0)