ellisonleao/glow.nvim

A markdown preview directly in your neovim.

Lua

1,326

95 commits

updated Mar 21, 2025

See the code

README

Project is now archived!

No more bugfixes or new features are going to be created. If you want to get a nice markdown previewer that is being maintained, please try https://github.com/MeanderingProgrammer/render-markdown.nvim.


Preview markdown code directly in your neovim terminal
Powered by charm's glow

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 to see them

Prerequisites

  • Neovim 0.8+

Installing

LuaRocks

Plug 'ellisonleao/glow.nvim'
lua << EOF
require('glow').setup()
EOF
use {"ellisonleao/glow.nvim", config = function() require("glow").setup() end}
{"ellisonleao/glow.nvim", config = true, cmd = "Glow"}

Setup

The script comes with the following defaults:

{
  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:

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

glow
golang
lua
markdown
neovim
neovim-plugin
nvim
preview
vim

ellisonleao/glow.nvim

A markdown preview directly in your neovim.

Lua

1,326

95 commits

updated Mar 21, 2025

See the code

README

Project is now archived!

No more bugfixes or new features are going to be created. If you want to get a nice markdown previewer that is being maintained, please try https://github.com/MeanderingProgrammer/render-markdown.nvim.


Preview markdown code directly in your neovim terminal
Powered by charm's glow

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 to see them

Prerequisites

  • Neovim 0.8+

Installing

LuaRocks

Plug 'ellisonleao/glow.nvim'
lua << EOF
require('glow').setup()
EOF
use {"ellisonleao/glow.nvim", config = function() require("glow").setup() end}
{"ellisonleao/glow.nvim", config = true, cmd = "Glow"}

Setup

The script comes with the following defaults:

{
  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:

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

glow
golang
lua
markdown
neovim
neovim-plugin
nvim
preview
vim

Significant stargazers

ObserverOfTime

184 followers · starred Apr 2022

emmanueltouzery

54 followers · starred Jan 2022

Craig Rodrigues

47 followers · starred Mar 2022

Artturin

101 followers · starred Mar 2022