Something went wrong. Try again.
My neovim configuration.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930local M = {}
M.is_win = vim.fn.has("win32") == 1 or vim.fn.has("win64") == 1M.is_mac = vim.fn.has("macunix") == 1M.is_linux = vim.fn.has("linux") == 1
-- External shell to use for system() calls, per OSif M.is_win then M.shell = "nu"elseif M.is_mac then M.shell = "bash"else -- linux M.shell = "bash"end
-- Linux distribution (used to distinguish ubuntu / arch / etc.)M.distro = "unknown"if M.is_linux then local f = io.open("/etc/os-release", "r") if f then local content = f:read("*all") f:close() local id = content:match("^ID%s*=%s*[\"']?([^\"'\n]+)[\"']?") or content:match("\nID%s*=%s*[\"']?([^\"'\n]+)[\"']?") -- Arch Linux reports `ID=arch` in /etc/os-release, normalize it. M.distro = id == "arch" and "archlinux" or (id or "unknown") endend
return M