ellisonleao/glow.nvim

github github
markdown-/-latex
star 679
stars
alert-circle 6
open issues
users 6
subscribers
git-branch 34
forks
CREATED

2020-08-12

UPDATED

4 days ago


https://user-images.githubusercontent.com/178641/179131739-36ca2225-9a9e-4894-924e-9e03211c0886.mp4

Breaking changes are now moved to a fixed topic in Discussions. Click here to see them

Prerequisites

  • Neovim 0.7+

Installing

with vim-plug

Plug 'ellisonleao/glow.nvim'

with packer.nvim

use {"ellisonleao/glow.nvim"}

Setup

The script comes with the following defaults:

{
  glow_path = "", -- filled automatically with your glow bin in $PATH,
  glow_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,
}

To override the custom configuration, call:

require('glow').setup({
  -- your override config
})

Example:

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 <Esc> keys