Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

List only Neovim's own cache, never what its plug-ins keep there

Țugui Dragoșefbabc6f98b2
diff --git a/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift b/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift
index c4b3ac91..948f88a6 100644
--- a/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift
@@ -960,7 +960,7 @@ public enum DeveloperCaches {
Folder(".android/build-cache", .buildData, source: "https://android.googlesource.com/platform/tools/base/+/55f19833771c87543085e99f6d2a6d92ea2adddd/build-system/gradle-core/src/main/java/com/android/build/gradle/internal/BuildCacheUtils.java#108"),
], ownFolders: ["Library/Caches/Google/AndroidStudio*", "Library/Logs/Google/AndroidStudio*"]),
Definition(id: "neovim", name: "Neovim", systemImage: "curlybraces", appBundleIdentifiers: [], folders: [
- Folder(".cache/nvim", .cache, source: "https://github.com/neovim/neovim/blob/f76c1ca25a6cba0a0e2cbb916e14995bd7f987b3/runtime/doc/starting.txt#L1404-L1405"),
+ Folder(".cache/nvim/luac", .cache, source: "https://github.com/neovim/neovim/blob/f76c1ca25a6cba0a0e2cbb916e14995bd7f987b3/runtime/lua/vim/loader.lua#L54"),
Folder(".local/share/nvim/lazy", .environments, source: "https://github.com/folke/lazy.nvim/blob/306a05526ada86a7b30af95c5cc81ffba93fef97/lua/lazy/core/config.lua#L8"),
Folder(".local/share/nvim/lazy-rocks", .environments, source: "https://github.com/folke/lazy.nvim/blob/306a05526ada86a7b30af95c5cc81ffba93fef97/lua/lazy/core/config.lua#L61"),
Folder(".local/share/nvim/mason", .environments, source: "https://github.com/mason-org/mason.nvim/blob/2a6940af80375532e5e9e7c1f2fc6319a1b7a69d/lua/mason/settings.lua#L9"),
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift
index 658c913c..0a51391f 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift
@@ -529,8 +529,8 @@ struct DeveloperCachesTests {
".hex", "Library/Caches/gleam/hex/hexpm", ".pub-cache", ".local/share/gem", ".cache/rebar3", ".stack", ".opam",
"Library/Caches/org.R-project.R/R/renv", ".dartServer",
// VS Code and the editors built on it keep unsaved files in `Backups`; Zed its database and threads;
- // Neovim its swap and undo files.
- "Library/Application Support/Code", "Library/Application Support/Code - Insiders",
+ // Neovim its swap and undo files, and its plug-ins whatever they like in its cache, such as a sign-in key.
+ ".cache/nvim", "Library/Application Support/Code", "Library/Application Support/Code - Insiders",
"Library/Application Support/VSCodium", "Library/Application Support/Cursor",
"Library/Application Support/Windsurf", "Library/Application Support/Devin",
"Library/Application Support/Zed", ".local/state/nvim",
@@ -594,6 +594,18 @@ struct DeveloperCachesTests {
])
}
+ @Test func listsWhatNeovimItselfCachesAndNeverWhatItsPlugInsKeepThere() async throws {
+ let directory = try TemporaryDirectory()
+ try directory.file(".cache/nvim/luac/%2fUsers%2fme%2f.config%2fnvim%2finit.luac", bytes: 4_096)
+ try directory.file(".cache/nvim/codeium/config.json", bytes: 64)
+
+ let environments = await scanned(directory.url)
+
+ let listed = environments.filter { $0.id == "neovim" }.flatMap(\.locations)
+ .map { $0.url.pathComponents.suffix(2).joined(separator: "/") }
+ #expect(listed == ["nvim/luac"])
+ }
+
@Test func listsWhatOtherCodingAgentsCacheAndLogButNeverTheirSettings() async throws {
let directory = try TemporaryDirectory()
for path in [