supermaven-inc / supermaven-nvim

The official Neovim plugin for Supermaven

Home Page:https://supermaven.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Supermaven "Error starting binary" in AstroNvim & LunarVim(Lazy.nvim)

ARKye03 opened this issue · comments

I added this in supermaven.lua in plugins dir(According to this):

-- if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
return {
  {
    "supermaven-inc/supermaven-nvim",
    config = true,
  },
}

It installs supermaven(And adds the corresponding commands for its usage), but it doesn't work and returns "Error starting binary" every time I type(and when I start AstroNvim) and nothing more, the logs says nothing, I had the same error in LunarVim. Thanks in advance!
System Info:

  • Arch Linux

  • nvim --version

    • NVIM v0.10.0
    • Build type: Release
    • LuaJIT 2.1.1713773202
  • Latest AstroNvim

On LunarVim I added this line:

require("lazy").setup({
    {
      "supermaven-inc/supermaven-nvim",
      config = function()
        require("supermaven-nvim").setup({})
      end,
    },
}, {})

And didn't work either, the error was the same as AstroNvim. In both cases I'm using Lazy.nvim

I just tested it out on a MacOS 14.5 with default AstroNvim download, just adding lua/plugins/supermaven.lua with the config provided in the issue, and had no problems. I will check later in a Manjaro that I have.

Neovim version:

NVIM v0.10.0
Build type: RelWithDebInfo
LuaJIT 2.1.1713484068

The issue is triggered at:

function BinaryLifecycle:start_binary(ignore_filetypes)
self.ignore_filetypes = ignore_filetypes
self.stdin = loop.new_pipe(false)
self.stdout = loop.new_pipe(false)
self.stderr = loop.new_pipe(false)
self.last_text = nil
self.last_path = nil
self.last_context = nil
self.wants_polling = false
self.handle = loop.spawn(binary_path,
{
args = {
"stdio"
},
stdio = {self.stdin, self.stdout, self.stderr},
},
function(code, signal)
print("sm-agent exited with code " .. code)
self.handle:close()
self.handle = nil
end
)
if not self.handle then
print("Error starting binary")
end
self:read_loop()
self:greeting_message()
end

If it only says Error starting binary, try changing it locally from print("Err...") to error("Err...", vim.log.levels.ERROR) to see the stacktrace in case it reveals something else.

I have a NixOS laptop with lunarvim in it, there the plugin works as expected. So I'll take a guess and say that the issue is on my main PC with Arch Linux, however I can't find such conflict, once I get home I'll try "debug" that piece of code.

In Arch Linux, I'm encountering the same error even after attempting to downgrade Lua and Neovim. Could it be that the Supermaven binary has dependencies which is missing on my system?

Hey, the problem disappeared once I deleted the .supermaven folder (using rm -rf ~/.supermave). Neovim downloaded a new binary upon opening, and now everything's functioning smoothly.

Hey, the problem disappeared once I deleted the .supermaven folder (using rm -rf ~/.supermave). Neovim downloaded a new binary upon opening, and now everything's functioning smoothly.

Well, it worked for me too, thanks I can finally use supermaven on Arch