Skip to content

fix(image): use vim.fs to normalize path - #2920

Open
curbe454 wants to merge 1 commit into
folke:mainfrom
curbe454:image-fix
Open

fix(image): use vim.fs to normalize path#2920
curbe454 wants to merge 1 commit into
folke:mainfrom
curbe454:image-fix

Conversation

@curbe454

@curbe454 curbe454 commented Jul 26, 2026

Copy link
Copy Markdown

I found that Snacks.image.langs() always returned empty table on Windows, which makes me unable to render LaTeX equations by Snacks.image.hover(). This is because '/' is hard encoded while Windows use '\' as path separator:

local queries = vim.api.nvim_get_runtime_file("queries/*/images.scm", true)

Yet another line:

cache = vim.fn.stdpath("cache") .. "/snacks/image",

@github-actions github-actions Bot added image size/s Small PR (<10 lines changed) labels Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

image size/s Small PR (<10 lines changed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant