add/adjust vscode

This commit is contained in:
2025-04-16 11:45:52 +08:00
parent 82a7282861
commit c14012b7cd
8 changed files with 187 additions and 126 deletions

View File

@@ -3,5 +3,21 @@
if vim.g.vscode then
require('config.lazyvscode')
else
require("config.lazy")
local info = debug.getinfo(1, "S")
local path_info = info.source:sub(2)
local path
if vim.loop.os_uname().sysname == "Windows_NT" then
-- Windows platform (backslashes or forward slashes)
path = path_info:match("(.*[/\\])")
else
-- Linux/macOS platform (forward slashes only)
path = path_info:match("(.*/)")
end
local file, err = io.open(string.format("%s%s", path, "/baremetal"), "r")
if file then
file:close()
require("config.lazybaremetal")
else
require("config.lazynvimide")
end
end