Skip to content

Commit

Permalink
Merge pull request #206 from BalticAmadeus/18-create-readme
Browse files Browse the repository at this point in the history
18 create readme
  • Loading branch information
PauliusKu authored Sep 17, 2024
2 parents 248e7c6 + f248204 commit fe0149d
Showing 1 changed file with 69 additions and 26 deletions.
95 changes: 69 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,71 @@
# AblFormatter

VSCode extension for Progress OpenEdge code formatting

## Feature Summary

Already implemented:
- Block
- Assign
- Define

| | Feature | Default value | Values | Code example |
|--|---------|---------------|-----------------|--------------|
| | tabSize | 4 | Number | |
| | assignFormatting | true | Boolean | |
| | assignFormattingAssignLocation | New | New, Same | |
| | assignFormattingAlignRightExpression | Yes | Yes, No | |
| | assignFormattingEndDotLocation | New aligned | New, New aligned, Same | |
| | defineFormatting | true | Boolean | |
| | findFormatting | true | Boolean | |
| | forFormatting | true | Boolean | |
| | caseFormatting | true | Boolean | |
| | blockFormatting | true | Boolean | |
| | ifFormatting | true | Boolean | |
| | ifFormattingThenLocation | Same | New, Same | `if true then return a.` <br> ⬇️ <br> `if true`<br>`then return a.` |
| | ifFormattingDoLocation | Same | New, Same | `if true then do:`<br>` return a.`<br>`end.` <br> ⬇️ <br> `if true then`<br>`do:`<br>` return a.`<br>`end.` |
| | ifFormattingStatementLocation | Same | New, Same | `if true then return a.` <br> ⬇️ <br> `if true then`<br>` return a.` |
| | temptableFormatting | true | Boolean | |
VSCode extension for Progress OpenEdge code formatting.

This extension uses tree-sitter-abl implementation by Kamil Jakubus. TODO: add links

## Current status

This is an early preview. Currently, the formatter is not ready for the public release. You can only download it here and install from **vsix** file. In a few months we should be able to release it to the marketplaces.

TODO: Add gif here

## Features

At the moment we implemented formatting logic for these language features:

- Code blocks
- ASSIGN
- CASE
- DEFINE
- FOR
- IF statement
- IF function
- USING

## Configuration

We implemented extensive settings configuration to allow users to easly tailor the experience to their needs. This might not be the case in the future.

TODO: link a separate file with settings

## Installation

Download the extension **vsix** file from GitHub repository and install it on your machine.

[How to install from **vsix**?](https://code.visualstudio.com/docs/editor/extension-marketplace#_install-from-a-vsix)

## Usage

Alowed file extensions:

- **.p**
- **.cls**
- **.i**
- **.w**

Commands:

- **Format Document**: Formats the entire ABL document.
- **Format Selection**: Formats only the selected lines of code.

## Debuging

- TODO: describe how to deal with debug mode

## Contributing

### Registering formatter issues

- TODO: create issue template

### Fixing yourself

1. Fork the repository.
2. Create a new branch for your feature or bug fix.
3. Commit your changes and push to your branch.
4. Submit a pull request to the main repository.

## License

This project is licensed under the APACHE 2.0 License - see the LICENSE file for details.

0 comments on commit fe0149d

Please sign in to comment.