Skip to content

Autocomplete Next.js Link hrefs based on your project routes.

Notifications You must be signed in to change notification settings

Kovania/nextjs-link-autocomplete

Repository files navigation

Next.js Link Autocomplete

Autocomplete for Next.js <Link> href attributes based on your project routes.

Features

  • Autocompletes <Link href=""> and <Link href={}> in Next.js projects.
  • Supports both app/ and src/app/ directories.
  • Handles dynamic routes like /blog/[id].
  • Works with:
    • href="/"
    • href={""}
    • href={/}
    • Partial typing inside quotes or braces.

Installation

  1. Clone the repository.
  2. Open the project in VS Code.
  3. Press F5 to launch the extension in a new Extension Host window.
  4. Open a .tsx or .jsx file and start typing <Link href=" or <Link href={.

Usage

import Link from "next/link"

export default function Example() {
  return (
    <div>
      <Link href="/">Home</Link>
      <Link href="/about">About</Link>
      <Link href={`/blog/[id]`}>Blog</Link>
    </div>
  )
}

About

Autocomplete Next.js Link hrefs based on your project routes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published