Skip to content

Commit

Permalink
docs: update README with options and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwinter committed Jan 22, 2023
1 parent 3832907 commit f25b7bc
Showing 1 changed file with 47 additions and 2 deletions.
49 changes: 47 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,51 @@

## Features

- Extensive syntax and theme support
- Extensive [syntax](https://pygments.org/languages/) and [theme](https://pygments.org/styles/) support - powered by [Pygments](https://pygments.org)
- Set font and font size
- Set indentation size

## Usage
## Usage

1. Install package

```shell
pip install syntaxedit
```

Or

```shell
poetry add syntaxedit
```

2. In your app, include the package, and create a `SyntaxEdit` widget:

```python
from syntaxedit.core import SyntaxEdit

code = """# Todo list
- [ ] Go shopping
- [x] Walk the dog"""

widget = SyntaxEdit(code)
```

### Available options

- `content`: the initial content for the widget. **Default:** `""`
- `parent`: parent Qt widget for SyntaxEdit. **Default:** `None`
- `font`: the font family for the widget. **Default:** `"Courier New"`
- `font_size`: size to use for the font. **Default:** `13`
- `syntax`: the code [syntax](https://pygments.org/languages/) to use. **Default:** `"Markdown"`
- `theme`: the syntax [theme](https://pygments.org/styles/) to use. **Default:** `"solarized-light"`
- `indentation_size`: the size for indentation. **Default:** `4`

## Authors

By [David Winter](https://github.com/davidwinter)

## License

MIT

0 comments on commit f25b7bc

Please sign in to comment.