Git Product home page Git Product logo

glow.nvim's Introduction

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

glow.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.nvim's People

Contributors

ellisonleao avatar github-actions[bot] avatar nocturnalbeast avatar ahmedelgabri avatar aemonge avatar andrew15-5 avatar junkmechanic avatar annacruz avatar ashishbinu avatar caleb-mitchell avatar hsun-code avatar qvieth avatar joshddunn avatar rywng avatar lbartoletti avatar mrcjkb avatar iaroki avatar mengano-net avatar jupblb avatar michaelbeaumont avatar mnacamura avatar riderius avatar bitsapien avatar rickarubio avatar willeccles avatar fffed avatar h5vx avatar pynappo avatar pyqlsa avatar strogiyotec avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.