supermaven-inc / supermaven-nvim

The official Neovim plugin for Supermaven
https://supermaven.com/
MIT License
466 stars 21 forks source link

bug: creates `.supermaven/config.json` on every startup #74

Closed aarondill closed 1 month ago

aarondill commented 1 month ago

Recently, this plugin has begun creating ./.supermaven/config.json if it doesn't exist (relative to CWD). It also forces the user to call :SupermavenUseFree each time this file is created, rather than creating/using ~/.supermaven/config.json. Note that downloaded binaries are still stored in ~/.supermaven/config.json.

I suspect this is an upstream problem (with sm-agent), however there's no available bug tracker for the upstream.

jvanja commented 1 month ago

I can confirm this bug. It started happening after the latest plugin update.

jsnanigans commented 1 month ago

same here, I almost pushed the config.json to my public repo. I get that it might be useful to have a config for each project, but maybe let us set a default path to the plugin config that it can use if there is none in the project directory. and dont force it

jsnanigans commented 1 month ago

Maybe this can help others, until this is fixed, you can define the exact version of the plugin. If you are also using Lazy, then add this specific version from the commit before SM_EDITOR = "neovim" was set:

  {
    'supermaven-inc/supermaven-nvim',
    commit = 'df3ecf7',
    config = function()
      require('supermaven-nvim').setup {
Redoxahmii commented 1 month ago

Same bug almost committed it to repo and this prompts for me in every folder i open.

pkdevel commented 1 month ago

also your aggressive popup, reminding me of this issue whenever i open nvim in a new folder 👎 its not only pissing me off, there's also no need to constantly force open that popup. you might want to consider changing that behaviour

aarondill commented 1 month ago

Maybe this can help others, until this is fixed, you can define the exact version of the plugin. If you are also using Lazy, then add this specific version from the commit before SM_EDITOR = "neovim" was set:

  {
    'supermaven-inc/supermaven-nvim',
    commit = 'df3ecf7',
    config = function()
      require('supermaven-nvim').setup {

@jsnanigans I tried that, but it doesn't seem to work for me. That's why I suspect this was changed in sm-agent, rather than the nvim plugin directly.

mirsella commented 1 month ago

@aarondill works for me, make sure to update the plugin, maybe delete the install folder and reinstall. the commit which fix it for most of us (https://github.com/supermaven-inc/supermaven-nvim/commit/c5bb0490bdfc36a7841e5b82c8f6b92b5b8beef3) just pass a new environment variable to sm-agent, so indeed it's probably that

aarondill commented 1 month ago

I forgot to actually "update" the plugin :facepalm:. It works now, thanks.

Z1NGOD commented 1 month ago

@aarondill Hey mate, could you please tell me what you did to fix the issue? I updated the plugin but it still creates .supermaven/config.json on every startup

aarondill commented 1 month ago

I added the commit from jsnanigans' comment, then opened lazy and deleted the plugin (press x), then exited nvim and ran rm -r ~/.supermaven/, reopened nvim and ran :SupermavenUseFree.

pankajgarkoti commented 1 month ago

just running Lazy update works too

On Wed, 17 Jul 2024 at 3:47 PM, Aaron Dill @.***> wrote:

I added the commit from jsnanigans' comment, then opened lazy and deleted the plugin (press x), then exited nvim and ran rm -r ~/.supermaven/, reopened nvim and ran :SupermavenUseFree.

— Reply to this email directly, view it on GitHub https://github.com/supermaven-inc/supermaven-nvim/issues/74#issuecomment-2232951952, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARKMPOJ7JJRC3ONGDC7B3T3ZMZACBAVCNFSM6AAAAABK5ZQPW2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZSHE2TCOJVGI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Acero-AD commented 1 month ago

I still have this issue and have updated the plugin

abenz1267 commented 1 month ago

the faulty commit has been reverted.

aarondill commented 1 month ago

Closing thanks to d71257f