Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ellisonleao/glow.nvim
A markdown preview directly in your neovim.
https://github.com/ellisonleao/glow.nvim
glow golang lua markdown neovim neovim-plugin nvim preview vim
Last synced: about 1 month ago
JSON representation
A markdown preview directly in your neovim.
- Host: GitHub
- URL: https://github.com/ellisonleao/glow.nvim
- Owner: ellisonleao
- License: mit
- Created: 2020-08-12T23:40:54.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-20T12:59:38.000Z (4 months ago)
- Last Synced: 2024-06-19T03:08:44.545Z (3 months ago)
- Topics: glow, golang, lua, markdown, neovim, neovim-plugin, nvim, preview, vim
- Language: Lua
- Homepage:
- Size: 90.8 KB
- Stars: 1,218
- Watchers: 10
- Forks: 51
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-neovim - ellisonleao/glow.nvim - Markdown preview using glow. (Programming Languages Support / Markdown and LaTeX)
README
https://user-images.githubusercontent.com/178641/215353259-eb8688fb-5600-4b95-89a2-0f286e3b6441.mp4
**Breaking changes are now moved to a fixed topic in Discussions. [Click here](https://github.com/ellisonleao/glow.nvim/discussions/77) to see them**
## Prerequisites
- Neovim 0.8+
## Installing
[![LuaRocks](https://img.shields.io/luarocks/v/ellisonleao/glow.nvim?logo=lua&color=purple)](https://luarocks.org/modules/ellisonleao/glow.nvim)
- [vim-plug](https://github.com/junegunn/vim-plug)
```
Plug 'ellisonleao/glow.nvim'
lua << EOF
require('glow').setup()
EOF
```- [packer.nvim](https://github.com/wbthomason/packer.nvim)
```lua
use {"ellisonleao/glow.nvim", config = function() require("glow").setup() end}
```- [lazy.nvim](https://github.com/folke/lazy.nvim)
```lua
{"ellisonleao/glow.nvim", config = true, cmd = "Glow"}
```## Setup
The script comes with the following defaults:
```lua
{
glow_path = "", -- will be filled automatically with your glow bin in $PATH, if any
install_path = "~/.local/bin", -- default path for installing glow binary
border = "shadow", -- floating window border config
style = "dark|light", -- filled automatically with your current editor background, you can override using glow json style
pager = false,
width = 80,
height = 100,
width_ratio = 0.7, -- maximum width of the Glow window compared to the nvim window size (overrides `width`)
height_ratio = 0.7,
}
```To override the custom configuration, call:
```lua
require('glow').setup({
-- your override config
})
```Example:
```lua
require('glow').setup({
style = "dark",
width = 120,
})
```## Usage
### Preview file
```
:Glow [path-to-md-file]
```### Preview current buffer
```
:Glow
```### Close window
```
:Glow!
```You can also close the floating window using `q` or `` keys