local f=require("\064\108\117\110\101\047\102\115")local r=require("\064\108\117\110\101\047\115\101\114\100\101")return function()local W if f.isFile("\046\118\115\099\111\100\101\047\115\101\116\116\105\110\103\115\046\106\115\111\110")then local X pcall(function()X=r.decode("\106\115\111\110",f.readFile("\046\118\115\099\111\100\101\047\115\101\116\116\105\110\103\115\046\106\115\111\110"))end)if X then W=X["\108\117\097\117-\108\115\112\046\115\111\117\114\099\101\109\097\112\046\114\111\106\111\080\114\111\106\101\099\116\070\105\108\101"]end end W=W or"\100\101\102\097\117\108\116\046\112\114\111\106\101\099\116\046\106\115\111\110"if f.isFile(W)then return W else return nil end end
local fs = require("@lune/fs")
local serde = require("@lune/serde")

return function()
	local projectFile
	if fs.isFile(".vscode/settings.json") then
		local data
		pcall(function()
			-- VS Code's json files are technically either json5 or json with
			-- comments, so decode might fail!
			data = serde.decode("json", fs.readFile(".vscode/settings.json"))
		end)
		if data then
			projectFile = data["luau-lsp.sourcemap.rojoProjectFile"]
		end
	end

	projectFile = projectFile or "default.project.json"

	if fs.isFile(projectFile) then
		return projectFile
	else
		return nil
	end
end