Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin floods shada dir with empty temp shada files. #479

Open
avario-cpu opened this issue Aug 14, 2024 · 0 comments
Open

Plugin floods shada dir with empty temp shada files. #479

avario-cpu opened this issue Aug 14, 2024 · 0 comments

Comments

@avario-cpu
Copy link

avario-cpu commented Aug 14, 2024

My installation is on Windows altough I will run nvim in WSL/TMUX.
Issue happens wether I run from PShell or Bash.
When using WSL I run nvim.exe from the windows install, just to be clear.

PS C:\Users\ville\AppData\Local\nvim-data\shada> dir

    Directory: C:\Users\ville\AppData\Local\nvim-data\shada

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----         8/14/2024   6:02 PM          63397 main.shada
-a----         8/14/2024   1:33 PM              0 main.shada.tmp.a
-a----         8/14/2024   3:42 PM              0 main.shada.tmp.b
-a----         8/14/2024   3:43 PM              0 main.shada.tmp.c
-a----         8/14/2024   4:29 PM              0 main.shada.tmp.d
-a----         8/14/2024   4:31 PM              0 main.shada.tmp.e
-a----         8/14/2024   4:34 PM              0 main.shada.tmp.f
-a----         8/14/2024   4:36 PM              0 main.shada.tmp.g
-a----         8/14/2024   4:52 PM              0 main.shada.tmp.h
-a----         8/14/2024   5:03 PM              0 main.shada.tmp.i
-a----         8/14/2024   5:06 PM              0 main.shada.tmp.j
-a----         8/14/2024   5:07 PM              0 main.shada.tmp.k
-a----         8/14/2024   5:09 PM              0 main.shada.tmp.l
-a----         8/14/2024   5:24 PM              0 main.shada.tmp.m
-a----         8/14/2024   5:26 PM              0 main.shada.tmp.n
-a----         8/14/2024   5:28 PM              0 main.shada.tmp.o
-a----         8/14/2024   5:29 PM              0 main.shada.tmp.p
-a----         8/14/2024   5:35 PM              0 main.shada.tmp.q
-a----         8/14/2024   5:38 PM              0 main.shada.tmp.r
-a----         8/14/2024   5:39 PM              0 main.shada.tmp.s
-a----         8/14/2024   5:44 PM              0 main.shada.tmp.t
-a----         8/14/2024   5:51 PM              0 main.shada.tmp.u
-a----         8/14/2024   6:08 PM              0 main.shada.tmp.v
-a----         8/14/2024   6:08 PM              0 main.shada.tmp.w
-a----         8/14/2024   6:09 PM              0 main.shada.tmp.x
-a----         8/14/2024   6:10 PM              0 main.shada.tmp.y
-a----         8/14/2024   6:11 PM              0 main.shada.tmp.z

Reproduce:
Acces any file past the Dashboard, exit.

Some exceptions seem to occur but I cannot pinpoint what makes a file not being created. A mostly sure-fire way to not have any temp file written is to: acces a buffer, do nothing, :w and quit. If changes are made, or if NO changes are made AND NO :w is issued, then a shada is generetated (mostly, it seems, really...)

Fix:
Easily fixable (?) with:

vim.api.nvim_create_autocmd("VimEnter", {
  callback = function()
    -- Path for Windows
    local shada_path = vim.fn.expand("C:\\Users\\USERNAME\\AppData\\Local\\nvim-data\\shada\\main.shada.tmp*")
    vim.fn.system('del /Q ' .. shada_path)
  end,
})

If someone stumbles upon this ... altough I have absolutely no clue what the implications of doing this are. So far it seems only this plugin has been generating those files, and they are empty so... idk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant