benlubas / molten-nvim

A neovim plugin for interactively running code with the jupyter kernel. Fork of magma-nvim with improvements in image rendering, performance, and more
GNU General Public License v3.0
626 stars 33 forks source link

[Bug] <Blinking cursor> #253

Open TomasRojoBiran opened 1 month ago

TomasRojoBiran commented 1 month ago

Hello, i dont want to lose your time, this is a pretty simple bug and i prefer to just tell you what is happen, i use the block cursor in insert mode in neovim, i have been testing different things, options, but i cannot get the answer right. I use Alacritty as terminal with zsh. I use Arch (btw), and neovim is the latest version, python the same.

The problem is that the cursor blinks when i have the output open, only when the output of a cell is open it starts blinking, if i close the output it stops.

The behavior that i expect is obivously that it shouldn be blinking, and i checked the alacritty configs, set blinking to 0, and played with a lot of different options from molten and nothing, could you help me with this please? i am using image.nvim and ueberzug as backend this is my molten config:

return { -- Molten.nvim plugin for Jupyter integration "benlubas/molten-nvim", run = ":UpdateRemotePlugins", dependencies = { -- Image.nvim for image rendering { "3rd/image.nvim", config = function() -- Image.nvim setup with ueberzugpp backend for Alacritty require('image').setup({ backend = "ueberzug", -- Use ueberzugpp as the backend integrations = { markdown = { enabled = true, download_remote_images = true, }, neorg = { enabled = true, }, }, -- Adjust image size to make it medium-sized max_height_window_percentage = 70, -- Use 70% of the window height max_width_window_percentage = 70, -- Use 70% of the window width

      -- Fix flickering and unwanted re-rendering
      only_render_image_at_cursor = true,  -- Only render image when the cursor is on it

      -- Ensure images are cleared when windows overlap
      window_overlap_clear_enabled = true, 
    })
  end,
}

}, config = function() -- Molten-nvim setup vim.g.molten_image_provider = "image.nvim" -- Set image provider vim.g.molten_auto_open_output = true -- Automatically open outputs end, }

benlubas commented 1 month ago

I see this behavior too. It hasn't always been like that. I'm not sure what changed. You could bisect way back in time to find the commit that introduced it if you want a place to start.

TomasRojoBiran commented 1 month ago

Oh, ok so you also have the same behavior right now, your cursor blinks too?

benlubas commented 1 month ago

Yup. I think there's some code re-rendering the image or float over and over when it shouldn't. I'm not sure why or where though. I haven't had time to look into it

TomasRojoBiran commented 1 month ago

ohh, ok, no worries, its just a detail, now i do have another i guess more important bug, and i will send you here the things, but i dont know if you would need me to open another issue, the thing is basically that the outputs open really small or dont even open when they are at the end or close to the end of the file, i guess it is because the output window doesnt have space? but i have tried some different settings and i cant get around it, i am using image.nvim, could you help me out with this one?

this is my config right now: return { -- Molten.nvim plugin for Jupyter integration "benlubas/molten-nvim", run = ":UpdateRemotePlugins", dependencies = { -- Image.nvim for image rendering { "3rd/image.nvim", config = function() -- Image.nvim setup with ueberzugpp backend for Alacritty require('image').setup({ backend = "ueberzug", -- Use ueberzugpp as the backend integrations = { markdown = { enabled = true, download_remote_images = true, }, neorg = { enabled = true, }, }, -- Adjust image size and make it adaptable max_height_window_percentage = 80, -- 80% of the window height max_width_window_percentage = 80, -- 80% of the window width

      -- Disable rendering only at the cursor to ensure images below are shown
      only_render_image_at_cursor = false, 

      -- Automatically clear overlapping images when moving between windows
      window_overlap_clear_enabled = true,
  })

end, } }, config = function() -- Molten-nvim setup vim.g.molten_image_provider = "image.nvim" -- Set image provider for Molten.nvim vim.g.molten_auto_open_output = true -- Automatically open outputs from Jupyter

end, }

image image image

benlubas commented 1 month ago

Yeah it's b/c there's no space. just scroll up so there's space