Giter Site home page Giter Site logo

image.nvim's Introduction

image.nvim's People

Contributors

3rd avatar benlubas avatar esilva15 avatar github-actions[bot] avatar jmbuhr avatar pysan3 avatar rainzm avatar sigmarichards avatar teto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

image.nvim's Issues

Support iterm2 through ueberzugpp

It seems like iterm2 over SSH is not working even with ueberzugpp ( I did not test it in local, but it would not work well )

I fixed the problem by changing two lines in ueberzug.lua
This fix works in tmux over SSH.

  6 M lua/image/backends/ueberzug.lua
  7 @@ -5,12 +5,12 @@ local should_be_alive = false
  8
  9  local spawn = function()
 10    local stdin = vim.loop.new_pipe()
 11 -  local stdout = vim.loop.new_pipe()
 12 +  local stdout = vim.loop.new_tty(1, false)
 13    local stderr = vim.loop.new_pipe()
 14    should_be_alive = true
 15
 16    local handle, pid = vim.loop.spawn("ueberzug", {
 17 -    args = { "layer", "--silent" },
 18 +    args = { "layer", "--silent", "-o", "iterm2" },
 19      stdio = { stdin, stdout, stderr },
 20    }, function(code, signal)
 21      child = nil
 

I did not test it well, leaving this as an issue.

Base64 encode character "/" vs "-"

Commit 1e0a270 changes the base64 encode string "/" into "-". I'm wondering what this purpose is? I'm not super familiar with base64 but my understanding is the "/" is standard in the b64 alphabet.

I've been looking into how I setup direct-mode in kitty to allow for images to be displayed over a remote connection/ssh and reverting this allows this the images to be displayed. Does this somehow effect operation in file mode?

[perf] cache images for `only_render_image_at_cursor` and/or run async

When having fairly large images (e.g. different sizes of https://www.pexels.com/photo/scenic-view-of-mountains-during-dawn-1261728/) in a markdown document, nvim blocks when the cursor reaches the image line to process the image.

This could be improved by running the processing async such that one could still scroll over the image and by caching the result such that the processing doesn't have to happen again when the cursor reaches the line a second time.

https://github.com/stevearc/profile.nvim
image

Install magick with home-manager

For NixOS user using home-manager, magick can be installed in extraLuaPackages as follows. I think this is much simpler.

programs.neovim = {
  enable = true;
  package = pkgs.neovim-nightly;
  extraLuaPackages = ps: [
    ps.magick
  ];
};

Bug: possible to render outside of NeoVim

It's possible to render an image at the bottom of the screen that escapes into the rest of the terminal (that grey bar is the tmux bar).

image

It would be nice for image.nvim to be able to automatically crop images that are going to display outside of NeoVim. It would also be amazing if there was an option to autocrop images that would display over the status bar.

Updating of images is sporadic

If I add an image link in a markdown file, often the image doesn't appear until I load another file, and then go back to the original file.
The same happens when I delete an image link (the image doesn't disappear), but not if it's the last image link I added to the file.
(Version c91d47c)

[bug] Images in floating windows with boarders

Here is a rendered image with a window and buffer specified, and it has a position of x=0, y=1 (with 0 indexed rows). It displays fine in a window without borders, but the window relative positioning doesn't seem to account for borders, and it just draws the image over them.

image

I'm happy to submit a PR for this. I just want to check weather or not this is something you think image.nvim should handle, or if this is up to users to deal with. Personally I'd vote for respect window boarders as an on by default render option.

[FEATURE] Change filetype for image previewed buffers and export callback function

Hi, sorry for spamming you with feature requests lol.

While doing the integration to neo-tree I needed to detect the buffers that the images where loaded in.
And I would like to propose two feature requests regarding this issue.

1. Set vim.bo[buf].filetype to something plugin specific.

If you can set a filetype to the buffer on BufRead, it would be much easier to render the preview.

local buf = ...
vim.bo[buf].filetype = "image_nvim" -- or "image_nvim_png" etc would be nice too if possible

2. Export hijack buffer function to be called from outside.

It would be nice if I can call the hijack buffer code (basically the callback of the current autocmd) from outside as an API.

---@param path string
---@param win number? if nil or 0, uses current window
---@param buf number? if nil or 0, uses current buffer
---@param options ImageOptions?
api.hijack_buffer = function(path, win, buf, options)
  if not win or win == 0 then win = vim.api.nvim_get_current_win() end
  if not buf or buf == 0 then buf = vim.api.nvim_get_current_buf() end
  vim.bo[buf].modifiable = true
  vim.api.nvim_buf_set_lines(buf, 0, -1, true, { "" })

  vim.bo[buf].modifiable = false
  vim.bo[buf].buftype = "nowrite"
  vim.opt_local.colorcolumn = "0"
  vim.opt_local.cursorline = false
  vim.opt_local.number = false
  vim.opt_local.signcolumn = "no"

  -- vim.bo[buf].filetype = ...

  options = options or {}
  options.window = win
  options.buffer = buf
  local img = api.from_file(path, options)
  img:render()
  return img
end

Thanks in advance.

Konsole support?

Firstly thank you for your work on this plugin, especially for the Neorg integration.
I was curious about Konsole support, I was under the impression that Konsole is making use of the same protocols as Kitty, the "Terminal graphics protocol" but when I use Konsole the image is invisible. The box shows up, the spacing is there as if an image was rendered, if I make a new line the line is placed under where an image would be but there is no image rendered.

Not sure if this is a bug or if Konsole requires additional support. Hope you perhaps consider this regardless. Thanks

[bug] Window overlap causes image to disappear when it shouldn't

Here I have an image rendering with the markdown integration in the buffer. I have these two options set in my config:

window_overlap_clear_enabled = true, -- toggles images when windows are overlapped
window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" },

and the molten output window here does have a filetype, so it should cause the image to disappear if the two overlap.

My issue is that this output window wouldn't overlap the image if it didn't disappear, and in some cases never overlaps the area that was occupied by the image, so I don't think the image should be disappearing here.

screen_cap.mp4

My first guess would be, make sure we're checking against the rendered geometry instead of the full image size. But I'll look into this more tomorrow.

image rendered in md

os: Arch linux
terminal: foot
backend: ueberzug

with minimal config
image

with my config
image

with minimal config the place holder comes but no image is previewed

below is my config

-- Example for configuring Neovim to load user-installed installed Lua rocks:
package.path = package.path .. ";" .. vim.fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?/init.lua;"
package.path = package.path .. ";" .. vim.fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?.lua;"
local istatus, image = pcall(require, "image")
if not istatus then
  return
end
image.setup({
  backend = "ueberzug",
  integrations = {
    markdown = {
      enabled = true,
      sizing_strategy = "auto",
      download_remote_images = true,
      clear_in_insert_mode = false,
    },
    neorg = {
      enabled = true,
      download_remote_images = true,
      clear_in_insert_mode = false,
    },
  },
  max_width = nil,
  max_height = nil,
  max_width_window_percentage = nil,
  max_height_window_percentage = 50,
  kitty_method = "normal",
  kitty_tmux_write_delay = 10,         -- makes rendering more reliable with Kitty+Tmux
  window_overlap_clear_enabled = false, -- toggles images when windows are overlapped
  window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" },
})```

`luarocks --local --lua-version=5.1 install magick` used this command to install magick
and have `ueberzugpp` from aur
and imagemagick from arch repos

Images spawn on every tmux panes.

Hello and thanks for this, for the first time we are getting real images integration into Neovim !

I don't know if it's a bug of my own since it is not specified anywhere, but when opening md/norg files in neovim from tmux, the images are exactly as it should be in the files. But they also spawn into every tmux panes as a background also.

I have the last kitty/neovim/tmux versions with default setup for image.nvim and enabling the passthrough in tmux with "set -g allow-passthrough on"

[bug] Markdown integration breaks dynamic commentstring on nightly

I use comment.nvim to comment code with a keybind. This uses treesitter to determine the correct comment string to use for files like markdown, where you could be in a code block, and need a different comment string.

I have no idea why, but enabling the markdown integration breaks this dynamic comment string functionality. So in a markdown file it would only even comment with html style comments, even in code blocks.

This only affects nightly

Only render image when cursor over path?

Discussed in #14

Originally posted by niksingh710 August 31, 2023
is it possible to only render image when cursor is over path of the image as this will make ueberzug one faster?

Overlap with floating windows

Thanks a ton for this amazing plugin, already seems way more stable/reliable than what was before

NVIM v0.10.0-dev-429+g9f3c4c152-dirty + MacOS Ventura 13.4 M1 Max MBP + Kitty 0.28.1

Right now, images will just overlap with e.g. telescope or nvim-cmp.

Also, likely unrelated:

  • resizing kitty will make the image disappear.
  • large images are very slow to load
  • moving over large images (hjkl) will crash often neovim
20230705-183444

on the large image piece - this is often very much unintentionally large but these are images that are much smaller in the markdown. Maybe would be helpful to be able to define a default size that everything gets resized to? would work for many of my use cases

Thanks a ton for your hard work here ๐Ÿ™

Add to luarocks

Hey, I think you could add your nice plugin to luarocks so we can just luarocks install it alongside to its dependencies. You can use this awesome tool to automate almost the whole process for you (even creating the rockspec file iirc) :)

Cheers!

Magick rock not found

I am using POP OS, kitty, latest neovim nightly appimage

I installed magick with luarocks --local --lua-version=5.1 install magick, but when I try to run nvim --clean -c ":luafile minimal-setup.lua", I get

Error detected while processing User Autocommands for "VeryLazy":
image.nvim: magick rock not found, please install it and restart your editor

I'm not sure why, I checked and magick is indeed in ~/.luarocks/share/lua/5.1, maybe it's because the default installed lua is 5.3?

Geometry not respected

I cannot get image.nvim to respect options for width and height in image geometry. All attempts result in the image shrinking to a single character unit in width and height. I would expect it to snap to the closest multiple of the character unit (although it would be nice if more snapping options were available, like only snapping on one axis).

...

local geometry = { x = 0, y = 0, width = 1000, height = 1000 } -- no size works
local symbol = image.from_file("/home/user/image.png", {})
symbol:render(geometry)

Render image in statusline

Hi! Awesome plugin. Do you think there is a way to use this to render images on the statusline?
I've been looking for a way to have something like emacs's nyan-mode in neovim for a while now
and this plugin gives me hope.

Images jump around when the same buffer is open in a split and scrolled

Kitty terminal, using kitty graphics. This is in a markdown file with 5 images rendering at the same time, but it happens with only one image as well.
maybe a mild seizure warning.

2023-10-02.21-53-34.mp4

After trying this with only one image, it seems like it's due to the issue of extmarks belonging to a buffer, and when the buffer is scrolled, they're removed from the scrolled buffer, added back in the non-scrolled buffer, and removed and added and removed and added over and over again.

Ueberzug backend is so slow that is actually unusable

simplescreenrecorder-2023-07-05_01.24.44.mp4

Hi, first of all, thanks for making this great plugin!

I'm excited to test it out with ueberzug backend on alacritty, but as shown in the screen recording the rendering speed is so slow that I can hardly move my cursor around and scroll the window. There's also a lot flickering.

[bug] Image hijack does not work with `:vs`

Hi, thanks again for implementing the image preview feature for png etc files.

Please forgive me if I'm wrong, but as I was testing your code I think we need more events than only BufRead to work properly.

For example, when calling :vsplit, the image does not appear on the second window.

I guess we should use { "BufRead", "BufWinEnter" } to make this work?


To be exact, I believe this issue comes from the code below, where has_valid_filetype does not take options.hijack_file_patterns into account. But in real world, since the image buffer cannot be modified, we don't need for example CursorMoved, Insert*, nor opened as a new empty buffer (BufNew etc), which results in covering all cases with just BufRead, BufWinEnter?

local setup_autocommands = function(ctx)
local group_name = ("image.nvim:%s"):format(config.name)
local group = vim.api.nvim_create_augroup(group_name, { clear = true })
-- watch for window changes
vim.api.nvim_create_autocmd({ "WinNew", "BufWinEnter" }, {
group = group,
callback = function(args)
if not has_valid_filetype(ctx, vim.bo[args.buf].filetype) then return end
render(ctx)
end,
})
-- watch for text changes
vim.api.nvim_create_autocmd({ "BufAdd", "BufNew", "BufNewFile" }, {
group = group,
callback = function(args)
if not has_valid_filetype(ctx, vim.bo[args.buf].filetype) then return end
setup_text_change_watcher(ctx, args.buf)
render(ctx)
end,
})
if has_valid_filetype(ctx, vim.bo.filetype) then setup_text_change_watcher(ctx, vim.api.nvim_get_current_buf()) end
if ctx.options.only_render_image_at_cursor then
vim.api.nvim_create_autocmd({ "CursorMoved" }, {
group = group,
callback = function(args)
if not has_valid_filetype(ctx, vim.bo[args.buf].filetype) then return end
render(ctx)
end,
})
end
if ctx.options.clear_in_insert_mode then
vim.api.nvim_create_autocmd({ "InsertEnter" }, {
group = group,
callback = function(args)
if not has_valid_filetype(ctx, vim.bo[args.buf].filetype) then return end
local current_window = vim.api.nvim_get_current_win()
local images = ctx.api.get_images({ window = current_window })
for _, image in ipairs(images) do
image:clear()
end
end,
})
vim.api.nvim_create_autocmd({ "InsertLeave" }, {
group = group,
callback = function(args)
if not has_valid_filetype(ctx, vim.bo[args.buf].filetype) then return end
render(ctx)
end,
})
end
end

[bug] images stick around when rapidly adding and removing them

Another mild seizure warning.

Here, I have an image that renders in a floating window, and that floating window is shown only when the cursor is in the code cell here. I've setup a macro that presses kj to enter the cell (making the window with an image show) and then leave it immediately. I then execute that macro 50 times, and this causes images to hang around after the window is closed.

Interestingly, I see different behavior when I'm in tmux. In tmux only occasionally do I see "ghost characters" that get drawn instead of staying behind the scenes as image protocol commands. These chars go away when I move my cursor over the line they're on.

2023-10-05.23-41-54.mp4

I'm not concerned about getting this fixed at all. I highly doubt that anyone would encounter this unless they were intentionally trying to do it (at least, I can't get it to happen in normal use) but perhaps someone on older hardware or a system under load would encounter this.

Trouble with the magick rock

I'm on MacOS on apple silicon (unsure if that's relevant)

I've installed the magick rock with luarocks --local --lua-version 5.1 install magick

I added

package.path = package.path .. ";" .. vim.fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?/init.lua;"
package.path = package.path .. ";" .. vim.fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?.lua;"

to my nvim/init.lua file, and I've checked that the magick folder exists at ~/.luarocks/share/lua/5.1/magick

However, I don't have anything other than the magick/ folder in the ~/.luarocks/share/lua/5.1/ directory. This concerns me b/c it seems from the package.path code above that there should be a lua file there (but I have no idea).

I have ImageMagic via brew, the which magick => /opt/homebrew/bin/magick

Despite all of this, I still get this error when I launch nvim:

Error detected while processing /Users/benlubas/github/.dotfiles/nvim/init.lua:
image.nvim: magick rock not found, please install it and restart your editor

I've also tried with both nvim 9.2, and the latest nightly. same error.
I've also tried the minimial-setup.lua file in this repo.

[Bug] Splitting tmux window makes images mis-positioned

Environment:

  • Terminal: kitty 0.29.2 + tmux 3.3a (with allow-passthrough on)
  • Neovim: NVIM v0.10.0-dev-1334+gd2d38858d1
  • image.nvim: 1cb60be1cdc108e3a3b09cb0ed115ef75ce51320
  • OS: Linux 6.1.58-1-lts

Minimal plugin config:

require('image').setup({
  backend = 'kitty',
  window_overlap_clear_enabled = true,
  tmux_show_only_in_active_window = true,
})

Steps to reproduce:

  1. Open kitty terminal

  2. Execute tmux

  3. Using nvim with image.nvim installed and configured to open a markdown file with contents

    ![ConvExample](https://stanford.edu/~shervine/teaching/cs-230/illustrations/convolution-layer-a.png?1c517e00cb8d709baf32fc3d39ebae67)
    
    For a convolutional operation, the stride 
    **S** denotes the number of pixels by which the window moves after each operation.
    ![StrideExample](https://stanford.edu/~shervine/teaching/cs-230/illustrations/stride.png?36b5b2e02f7e02c3c4075a9d836c048c)
  4. Split current tmux window horizontally or vertically

  5. Images get misplaced

Screenshots:

  • Before splitting:

    Screenshot_20231024_154533

  • After splitting (first image goes to the new tmux pane at bottom, second image disappears):

    Screenshot_20231024_154552

Bug: Moving images horizontally is much faster than moving them across lines

2023-09-24.13-29-59.mp4

see the gif for what I mean. I haven't looked at the code, but I would guess this has something to do with the way the markdown integration keeps track of images.

It seems like when moving an image to a new line, it's considered a new image and the data has to be sent to the terminal again (which takes a significant amount of time for larger image).

This issue is just to document the problem. I'd imagine it would also affect the neorg integration

[FEATURE] Visualize image files inside the buffer.

Hi, introduced by the neorg community, I'm having a wonderful time with your plugin!

I was wondering if this plugin could be extended to visualizing png, jpg etc images.
When opening images inside neovim, currently it just displays binary junk but it would be awesome if this plugin could hijack the buffer and display the actual image.

I found this plugin: https://github.com/samodostal/image.nvim which uses ascii chars to do something similar.

I would love to hear your opinion. Thanks in advance.

Image not cleared after switching tmux window

After some exploration I found another issue that after switching tmux window the image in the previous window is not cleared.

Here is a short screen recording that demonstrate it:

Peek.2023-10-24.11-46.mp4

Environment:

  • Terminal: kitty 0.29.2 + tmux 3.3a (with allow-passthrough on)
  • Neovim: NVIM v0.10.0-dev-1334+gd2d38858d1
  • image.nvim: 1cb60be1cdc108e3a3b09cb0ed115ef75ce51320
  • OS: Linux 6.1.58-1-lts

Plugin config:

package.path = table.concat(
  {
    package.path,
    vim.fs.normalize('~/.luarocks/share/lua/5.1/?/init.lua'),
    vim.fs.normalize('~/.luarocks/share/lua/5.1/?.lua'),
  },
  ';'
)

require('image').setup({
  window_overlap_clear_enabled = true
})

Inconsistent Cropping Behavior

Discussed in #38

Originally posted by benlubas October 9, 2023
I just have a question about the way cropping works when an image is too big to fit where it's placed.

I feel like I've seen two behaviors:

  1. The image gets cropped and you only see part of it, but it's aspect ratio stays the same, but part of it is missing
  2. the image gets shrunk, and you can still see the entire thing, but it get's smaller and smaller

number two is the behavior that I've seen more recently, and I'm wondering what has changed, is that a kitty thing? or something that the plugin is doing? I see that the kitty backend in this plugin has the "crop" feature, so I'm guessing that this is something kitty is doing, and the other behavior was the way image magick was cropping images.

I do prefer behavior 1, where it just shows part of the image and I have to scroll to see the rest. Is there currently a way to configure the plugin to use that behavior with kitty?

[Request] Expose `renderer.adjust_to_aspect_ratio`

I think this, or something similar, would make a good addition to the API. I've come across a situation where I'd like to know the rendered size of an image (accounting for user settings) before I actually render it.

Given that all the information this function needs is exposed to the user in some way or another before render is called, I could just duplicate this logic in my own plugin. But then if this logic changes (which it may, given that it currently squishes images to align to the terminal grid) then I (and potentially others) would need to change things.

This change could be as simple as adding the function to the return statement in renderer.lua, or we could potentially make a nicer function on image itself that calculates the same information, such as img:rendered_size() without needing to take a bunch of arguments.

Thoughts?

[Feature] Allow to disable integration's autocommand and use integration's render

Hi. Thank you for your wonderful plugin.

Can you add a option to disable integration's autocommand setup and expose integrations's render(not image's render)? In this way, users can control the timing of render by themselves.

For example, I want to use the shortcut key to trigger whether to display the images under this file or cursor.

[bug] Image Flashing in floating windows

one of the changes in 440aee9 made it so that images in floating windows flash rapidly. It happens with the latest version of master as well. I see this on nightly and stable versions of neovim

screen_cap.mp4

Forcing image aspect ratio to align with terminal grid

Continuing conversation from #20.

To recap, the current implementation forces images to alight with the grid. So let's say you have a grid size of 5px wide by 10px tall. and an image that is 5px by 14px, the image would be displayed as a 5px by 10px image, as it's forced to align with the cell. This effect becomes less and less noticeable as images get larger, but it's still been very noticeable for me in regular use.

It would be great if we could just not force the image into the terminal grid. So if an image was (like in the example from above) 4px taller than a cell, it would take up an extra vertical cell, but only use 4 pixels of it.

I'm not too familiar with image protocols, but I'd imagine they're able to do this by just padding the edge of an image with transparent pixels.

adjust_to_aspect_ratio ignores max_width/height

In the renderer, we crush the image down to max_width and max_height before fixing the aspect ratio. In fixing the aspect ratio, we then ignore the max width/height allowing one of the max values to be exceeded.

This problem I think is made worse by choosing to keep the larger of the width and height and adjust the smaller value? Just fixing this issue made the max_width/height values behave pretty much how I expected them to, although I know there are edge cases that need a more thorough solution.

I think that more thorough solution would be to keep the value that gets reduced the most. This way the other value with always shrink, and therefore cannot exceed it's max value.

I'm happy to submit a PR if the things that I'm saying make sense.

When `&wrap` is set image location is miscalculated

Firstly, thanks for you effort on this amazing plugin!

A small bug I found when playing with it is that when &wrap is set and there is a wrapped long line before the image, the image position will be miscalculated, here are some screenshots:

No wrap:

image

After :set wrap:

image

Could we take &wrap into consideration when calculating the image position? In addition, some options, such as &soothscroll, &breakindent, &breakindentpot, &linebreak can affect the visual height of a single logic line.

Images not displayed

Hi, super exciting to see some progress on the images-in-vim front! This is something I've been wanting for quite some time now. I installed and tried it out, but no matter what I do I can't seem to get the images to show up.

Screenshot 2023-07-11 at 6 47 40 PM

Some things I've tried:

  • I confirmed that ImageMagick is installed
  • I confirmed that the magick rock is installed and in my rtp
  • I inspected the cropped images in the tmp dir and they appear to be correct, normal pngs
  • I'm using entirely the default options (so, kitty backend)
  • I tried running in bare kitty and also tmux-in-kitty with passthrough on
  • I tried this on MacOS and Linux; got the same behavior on both
  • I confirmed that kitty +kitten icat <image> does show the image in the terminal
  • I tried the nvim --clean -c ":luafile minimal-setup.lua"

I created a minimal repro config file

local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "runtime", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "--single-branch",
    "https://github.com/folke/lazy.nvim.git",
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

-- Add luarocks to rtp
local home = vim.loop.os_homedir()
package.path = package.path .. ";" .. home .. "/.luarocks/share/lua/5.1/?/init.lua;"
package.path = package.path .. ";" .. home .. "/.luarocks/share/lua/5.1/?.lua;"

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  { "3rd/image.nvim", opts = {} },
  {
    "nvim-treesitter/nvim-treesitter",
    build = ":TSUpdate",
    config = function()
      require("nvim-treesitter.configs").setup({
        ensure_installed = {
          "markdown",
          "markdown_inline",
        },
      })
    end,
  },
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")

And if I run it with nvim -u repro.lua on the test file

# Hello World

![This is a remote image](https://gist.ro/s/remote.png)

it reproduces the issue. No images.
Any ideas what's going on?

Feature: Gif Support

I don't know how feasible this would be (I haven't done too much neovim/lua dev), but I saw that ImageMagick has gif based functions. Would adding gif support be in the scope of this project? If this isn't, I'll see if I can get it working just by rendering each frame individually.

Add LICENSE

Would be cool if this repository had a license. MIT would be nice similar to hologram.nvim.

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.