summaryrefslogtreecommitdiffstats
path: root/lua/conform/fs.lua
blob: d303dbd8bc2f9d899a4570448355d76b4dd3d903 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
local M = {}

local uv = vim.uv or vim.loop

---@type boolean
M.is_windows = uv.os_uname().version:match("Windows")

M.is_mac = uv.os_uname().sysname == "Darwin"

---@type string
M.sep = M.is_windows and "\\" or "/"

---@param ... string
M.join = function(...)
  return table.concat({ ... }, M.sep)
end

return M