How to Fix Cursor Autocomplete & Swift Suggestions Not Working

No Swift completions, missing diagnostics, or dead go-to-definition in Cursor? The cause is almost always the language server. Here's a step-by-step fix for SourceKit-LSP and Tab autocomplete.

First, Identify Which Autocomplete Is Broken

Cursor has two distinct completion systems, and the fix depends on which one failed. The first is SourceKit-LSP language intelligence — the precise, type-aware completions, diagnostics, and go-to-definition that come from the Swift language server. The second is Tab, Cursor's AI autocomplete that predicts your next edit. They are independent: Tab can work while SourceKit-LSP is dead, or vice versa. Determine which is missing — no red error squiggles and no member completions points to SourceKit-LSP; no greyed-out AI predictions points to Tab. The sections below address each.

Fix 1 — Confirm the Swift Extension and Toolchain

For SourceKit-LSP completions, the Swift extension must be installed and a valid Swift toolchain selected. Open the Extensions panel and confirm the official Swift extension is installed and enabled. In a terminal, run 'swift --version' to confirm the toolchain is reachable, and if you have multiple Xcode versions, point the command-line tools at the right one with 'sudo xcode-select -s /Applications/Xcode.app'. After any change, reload the Cursor window (Cmd+Shift+P, 'Reload Window') so the language server restarts. A missing or misconfigured toolchain is the single most common reason Swift completions never appear.

Fix 2 — Generate or Regenerate the Build Server

For iOS app projects, SourceKit-LSP cannot resolve UIKit, SwiftUI, or your own types without knowing your build settings. That information lives in a buildServer.json created by xcode-build-server. If it is missing, generate it from your project root for your scheme; if your project or schemes changed, regenerate it, because a stale build-server config silently breaks completion. After generating it, build the project once in Xcode so the index store populates, then reload the Cursor window. Once buildServer.json is correct, member completion and go-to-definition start behaving like Xcode's.

Fix 3 — Read the SourceKit-LSP Output Log

When completions still fail, the language server log usually names the cause. Open the Output panel (View > Output) and select the SourceKit-LSP or Swift channel from the dropdown. Look for messages about a missing toolchain, an unreadable buildServer.json, or a scheme that could not be found. These logs turn guesswork into a specific fix — for example, a path that points at an old Xcode, or a build server referencing a renamed scheme. Most 'autocomplete just won't work' cases are solved within a minute of reading this output.

Fix 4 — Restart the Language Server and Re-Index

Sometimes the setup is correct but the server is wedged. Open the command palette and run a 'Restart Language Server' command if the Swift extension provides one, or reload the window to restart everything. If chat and @-references also miss recent files, trigger a re-index from the command palette. Adding a .cursorignore that excludes DerivedData, Pods, and build folders keeps the index focused and prevents the server from choking on generated files. A restart plus a clean re-index resolves a large share of intermittent completion failures.

Fix 5 — When Tab (AI Autocomplete) Is the Problem

If it is specifically Cursor's AI Tab predictions that are missing, the causes are different. Confirm Tab is enabled in Cursor's settings and that the autocomplete model is selected. Check that you are signed in and not rate-limited — a 'Too Many Requests' state disables AI features, so see our rate-limit guide. Verify your internet connection, since Tab requires a network round trip. Finally, make sure you have not disabled AI features for the current file via .cursorignore or a workspace setting. Toggling Tab off and on, or reloading the window, restores it in most cases.

Fix 6 — Rule Out Extension Conflicts

A conflicting extension can suppress completions from both systems. If problems started after installing something new, disable recently added extensions, reload, and confirm whether completion returns. Re-enable them one at a time to find the offender. Multiple language or AI-completion extensions competing for the same triggers is a classic cause of suggestions flickering or never appearing. Keeping a lean extension set — the Swift extension plus only what you actively use — avoids this class of problem entirely and also improves Cursor's overall performance.

Fix 7 — Last-Resort Clean Reinstall

If completions stay broken after every check above, reset the environment from the ground up. Quit Cursor, reinstall the Swift extension fresh, and regenerate buildServer.json from scratch rather than reusing the old file. Confirm there is exactly one Swift toolchain in play by checking that 'xcrun --find sourcekit-lsp' and 'swift --version' resolve to the Xcode you expect. Delete the project's DerivedData so Xcode rebuilds the index store cleanly, then build once in Xcode before reopening the folder in Cursor. As a final step, reloading or reinstalling Cursor itself clears a corrupted extension host that can silently disable language features. Work through these in order and stop at the first that restores completions; rebuilding the toolchain-to-build-server chain end to end fixes the small set of cases that survive the targeted fixes above. If even a clean reinstall fails, capture the SourceKit-LSP output log and your buildServer.json and ask in the Cursor community forum, where toolchain-path issues specific to your setup are spotted quickly.

Frequently Asked Questions

Why is Swift autocomplete not working in Cursor?

Almost always because SourceKit-LSP is not running or not configured. Install the Swift extension, ensure a valid Swift toolchain is selected, and for iOS app projects generate a buildServer.json with xcode-build-server. Then reload the window and read the SourceKit-LSP output log if it still fails.

Why does go-to-definition fail for Swift in Cursor?

Go-to-definition relies on SourceKit-LSP having resolved your project. For app projects this needs a valid buildServer.json and a populated index — generate the build server, build once in Xcode, then reload the window. Stale or missing build-server config is the usual cause.

Cursor's Tab AI autocomplete stopped — how do I fix it?

Tab is separate from SourceKit-LSP. Confirm Tab is enabled in settings, that you are signed in and not rate-limited, and that your network is up. Reloading the window or toggling Tab off and on restores it in most cases.

Does .cursorignore affect autocomplete?

Yes. .cursorignore can exclude files from indexing and AI features, which is good for performance but will suppress suggestions if it excludes files you are editing. Make sure your active source folders are not ignored, while keeping DerivedData, Pods, and build output excluded.