Next.js extension for VS Code
Introduction
This is a unofficial Next.js extension for VS Code.
It aims to be a Swiss Army knife for managing Next.js project structure, configuration, and version details right within your IDE.
Key Features
- Next.js Route Discovery: Automatically display all detected application routes and API endpoints within your project (supporting both the
src and app directories).
Overview panel
Route view panel
API Route view panel
- Project Structure Analysis: Accurately detect and report the architectural style of your Next.js project, distinguishing between the App Router and Pages Router paradigms.
- Dependency Version Reporting: Easily access and display the current versions of key dependencies, specifically Next.js and React.
- On-the-Fly File Navigation: Active development to enable quick navigation and direct opening of page files from within the assistant interface.
- Linter Configuration Detection (Planned): Future capability to identify and report on the configured linter setup (e.g., ESLint rules) to ensure coding standards are maintained.
Usage
To use the application for debugging:
- Clone the repository
git clone https://github.com/RomualdSandamalala2002/vscode-next-extension
cd vscode-next-extension
Open the extension in VS Code
- Launch VS Code and open the cloned folder.
Run the extension
- Go to the Run and Debug panel (Ctrl+Shift+D / Cmd+Shift+D on macOS).
- Select Run Extension and start debugging.
Use it in any Next.js project
- Open a Next.js project in VS Code.
- The extension will automatically detect your app structure.
- Use the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and search for:
Next.js: Preview Route to preview pages or API routes.
Check the Output panel for debug logs and extension activity.
Installation
You can install it by generating a .vsix package:
# Clone the repository
git clone https://github.com/RomualdSandamalala2002/vscode-next-extension
cd vscode-next-extension
# Install dependencies
npm install
# Build and package the extension
npx vsce package
This command will generate a .vsix file (e.g. nextjs-extension-x.x.x.vsix).
Then, install it in VS Code:
code --install-extension nextjs-extension-x.x.x.vsix
Once installed, reload VS Code and start using the extension 🚀.
Roadmap
The following features and improvements are planned for future releases of this extension:
Contributing
Contributions are welcome! 🚀
Report Issues
If you find a bug or have a feature request, please open an issue in the repository so it can be tracked and discussed.
How to Contribute
- Fork the repo and clone your fork.
- Create a new branch for your feature or fix.
- Make changes and commit them with a clear message.
- Push your branch and open a Pull Request.
Please keep code clean and follow the existing style.