diff --git a/lua/swift/features/lsp.lua b/lua/swift/features/lsp.lua index cfc908e..fac0ec5 100644 --- a/lua/swift/features/lsp.lua +++ b/lua/swift/features/lsp.lua @@ -38,7 +38,7 @@ function M.find_sourcekit_lsp() -- Try Xcode toolchain if vim.fn.has("mac") == 1 then - local xcrun_path = vim.system({ "xcrun", "--find", "sourcekit-lsp" }, { text = true }):wait().stdout or "" + local xcrun_path = vim.system({ "xcrun", "--find", "sourcekit-lsp" }, { text = true, timeout = 3000 }):wait().stdout or "" xcrun_path = xcrun_path:gsub("\n", "") if xcrun_path ~= "" and vim.fn.executable(xcrun_path) == 1 then table.insert(possible_paths, 1, xcrun_path)