blob: 45df9af1c1b7efb1ae90fd1ec621e77f6cd6a0d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
-- local ok, workspaces = pcall(require, "workspaces")
-- if not ok then
-- return
-- end
-- local scandir = require("plenary.scandir")
-- require("sessions").setup({
-- events = {"WinEnter", "BufEnter", "BufWritePost" },
-- session_filepath = ".nvim/session",
-- })
-- workspaces.setup({
-- hooks = {
-- open = function()
-- require("sessions").load(nil, { silent = true })
-- end,
-- }
-- })
-- local ws = workspaces.get()
-- local function workspace_exists(name)
-- for _, workspace in ipairs(ws) do
-- if workspace.name == name then
-- return true
-- end
-- end
-- return false
-- end
-- local dirs = scandir.scan_dir(
-- { "/home/alpha/code/php" },
-- { depth = 1, only_dirs = true }
-- )
-- for _, path in ipairs(dirs) do
-- local name = "[PHP]" .. vim.fs.basename(path)
-- if not workspace_exists(name) then
-- workspaces.add(name, path)
-- end
-- end
|