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
497 stars 27 forks source link

[FIXED] [Bug] kernel does not start #225

Closed MrMic closed 1 week ago

MrMic commented 3 weeks ago

Hi,

Any idea what is wrong?

Rgds,

Capture d’écran du 2024-08-22 10-32-19

Capture d’écran du 2024-08-22 10-33-18

Capture d’écran du 2024-08-22 10-43-10

benlubas commented 3 weeks ago

What operating system? Did you run :UpdateRemotePlugins? Does it work if you disable whatever is changing your selection menu?

MrMic commented 3 weeks ago
benlubas commented 3 weeks ago

oh right. Astro.

Look up what plugin is changing your vim.ui.select menu and disable it. (You might have to ask in their discord). It's probably dressing.nvim. I'd be surprised if that fixes it but I want to rule it out.

I also want to make sure you're on the latest version of molten.

MrMic commented 3 weeks ago

The config is as follow:

---@type LazySpec
return {
  "benlubas/molten-nvim",
  cmd = {
    "MoltenInfo",
    "MoltenInit",
    "MoltenDein",
    "MoltenGoto",
    "MoltenNext",
    "MoltenPrev",
    "MoltenEvaluateLine",
    "MoltenEvaluateVisual",
    "MoltenEvaluateOperator",
    "MoltenEvaluateArgument",
    "MoltenReevaluateCell",
    "MoltenDelete",
    "MoltenShowOutput",
    "MoltenHideOutput",
    "MoltenEnterOutput",
    "MoltenInterrupt",
    "MoltenOpenInBrowser",
    "MoltenImagePopup",
    "MoltenRestart",
    "MoltenSave",
    "MoltenLoad",
    "MoltenExportOutput",
    "MoltenImportOutput",
  },
  version = "^1", -- use version <2.0.0 to avoid breaking changes
  build = ":UpdateRemotePlugins",
  dependencies = {
    "AstroNvim/astrocore",
    opts = function(_, opts)
      if not opts.mappings then opts.mappings = {} end
      local prefix = "<leader>m"

      opts.mappings.n[prefix .. "mi"] = { "<Cmd>MoltenInit<CR>", desc = "Initialize the plugin" }
      opts.mappings.n[prefix .. "e"] = { "<Cmd>MoltenEvaluateOperator<CR>", desc = "Run operator selection" }
      opts.mappings.n[prefix .. "rl"] = { "<Cmd>MoltenEvaluateLine<CR>", desc = "Evaluate line" }
      opts.mappings.n[prefix .. "rr"] = { "<Cmd>MoltenReevaluateCell<CR>", desc = "Re-evaluate cell" }
      opts.mappings.v[prefix .. "r"] = { ":<C-u>MoltenEvaluateVisual<CR>gv", desc = "Evaluate visual selection" }
    end,
  },
}

No dressing.nvim plugin.

benlubas commented 3 weeks ago

Part of astro core is changing the default vim.ui.select then.

I'd also suggest removing the cmd = part for now, just to make sure that's not interfering with it.

MrMic commented 3 weeks ago

Am I supposed to do something? Do you think you're going to fix your app to make it work?

benlubas commented 2 weeks ago

We'll see the thing is. It does work. For me. And everyone else. So you need to help me reproduce the issue you're having so that I can fix it.

Give me a reproduction with as few plugins as possible (Astro core counts as a ton of plugins), and I'll look into it when I have time.

I'm very busy with life right now so I can't promise when that will be.

mehalter commented 1 week ago

@benlubas you are correct with your suggestion. It is just the plugin not playing well with lazy loading on command. Removing the cmd makes it work perfectly. This can be closed.

MrMic commented 1 week ago

Indeed this works now.