-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Render HTML images in markdown files #234
Comments
Nice, I just tested it and it works, so it was there all along, sorry! integrations = {
-- This is disabled by default
-- Detect and render images referenced in HTML files
-- Make sure you have an html treesitter parser installed
-- ~/github/dotfiles-latest/neovim/neobean/lua/plugins/treesitter.lua
html = {
enabled = true,
only_render_image_at_cursor = true,
-- Enabling "markdown" down here allows you to view html images in
-- markdown files
filetypes = { "html", "xhtml", "htm", "markdown" },
}, Again, thanks for all your time and work @3rd, this can be closed |
Error 04:59:13 msg_show.lua_error Error executing vim.schedule lua callback: ...eovim/0.10.2_1/share/nvim/runtime/lua/vim/treesitter.lua:198: Index out of bounds
stack traceback:
[C]: in function 'nvim_buf_get_text'
...eovim/0.10.2_1/share/nvim/runtime/lua/vim/treesitter.lua:198: in function 'get_node_text'
...0.10.2_1/share/nvim/runtime/lua/vim/treesitter/query.lua:273: in function 'handler'
...0.10.2_1/share/nvim/runtime/lua/vim/treesitter/query.lua:767: in function 'fn'
...im/0.10.2_1/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in function 'match_preds'
...0.10.2_1/share/nvim/runtime/lua/vim/treesitter/query.lua:883: in function '(for generator)'
.../neobean/lazy/image.nvim/lua/image/integrations/html.lua:25: in function 'query_buffer_images'
...are/neobean/lazy/image.nvim/lua/image/utils/document.lua:45: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
html = {
enabled = true,
only_render_image_at_cursor = true,
-- Enabling "markdown" below allows you to view html images in .md files
-- https://github.com/3rd/image.nvim/issues/234
-- filetypes = { "html", "xhtml", "htm", "markdown" },
filetypes = { "html", "xhtml", "htm" },
},
|
Hey, that's very interesting! Didn't expect the html parser to have any issues with markdown files, do you have a sample file? |
If I open an HTML or CSS file I can render the images in them because of these options
So in my html file I do see the following image rendered
But if in a markdown file, I cannot render HTML images, is it possible to have the option, to render HTML images in markdown files? I guess not everyone would like to have it on by default
I originally asked about this in discord
16 days ago
, and I said I would open this issue in a "little while", this is a little while 🤣 (sorry but my procrastinating skills and random change in priorities don't allow me to focus)The text was updated successfully, but these errors were encountered: