Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nvim-orgmode/org-bullets.nvim
https://github.com/nvim-orgmode/org-bullets.nvim
lua neovim nvim orgmode-nvim vim
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/nvim-orgmode/org-bullets.nvim
- Owner: nvim-orgmode
- License: agpl-3.0
- Created: 2021-07-09T12:37:02.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-02T09:43:55.000Z (3 months ago)
- Last Synced: 2024-11-10T15:07:11.158Z (10 days ago)
- Topics: lua, neovim, nvim, orgmode-nvim, vim
- Language: Lua
- Homepage:
- Size: 51.8 KB
- Stars: 138
- Watchers: 5
- Forks: 20
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Org-bullets.nvim
This plugin is a clone of [org-bullets](https://github.com/sabof/org-bullets).
It replaces the asterisks in org syntax with unicode characters.This plugin is an extension intended for use with [orgmode.nvim](https://github.com/kristijanhusak/orgmode.nvim)
This plugin works by using neovim `extmarks`, rather than `conceal` for a few reasons.
- conceal can only have one global highlight see `:help hl-Conceal`.
- conceal doesn't work when a block is folded._see below for a simpler conceal-based solution_
![folded](https://user-images.githubusercontent.com/22454918/125088455-525df300-e0c5-11eb-9b36-47c238b46971.png)
## Pre-requisites
- **This plugin requires the use of treesitter with `tree-sitter-org` installed**
- neovim 0.7+## Installation
#### With packer.nvim
```lua
use 'akinsho/org-bullets.nvim'
```## Usage
To use the defaults use:
```lua
use {'akinsho/org-bullets.nvim', config = function()
require('org-bullets').setup()
end}
```The full options available are:
**NOTE**: Do **NOT** copy and paste this block as it is not valid, it is just intended to show the available configuration options
```lua
use {"akinsho/org-bullets.nvim", config = function()
require("org-bullets").setup {
concealcursor = false, -- If false then when the cursor is on a line underlying characters are visible
symbols = {
-- list symbol
list = "•",
-- headlines can be a list
headlines = { "◉", "○", "✸", "✿" },
-- or a function that receives the defaults and returns a list
headlines = function(default_list)
table.insert(default_list, "♥")
return default_list
end,
-- or false to disable the symbol. Works for all symbols
headlines = false,
-- or a table of tables that provide a name
-- and (optional) highlight group for each headline level
headlines = {
{ "◉", "MyBulletL1" }
{ "○", "MyBulletL2" },
{ "✸", "MyBulletL3" },
{ "✿", "MyBulletL4" },
},
checkboxes = {
half = { "", "@org.checkbox.halfchecked" },
done = { "✓", "@org.keyword.done" },
todo = { "˟", "@org.keyword.todo" },
},
}
}
end}
```### Conceal-based alternative
A simpler conceal based alternative is:
```vim
syntax match OrgHeadlineStar1 /^\*\ze\s/me=e-1 conceal cchar=◉ containedin=OrgHeadlineLevel1 contained
syntax match OrgHeadlineStar2 /^\*\{2}\ze\s/me=e-1 conceal cchar=○ containedin=OrgHeadlineLevel2 contained
syntax match OrgHeadlineStar3 /^\*\{3}\ze\s/me=e-1 conceal cchar=✸ containedin=OrgHeadlineLevel3 contained
syntax match OrgHeadlineStar4 /^\*{4}\ze\s/me=e-1 conceal cchar=✿ containedin=OrgHeadlineLevel4 contained
```