aboutsummaryrefslogtreecommitdiff
path: root/lua/cmake-explorer/cache.lua
diff options
context:
space:
mode:
authorDaniil Rozanov <daniilrozzanov@gmail.com>2024-04-24 03:34:52 +0300
committerDaniil Rozanov <daniilrozzanov@gmail.com>2024-04-24 03:34:52 +0300
commitf9b36bf730fda5488be87b91fd03a6f7cbf64e73 (patch)
treed8a7da573111d40c0e51c9e9954a3bb1977dd39c /lua/cmake-explorer/cache.lua
parent672f0d32e322b79661b5d7959887adaa9e41ad98 (diff)
refactor: full rewrite
Diffstat (limited to 'lua/cmake-explorer/cache.lua')
-rw-r--r--lua/cmake-explorer/cache.lua47
1 files changed, 0 insertions, 47 deletions
diff --git a/lua/cmake-explorer/cache.lua b/lua/cmake-explorer/cache.lua
deleted file mode 100644
index 046a9f9..0000000
--- a/lua/cmake-explorer/cache.lua
+++ /dev/null
@@ -1,47 +0,0 @@
-local Cache = {}
-
-local os = {
- iswin32 = vim.fn.has("win32") == 1,
- ismac = vim.fn.has("mac") == 1,
- iswsl = vim.fn.has("wsl") == 1,
- islinux = vim.fn.has("linux") == 1,
-}
-
-local dir = {
- unix = vim.fn.expand("~") .. "/.cache/cmake_explorer_nvim/",
- mac = vim.fn.expand("~") .. "/.cache/cmake_explorer_nvim/",
- win = vim.fn.expand("~") .. "/AppData/Local/cmake_explorer_nvim/",
-}
-
-local function get_cache_path()
- if os.islinux then
- return dir.unix
- elseif os.ismac then
- return dir.mac
- elseif os.iswsl then
- return dir.unix
- elseif os.iswin32 then
- return dir.win
- end
-end
-
-local function get_clean_path(path)
- local current_path = path
- local clean_path = current_path:gsub("/", "")
- clean_path = clean_path:gsub("\\", "")
- clean_path = clean_path:gsub(":", "")
- return clean_path
-end
-
-function Cache.load(path)
- return
-end
-
-function Cache.save_global(tbl)
- local to_save = vim.tbl_deep_extend("keep", tbl)
- setmetatable(to_save, nil)
- local path = get_project_path()
- local file = io.open(path, "w")
-end
-
-return Cache