ellisonleao / glow.nvim Goto Github PK
View Code? Open in Web Editor NEWA markdown preview directly in your neovim.
License: MIT License
A markdown preview directly in your neovim.
License: MIT License
Describe the bug
I try running :Glow
on Windows with Powershell 7.1.3 but the popup window is completely blank.
If I go into insert mode in the floating window and press enter I get the message An unknown element "" was received. This can happen if the remote process closed or ended abnormally
Weirdly enough, it works perfectly well with the original cmd shell.
While this plugin probably doesn't have Windows too high on its compatibility list, I would appreciate any help.
To Reproduce
Set the shell to pwsh
or powershell
Run :Glow
Expected behavior
There will be a markdown preview in the pop up window
Additional context
Neovim Version: NVIM v0.5.0-dev+1233
OS: Windows 10
Terminal: Windows Terminal 1.8.14444.0
:GlowInstall
does absolutely nothing on NVIM v0.5.0-828-g0a95549d6
Maybe i am missing something?
would be very nice to have it right in the right/left side.
would very nice a fresh new reload after buffer save.
When running :PlugInstall
to install the plugin, I encountered this error:
E5108: Error executing lua Vim:E903: Process failed to start: no such file or directory: "/bin/bash"
OS: Windows 10
Nvim: v0.5.0-828-g0a95549d6
Current instalation is broken. The basic steps now are:
git clone https://github.com/charmbracelet/glow.git
cd glow
go build && mv glow $GOPATH/bin
It will be great to have an option when we could open MD file in the new split (or just a new buffer) and observe live changes (not sure if it's doable with Glow tho)
Hi, I love your plugin, but is there a future to add support for Latex preview? Like:
Thanks.
I've followed the instructions from the readme (using vim-plug) and installation fails:
tar: Error opening archive: Unrecognized archive format
[Process exited 1]
If I try to run :Glow after it says it's not installed, and to run :GlowInstall, which gives me the error above as well. I noticed locally in the folder I was in, there's a glow.tar.gz
file, but it doesn't seem to be a proper tar file, hence the error:
~ ls -la
-rw-r--r-- 1 omar staff 9B Jul 1 13:42 glow.tar.gz
~ file glow.tar.gz
glow.tar.gz: ASCII text, with no line terminators
~ cat glow.tar.gz
Not Found%
Hey, so I tried installing this with vim-plug and I'm getting a E492
when trying to run GlowInstall
My nvim is v0.6.0
Preview window with onehalfdark colorscheme
Preview window with badwolf colorscheme
nvim version: 0.5.0 stable
OS: fedora 40
plugin commit: 794649f
Hey I made a markdown preview plugin inspired by glow.nvim: https://github.com/p00f/mdpreview.nvim
It uses the same path expansion and floating window logic as glow.nvim so I licensed it under MIT giving you copyright:
https://github.com/p00f/mdpreview.nvim/blob/main/LICENSE#L3
and credited you in the readme:
https://github.com/p00f/mdpreview.nvim#credits
Is this enough?
Describe the bug
I do :GlowInstall and it gives me an error
To Reproduce
Steps to reproduce the behavior:
Using the paq package manager
paq {'npxbr/glow.nvim', run=function() vim.cmd ':GlowInstall' end, branch='main'}
Expected behavior
Glow installs successfully!
Additional context
Neovim Version: NVIM v0.5.0-dev+1330
Distro: Arch Linux
Terminal: Windows Terminal (Using WSL2)
Whenever i try to install glow.nvim
with paq-nvim
, it simply doesn't works, there's no error output, i'm unable to run both :GlowInstall
and :Glow
, they give no output at all, my plugins.lua
file is like this at the moment:
require 'paq' {
{'npxbr/glow.nvim', opt = true, run = vim.cmd('GlowInstall')};
}
Does glow supports paq-nvim
or only packer
?
Hi, cool plugin!
Is there a way to toggle the preview window?
when i use :Glow it only shows [Process exited 139]
The idea here is to get the current cursor position and when you call :Glow
command, the floating window will still keep that position over there
Hi,
Glow window can be closed by q
. https://github.com/npxbr/glow.nvim/blob/main/lua/glow.lua#L129
Maybe it's a good idea of mapping <ESC>
to close_window.
api.nvim_buf_set_keymap(buf, "n", "<ESC>", ":lua require('glow').close_window()<cr>",
{noremap = true, silent = true})
Following the readme, i put the following line in my plug.vim
Plug 'ellisonleao/glow.nvim', {'do': ':GlowInstall', 'branch': 'main'}
After running PlugInstall
, I got the following error:
nvim version: 0.5.0 stable
OS: fedora 40
plugin commit: 794649f
Hi! Thank you for the aweome plugin. I have a question about usage. Is it possible to use to for hover and diagnostic LSP messages? It uses markdown, but built-in Markdown renderer in Neovim is not good :)
I can't update without installing go
but this dependence does not mention in Redme
I just installed this plugin by doing
git clone https://github.com/npxbr/glow.nvim.git ~/.vim/pack/npxbr/start/glow.nvim
I am also running Neovim 0.4.4 via apt packages. However,now when I start Neovim, I get the following error.
Error detected while processing /home/filbot/.vim/pack/npxbr/start/glow.nvim/plugin/glow.vim:
line 6:
E5105: Error while calling lua chunk: /home/filbot/.vim/pack/npxbr/start/glow.nvim/lua/glow.lua:67: attempt to call field 'cmd' (a nil value)
The glow
command is in my PATH and able to be ran.
It seems like :Glow
floating window only shows end of rendered output (depending on window size) and does not allow to scroll its content as pressing any button just closes the window (it always prints [Process exited 0]
at the bottom of floating window, which also could be hidden if no errors were detected).
Looks very promising though, will be happy to replace iamcco/markdown-preview.nvim.
Using glow.nvim freshly installed through vimplug and glow 1.0.1, running :Glow
on files whose names or paths contain at least one space produces an error.
Here’s the message that appears when I try it with /tmp/markdown text.md
:
Error: open /tmp/markdown: no such file or directory
Usage:
glow SOURCE [flags]
glow [command]
Available Commands:
help Help about any command
stash Stash a markdown
Flags:
-a, --all show system files and directories (TUI-mode only)
-h, --help help for glow
-p, --pager display with pager
-s, --style string style name or JSON path (default "auto")
-v, --version version for glow
-w, --width uint word-wrap at width
Use "glow [command] --help" for more information about a command.
[Process exited 255]
If I rename the file to markdown-text.md
, the plugin works as expected.
I'm not sure what the effort is to support the M1. I just got this new laptop and was looking to migrate away from emacs for my notes (it doesn't work great on M1 either). I haven't looked much into the code for why this isn't working. let me know if there's any more info I can provide
Hi,
not sure what's the issue here: I open a markdown file in my vim-wiki, then issue :Glow<CR>
but I get this error:
E5105: Error while calling lua chunk: /home/USER/.config/nvim/plugged/glow.nvim/lua/glow.lua:36: attempt to index field 'fn' (a nil value)
Since ftplugin now supports sourcing lua files, we can remove some of the filetype checks and improve the codebase
Sorry I have not found document related to using Glow.nvim with markdown file that include LaTeX formulas. And so far it seems that if markdown files include LaTex formula such as $$x^2$$
, Glow.nvim will skip this line (the whole line). At the same time, I'm using vim.markdown and it could display correctly.
Did I do something wrong or miss any documents?
I'm getting a "glow only support markdown files" when I try to open a .rmd
file, even though the filetype is markdown. Could this extension please be added :)
Great plugin by the way!
I'm getting a "glow only support markdown files" when I try to open a .markdown
file, even though the filetype is markdown
. Opening .md
works well.
Hi:
Great plugin by the way, thanks for your efforts.
I upgraded nvim at some point in the recent past, now :Glow won't run, I'm not sure what changed, here is my config:
❯ nvim --version
NVIM v0.8.0-dev+555-gd07a39c54
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /Applications/Xcode_13.2.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/Users/runner/work/neovim/neovim/build/cmake.config -I/Users/runner/work/neovim/neovim/src -I/Users/runner/work/neovim/neovim/.deps/usr/include -I/Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include -I/Library/Frameworks/Mono.framework/Headers -I/Users/runner/work/neovim/neovim/build/src/nvim/auto -I/Users/runner/work/neovim/neovim/build/include
Compiled by [email protected]
Features: +acl +iconv +tui
See ":help feature-compile"
:lua print(vim.loop.os_uname().sysname)
= "Darwin"wbthomason/packer.nvim
to manage my plugins, this is my :Glow snippet: use({
"ellisonleao/glow.nvim",
branch = "main",
config = {
function()
require("glow").setup({
border = "rounded",
width = 100,
})
end,
},
})
I would like to have :Glow
work even when glow is not in my path but it exists in g:glow_binary_path
. Currently it opens the terminal up and says command not found. I believe it could be fixed by changing
Line 197 in ae61bac
vim.fn.termopen(string.format("%s/glow %s", bin_path, vim.fn.shellescape(path)))
Already if I try to install like mentioned in reamdme, :PackerSync fail to install the plugin which occurs bc packer haven't loaded plugin so executing GlowInstall command fail for packer
I can open markdown and manually execute GlowInstall this way works but it's not automated
Is glow.nvim's main intention to be a .md reader - eg. "there's this .md file in my project's documentation. I'm reading it in neovim. It's a bit painful to read raw markdown so I'll use glow.nvim"?
Would something like having two splits side by side:
Live editing is already possible in https://github.com/iamcco/markdown-preview.nvim but it requires opening a separate browser window. glow.nvim is entierly vim based
Full screen or change window size feature would be really helpful, but it seems like there isn't one, btw thank you for making this plugin!!
I find glow syntax highlighting don't work on Windows. I have another Ubuntu machine with same neovim init scripts & glow syntax coloring works fine there. I am using neovim 0.6.1
with packer on both Ubuntu and Windows.
I have intstalled glow to this path & updated glow_binary_path
vim.g.glow_binary_path="c:\\Neovim\\bin"
P.S. this woks fine on windows terminal prompt too.
Lines 88 to 95 in d862813
I've checked with two wsl distros and for me uname -p
reports the cpu model (not x86_64 for example).
uname -m
does however respond with x86_64. Due to this the order of assignment for arch
the utility fails incorrectly. Why is the -p
needed at all?
Hello,
I'm having a problem trying to configure the plugin in windows. I have installed glow using scoop as they suggest in their website, but whenever I try to execute the command :Glow, the message I get is "Install script not supported on Windows yet. ...".
I've tried to set the global variable g:glow_binary_path to the path where glow is installed, but it doesn't fix it either. Any solutions?
Thank you so much in advance
I believe the major desktop environments on Linux follow the XDG
standards. The recommended location to install binaries is in $HOME/.local/bin
. On most Linux and Linux-like distributions, this location is already in $PATH
.
Can this be the default location for Glow
, at least on Linux? It save users from configuring paths, creating new folders, and what not.
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
I can't open any other file
:Glow /path/to/file.md
error: file does not exist
except for this file
:Glow
:Glow %
Hi. Thanks a lot for creating this nice plugin.
In README, the following mapping is suggested.
nmap <leader>p :Glow<CR>
Since this plugin is specific to markdown files, I tried buffer-specific mapping:
augroup glow
autocmd!
autocmd FileType markdown nnoremap <buffer> <silent> <Space> <Cmd>Glow<CR>
augroup END
Unfortunately with this mapping, I cannot toggle the glow preview window by hitting <Space>
because the mapping is not enabled in the preview buffer.
So my thought about mapping is that it could be better to enable users to customize mapping to toggle (or close) preview window in the preview buffer. What do you think about it?
Hello, devs
Thanks for your plugin, but when I enter :GlowInstall
, it failed with:
installing glow..
Error in packer_compiled: ...vim/site/pack/packer/opt/packer.nvim/lua/
packer/load.lua:83: Vim(lua):Architecture not supported/recognized!
Please check your config for correctness
I'm using packer, and the config is:
use {"ellisonleao/glow.nvim", branch = 'main', cmd = {"Glow", "GlowInstall"}}
And the os is gentoo linux, uname -a returns:
Linux laptop 5.17.0-pf3-juan #3 SMP PREEMPT Sun May 8 10:16:45 HKT 2022 x86_64 AMD Ryzen 7 PRO 4750U with Radeon Graphics AuthenticAMD GNU/Linux
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.