So what about generating code with agents in your code editor? Now let's talk about Copilot for a moment, or Clippy in Disguise, as I like to call it. Now Copilot was one of the first editors to really make a big splash for having AI auto-completion and code generation capabilities. And they recently added support for being able to select between different third-party models. You can use something from Quad, Google's Gemini, something from OpenAI, really pick the model that has the best strength for your project.
And we can't really talk about AI code editors without talking about some of the alternatives, so things like Cursor. So unlike traditional AI coding assistants that operate as plugins, Cursor actually takes a slightly different architectural approach. It's a complete fork of VS Code that's been built for AI integration. So it's got features like full codebase awareness, it can understand your context, it's got multi-model flexibility, git style diffs, you can chat for iterative code generation, lots of options in here. And I think that that codebase-wide insight is what really sets it apart. It's also got some nice features, things like docs integration, web awareness if you need to pull in additional content externally, command generation, it's really powerful.
Our starting point here is a basic Next.js boilerplate project. Like Copilot, Cursor's got an interactive chat experience, and we're going to build out a similar movies application to the ones that we were just doing. As Cursor generates code, it shows us clear diffs in green and red as code is being generated. That allows us to, sort of, visualize what's happening and maintain control over the process. Shows us a summary of changes once it's done, which can be handy. And here, we're actually encountering our first challenge running this app. It's an image configuration error with Next.js image component, and it looks like the host name for our images maybe needs some additional configuration because it's a third-party service. So I'm just going to copy that error. We're going to paste it into Cursor, and it identifies that we need to update our Next.js configuration with proper image domain settings. So we do that, we fix it, and boom, there we go. So the movies app is now working. It's pulling in real data from the movie database API. Now similar to our other examples, I spent another five or ten minutes with this, and I was able to add a lot more features. Things like the ability to manage and add favorites, browse categories, do searches, and even add a quick dark mode. So I was able to work across all of my subpages, including movies, and I was just generally impressed with how well Cursor was able to maintain consistency across these different features while handling things like state management and user interactions. Now some quick pro tips. You are able to optimize your Cursor setup using Cursor ignore files or Cursor rules. If you're interested, Cursor rules basically help you refine how you interact with projects, and there's a rich community around Cursor that allows you to do things like take their prompts that they've been using.
Comments