VS Code editor showing Alpine.js Tools flagging a typo, 'x-sohw' instead of 'x-show', with a yellow diagnostic underline

Why Alpine.js Has No Real Autocomplete (AI Doesn’t Fix It)

Alpine.js has no compiler. That’s the whole point of it, no build step, no bundler, just a script tag and directives written directly in HTML. It’s also the reason Alpine has historically had weaker editor tooling than React or Vue: nothing in the framework itself hooks into a language server the way a compiler naturally does, so IntelliSense, hover docs, and error checking for Alpine directives simply don’t exist unless someone builds them separately.

The obvious question in 2026 is whether that gap still matters. AI autocomplete is everywhere now, Copilot, Cursor, and similar tools predict entire lines of Alpine code without any of that structural tooling in place. So does the old argument still hold? The research points the other way from what that question assumes: AI autocomplete doesn’t close this gap, and the companies building AI coding tools are actively working to plug their own products into exactly the kind of structural tooling Alpine has lacked.

TL;DR

  • AI code completion is probabilistic. It predicts plausible next tokens from training data, with no built-in way to verify a suggested directive, modifier, or magic property actually exists.
  • A peer-reviewed USENIX Security 2025 study generated 576,000 code samples across 16 LLMs and found 19.7% of the 2.23 million package references in that code pointed to packages that didn’t exist.
  • The gap is worse for smaller frameworks specifically. A separate study found LLM accuracy on less-common libraries improved 83-220% when the model had real documentation to reference, evidence that training-data exposure, not general capability, drives the failure.
  • GitHub’s own team added Language Server Protocol integration to Copilot CLI in 2026 specifically because, without it, the agent has to guess at APIs by grepping through decompiled bytecode rather than checking against real code structure. Microsoft retired its older ML-based completion engine, IntelliCode, in favor of language-server-powered completions plus Copilot Chat layered on top, not the other way around.
  • Cursor is a genuine fork of VS Code’s codebase, not a wrapper, and uses the same extension host architecture. The large majority of VS Code extensions work in Cursor unmodified, which means a real Alpine language service benefits Cursor’s AI features too, not just plain VS Code.

What AI autocomplete actually does

Tools like Copilot and Cursor predict the next likely tokens based on patterns in their training data and the surrounding code. That’s a fundamentally different operation from what a language server does. A language server checks a claim, does x-trap actually exist as a directive, is $store.cart an actual registration in this project, against ground truth. An AI model predicts what’s likely, based on how often it’s seen similar patterns before, with no verification step unless something else provides one.

For a framework the size of React or Vue, that prediction is often good enough, there’s enormous training data to draw from. Alpine is a smaller target. A study specifically measuring LLM performance on less-common libraries found that giving the model real API documentation to reference, rather than relying on what it had memorized during training, improved performance by 83% to 220%. That’s not a marginal difference, it’s evidence that the failure mode is exposure, not capability: the same model does dramatically better once it has something real to check against.

Hallucination isn’t a rare edge case

A USENIX Security 2025 study by researchers at the University of Texas at San Antonio generated 576,000 code samples across 16 LLMs, 14 tested for both Python and JavaScript, and analyzed the 2.23 million package references those samples contained. 19.7%, 440,445 of them, pointed to packages that didn’t exist, 205,474 unique hallucinated names in total. That’s a peer-reviewed, measured failure rate on two of the most heavily-trained-on languages there are. A framework-specific detail like an Alpine directive name or a plugin’s current API, occupying a far smaller share of any model’s training data, sits in exactly the position where that kind of confident-but-wrong prediction is most likely.

The industry’s own fix isn’t better AI, it’s structural tooling

The most direct evidence that AI autocomplete doesn’t replace structural tooling is what the companies building AI tools are doing about it. GitHub’s own blog post introducing LSP support for Copilot CLI describes the problem plainly: without a language server, the agent “reverse-engineers API information through text search and binary extraction,” grepping through decompiled bytecode to guess at APIs it can’t verify directly. The fix wasn’t a better model, it was giving Copilot access to real, structured language server data: go-to-definition, find-references, and type resolution, the exact category of feature a compiler-backed language provides and Alpine, without a compiler, doesn’t get automatically.

Microsoft made a related move inside the editor itself. Microsoft’s own deprecation announcement confirms developers will still get “language server-powered code completion lists” from the actual compiler platform, with Copilot Chat available for more advanced suggestions layered on top. The base layer stayed structural. AI was added as a layer above it, not a replacement for it.

This applies to Cursor too, not just Copilot

It would be reasonable to assume this only matters for Copilot specifically, and that a more AI-native tool like Cursor works differently. It doesn’t, architecturally. Cursor is a genuine fork of VS Code’s open-source codebase, not a wrapper built on top of the extension API, and it deliberately inherits VS Code’s editor layer wholesale, the Monaco editor, the extension host, LSP and DAP support, before adding its own AI features on top. Extensions built on standard language contribution points, TextMate grammars, custom data files, hover providers, the same mechanisms Alpine.js Tools uses, carry over without modification.

That matters directly here: Alpine.js Tools is already published on Open VSX, the registry Cursor and other VS Code forks use since Microsoft restricts its own Marketplace to Microsoft’s products. A real Alpine language service doesn’t just help a developer typing by hand in plain VS Code. It’s exactly the kind of grounded, structured context an AI tool’s own suggestions could draw on too, the same relationship GitHub’s LSP work and Microsoft’s IntelliCode decision both point to.

What structural tooling actually closes

None of this is theoretical for Alpine specifically. A real language service means an unknown directive gets underlined instead of silently accepted, $store.name and $refs.name resolve against what’s actually registered in the project instead of a generic guess, and Go to Definition lands on a real Alpine.data() registration instead of not existing as a capability at all. That’s the same category of grounding GitHub built LSP support to give Copilot CLI, applied to a framework that never had a compiler to generate it automatically in the first place.

Frequently asked questions

Does this mean AI autocomplete is bad for Alpine.js development?

No, it means AI autocomplete works better with real structural tooling behind it, not instead of it. The two aren’t competing; GitHub’s own Copilot CLI work treats LSP data as an input that makes the AI’s answers more accurate, not a redundant layer to route around.

Is this specific to less-common frameworks, or would it apply to React or Vue too?

The underlying mechanism is general, LLMs perform worse without grounding, everywhere. It shows up more visibly for smaller frameworks because there’s less training data to fall back on, but React and Vue’s own ecosystems have extensive language server tooling for the same underlying reason: prediction alone isn’t reliable enough on its own.

Would this apply the same way in Neovim or other editors without Cursor’s specific architecture?

Yes, for a different reason. Neovim’s built-in LSP client works with any conforming language server regardless of editor, and increasingly, AI coding agents that support external LSP integration (Claude Code and Copilot CLI both do) can use the same structured data outside a GUI editor entirely. The grounding problem, and the fix, isn’t tied to any one editor.

Related reading

This connects to two other things already covered on this site: why server-rendered templating doesn’t need a build step, the same architectural choice that leaves Alpine without a compiler to hook tooling into automatically, and the three bugs found in Alpine.js Tools since it shipped, concrete examples of exactly the kind of gap structural analysis has to close by inference rather than by a compiler catching it directly.

RSS Feed Newsletter
Contact us

Latest Blog Posts