Open xuwei152 opened 5 months ago
Hey, do you use any kind of tab bar / breadcrumbs thing?
Yes, I have installed lualine.nvim. Other loaded plugins are listed as follows:
Total: 105 plugins
Loaded (80)
â alpha-nvim 15.92ms îȘ VimEnter
â bigfile.nvim 52.18ms îȘ BufReadPre
â bufferline.nvim 25.05ms îȘ User FileOpened
â cmp-buffer 21.45ms ï nvim-cmp
â cmp-bufname 29.38ms îȘ VeryLazy
â cmp-cmdline 23.37ms ï nvim-cmp
â cmp-dictionary 21.95ms îȘ VeryLazy
â cmp-fuzzy-path 174.08ms îȘ VeryLazy
â cmp-git 23.76ms îȘ InsertEnter
â cmp-latex-symbols 36.26ms ï markdown
â cmp-nvim-lsp 17.28ms ï nvim-cmp
â cmp-omni 16.59ms îȘ InsertEnter
â cmp-path 19.76ms ï nvim-cmp
â cmp_luasnip 33.53ms ï nvim-cmp
â coc.nvim 80.99ms îȘ InsertEnter
â Comment.nvim 16.46ms îȘ User FileOpened
â fittencode.nvim 61.95ms îȘ InsertEnter
â friendly-snippets 22.39ms ï LuaSnip
â fuzzy.nvim 1.73ms ï cmp-fuzzy-path
â fzf 6.24ms ï fzf.vim
â fzf.vim 13.08ms î« start
â gitsigns.nvim 22.86ms îȘ User FileOpened
â hop.nvim 25.39ms îŻ HopChar1
â http.nvim 11.71ms îȘ VeryLazy
â image.nvim 174.54ms ï markdown
â indent-blankline.nvim 13.3ms îȘ User FileOpened
â latex-unicoder.vim 1.48ms ï markdown
â latex.nvim 0.62ms ï markdown
â lazy.nvim 34.75ms ïĄ init.lua
â leap.nvim 24.25ms îȘ VeryLazy
â lspkind.nvim 4.28ms î« start
â ltex-client.nvim 14.39ms îȘ VeryLazy
â lualine.nvim 69.13ms îȘ VimEnter
â LuaSnip 171.2ms ó°ą± luasnip.loaders.from_lua ï LuaSnip
â mason-lspconfig.nvim 28.7ms ï nvim-lspconfig
â mason.nvim 15.64ms ï mason-lspconfig.nvim
â mkdnflow.nvim 24.25ms ï markdown
â nlsp-settings.nvim 1.32ms ï nvim-lspconfig
â none-ls.nvim 1.07ms ó°ą± null-ls.rpc ï none-ls.nvim
â nvim-autopairs 25.8ms îȘ InsertEnter
â nvim-cmp 143.54ms ï cmp-fuzzy-path
â nvim-lastplace 12.53ms îȘ BufRead
â nvim-lspconfig 34.92ms ï nvim-texis
â nvim-markdown 7.33ms ï markdown
â nvim-navic 10.42ms îȘ User FileOpened
â nvim-neoclip.lua 22.76ms îȘ VeryLazy
â nvim-texis 41.58ms î« start
â nvim-treesitter 47.54ms ï bigfile.nvim
â nvim-treesitter-context 63.22ms îȘ VeryLazy
â nvim-ts-context-commentstring 11.58ms ó°ą± ts_context_commentstring.integrations.comment_nvim ïĄ /home/xuwei/Trash/lunarvim/lvim/lua/lvim/core/comment.lua
â nvim-ufo 22.12ms îȘ VeryLazy
â nvim-web-devicons 1.6ms ó°ą± nvim-web-devicons ïĄ /home/xuwei/Trash/lunarvim/lvim/lua/lvim/core/breadcrumbs.lua
â nvim-window 16.98ms îȘ VeryLazy
â nvim_context_vt 3.29ms îȘ VeryLazy
â onedarker.nvim 60.71ms î« start
â plenary.nvim 1.76ms ó°ą± plenary.path ï telescope.nvim
â promise-async 10.98ms ï nvim-ufo
â rainbow-delimiters.nvim 24.92ms î« start
â snippet-converter.nvim 42.66ms îȘ VeryLazy
â spelunker.vim 18.91ms îȘ VeryLazy
â tabular 38.35ms îȘ InsertEnter
â telescope-bibtex.nvim 41.56ms îȘ VeryLazy
â telescope-fzf-native.nvim 11.71ms ï telescope.nvim
â telescope-luasnip.nvim 201.28ms îȘ VeryLazy
â telescope.nvim 118.11ms ó°ą± telescope ï telescope-luasnip.nvim
â todo-comments.nvim 25.2ms îȘ VeryLazy
â trouble.nvim 1.7ms ó°ą± trouble ïĄ lua
â vim-conceal 0.76ms îȘ VeryLazy
â vim-cursorword 29.55ms îȘ VeryLazy
â vim-custom-surround 2.14ms îȘ VeryLazy
â vim-devicons 4.91ms îȘ VeryLazy
â vim-diminactive 2.89ms îȘ VeryLazy
â vim-easymotion 5.4ms îȘ InsertEnter
â vim-illuminate 15.81ms îȘ User FileOpened
â vim-surround 2.22ms îȘ InsertEnter
â vim-tmux-navigator 1.96ms îȘ VeryLazy
â vim-zoom 3.04ms îȘ VeryLazy
â vimtex 7.07ms î« start
â which-key.nvim 55.8ms îȘ VeryLazy
â zoomwintab.vim 2.11ms îȘ VeryLazy
Maybe an option to give the image an initial global rendering offset would be a good idea it just needs an offset of 2 columns down to be "corrected" assuming because of the barbar + breadcrums extension, also The autocmd of the image render at buffer change doesn't work well for me as I have to close and reopen nvim to have the images refreshed in md files, so maybe exposing a function to refresh all images on scene'd useful as well,
BTW It maybe because I don't have sufficient knowledge in lua but how do to access each individual image rendered in markdown? (in what array / through what method etc...
Yes, will add a global offset option, will also try to monitor when something like barbar mounts, the issue if I remember was that it's not there when we check for it.
The integration (https://github.com/3rd/image.nvim/blob/master/lua/image/integrations/markdown.lua) extracts the and creates images, you can use .get_images()
to query them: https://github.com/3rd/image.nvim/blob/a2a0849e0b3dbed90f9283603cedb683bda5d4d1/lua/image/init.lua#L411
BTW a quick and dirty way to offset the image 2 column down is to go to "~/.local/share/nvim/lazy/image.nvim/lua/image/utils/offsets.lua" and change line 22 from:
local y = 0
to
local y = 2
Altough is mostly corrected the problem it requires a new line of spacing in order not to obstruct the content belowe it which is covers half a column below it more than then size of the picture after the 2 column offset but now it's workable 1 extra column that's also serve as spacing is acceptable for now, Now displaying svg's I noticed the rendering doesn't take into account the opacity value for some reason... any quick fix for that? or that requires diving into the image drivers bit?
It is quite weird that some of the pictures are placed properly.
Therefore, the modification of the offset cannot fix the problem.
It is quite weird that some of the pictures are placed properly.
Therefore, the modification of the offset cannot fix the problem.
Are there specific image files you have that display properly?
Yes, some images are displayed properly. One of them is shown as below.
It is quite weird that some of the pictures are placed properly.
Therefore, the modification of the offset cannot fix the problem.
I have moved the image that are displayed improperly to other places and then it is placed correctly. I guess the problem is related to text surrounding the image.
BTW a quick and dirty way to offset the image 2 column down is to go to "~/.local/share/nvim/lazy/image.nvim/lua/image/utils/offsets.lua" and change line 22 from:
local y = 0
tolocal y = 2
Altough is mostly corrected the problem it requires a new line of spacing in order not to obstruct the content belowe it which is covers half a column below it more than then size of the picture after the 2 column offset but now it's workable 1 extra column that's also serve as spacing is acceptable for now, Now displaying svg's I noticed the rendering doesn't take into account the opacity value for some reason... any quick fix for that? or that requires diving into the image drivers bit?
ImageMagick is the issue for transparency, I'm working on a complete replacement for it.
Yes, some images are displayed properly. One of them is shown as below.
It is quite weird that some of the pictures are placed properly.
Therefore, the modification of the offset cannot fix the problem.
I have moved the image that are displayed improperly to other places and then it is placed correctly. I guess the problem is related to text surrounding the image.
I think in all cases it's caused by tab bar handling, will look into it.
I have a similar issue, apparently caused by concealed wrapped lines. The attached markdown file should be a minimal example (you must ensure that the width of the terminal is less than the length of the URLs).
The position of pictures is not corrected, shown as pic below
The plugin is install with lazy.nvim with the configuration shown below
Environment: