aboutsummaryrefslogtreecommitdiffstats
path: root/lua/conform/fs.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/conform/fs.lua')
-rw-r--r--lua/conform/fs.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/lua/conform/fs.lua b/lua/conform/fs.lua
new file mode 100644
index 0000000..d303dbd
--- /dev/null
+++ b/lua/conform/fs.lua
@@ -0,0 +1,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