GithubHelp home page GithubHelp logo

glow.nvim's Introduction

glow.nvim

A glow preview directly in your neovim buffer.

Prerequisites

  • Neovim 0.5 or higher

Installing

with vim-plug

Plug 'hackerzgz/glow.nvim'

with packer.nvim

use {"hackerzgz/glow.nvim"}

Configuration

  • glow_binary_path

Use g:glow_binary_path for vimscript config or vim.g.glow_binary_path for lua config.

If set, this path will be used to execute glow. Otherwise rely on $PATH.

If glow is not on $PATH or glow_binary_path is set and glow is not found there, this path will be used to download the glow executable. It defaults to $HOME/.local/bin.

Example:

let g:glow_binary_path = $HOME . "/bin"
vim.g.glow_binary_path = vim.env.HOME .. "/bin"
  • glow_border

Use g:glow_border for vimscript config or vim.g.glow_border for lua config.

If set, this will change the border of the window. Type :help nvim_open_win for border options.

Example:

let g:glow_border = "rounded"
vim.g.glow_border = "rounded"
  • glow_width

Use g:glow_width for vimscript config or vim.g.glow_width for lua config.

If set, this will change the width of the window.

Example:

let g:glow_width = 120
vim.g.glow_width = 120
  • glow_use_pager

Use g:glow_use_pager for vimscript config or vim.g.glow_use_pager for lua config.

If set true, glow uses the pager to show the doc.

Example:

let g:glow_use_pager = v:true
vim.g.glow_use_pager = true
  • glow_style

Use g:glow_style for vimscript config or vim.g.glow_style for lua config.

If set, this will change the output style to either dark (default) or light.

Example:

let g:glow_style = "light"
vim.g.glow_style = "light"

Usage

:GlowInstall

This will install the glow dependency into g:glow_binary_path or $HOME/.local/bin if not defined.

:Glow [path-to-md-file]
  • Pressing q will automatically close the window
  • No path arg means glow uses current path in vim
  • :Glow command will work as toogle feature, so calling it will open or close the current preview

You can also create a mapping getting a preview of the current file

noremap <leader>p :Glow<CR>

For users who want to make glow.nvim buffer fullscreen, there's a native vim keybinding

  • Ctrl-w + | set window's width max
  • Ctrl-w + _ set window's height max

Or you can have a fullscreen option by creating a mapping for setting both window's height and width max at once

noremap <C-w>z <C-w>\|<C-w>\_

Screenshot

glow.nvim's People

Contributors

ahmedelgabri avatar ashishbinu avatar bitsapien avatar ellisonleao avatar fffed avatar hackerzgz avatar joshddunn avatar jupblb avatar michaelbeaumont avatar mnacamura avatar nocturnalbeast avatar qvieth avatar riderius avatar strogiyotec avatar

Stargazers

 avatar

Watchers

 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.