Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benlubas/neorg-conceal-wrap
Wrap lines based on their concealed width
https://github.com/benlubas/neorg-conceal-wrap
Last synced: 27 days ago
JSON representation
Wrap lines based on their concealed width
- Host: GitHub
- URL: https://github.com/benlubas/neorg-conceal-wrap
- Owner: benlubas
- License: mit
- Created: 2024-05-15T16:42:01.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-09-07T19:04:45.000Z (2 months ago)
- Last Synced: 2024-09-08T20:13:46.126Z (2 months ago)
- Language: Lua
- Size: 30.3 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-neorg - Neorg Conceal Wrap - Hard wrap text based on its concealed width, instead of its unconcealed width. (Neorg Modules)
README
# neorg-conceal-wrap
Wrap lines based on their concealed width instead of their unconcealed width.
![image](https://github.com/benlubas/neorg-conceal-wrap/assets/56943754/34900a49-7f4b-45e5-ba35-2fbb980c8e88)
---
## Install
Install this plugin and load it by adding this to your neorg config:
```lua
["external.conceal-wrap"] = {},
```There is no configuration. `:h textwidth` is used as the target width of a line.
## Usage
This plugin overwrites the `formatexpr` for `.norg` buffers, so formatting is applied with the `gq`
mapping. see `:h 'formatexpr'` and `:h gq` for details. TL;DR: use `gq` to format
the text object.Formatting in insert mode falls back to normal nvim formatting. This is for a few reasons I guess,
the main one being that I don't care to implement it right now. But also, while typing syntax is
often broken and this would result in needing to reformat sometimes anyway.