Skip to content

Add msvc-cpp-toolkit extension#6178

Open
spartajet wants to merge 2 commits into
zed-industries:mainfrom
spartajet:main
Open

Add msvc-cpp-toolkit extension#6178
spartajet wants to merge 2 commits into
zed-industries:mainfrom
spartajet:main

Conversation

@spartajet
Copy link
Copy Markdown

Zed Extension Submit Checklist

Extension: msvc-cpp-toolkit

Pre-Submit Verification

Item Status Notes
Extension ID valid msvc-cpp-toolkit - no "zed"/"extension"
License valid MIT
Repository public spartajet/zed-msvc-toolkit
Local tested User confirmed
Code internationalized English comments/docs
Differentiation Windows MSVC-specific (vs generic neocmake)

How to Submit

1. Fork zed-industries/extensions

# Fork https://github.com/zed-industries/extensions to your GitHub account

2. Clone your fork

git clone https://github.com/<YOUR_USERNAME>/extensions.git
cd extensions
git submodule init
git submodule update

3. Add your extension as submodule

git submodule add https://github.com/spartajet/zed-msvc-toolkit.git extensions/msvc-cpp-toolkit

4. Update extensions.toml

Add to extensions.toml:

[msvc-cpp-toolkit]
submodule = "extensions/msvc-cpp-toolkit"
version = "0.5.0"

5. Sort and commit

pnpm sort-extensions
git add extensions.toml .gitmodules extensions/msvc-cpp-toolkit
git commit -m "Add msvc-cpp-toolkit extension"
git push origin main

6. Create PR

## Overview

Windows-specific MSVC C++ toolkit for Zed. Provides automatic detection and configuration of MSVC toolchain, Windows SDK, and clangd for C/C++ CMake projects.

## Key Features

- **MSVC Environment Detection**: Auto-detects Visual Studio 2022+, MSVC v143+, and Windows SDK
- **Automatic .clangd Generation**: Creates proper MSVC include paths for clangd
- **Compile Database Detection**: Finds `compile_commands.json` for accurate code analysis
- **CMake Language Support**: Integrates neocmakelsp for CMakeLists.txt support
- **CMake Tasks**: Auto-generates `.zed/tasks.json` with configure, build, and run tasks

## Differentiation

This extension is specifically designed for **Windows + MSVC environments**. Unlike generic C++/CMake extensions, it:

1. Automatically detects Windows-specific paths (MSVC, Windows SDK via vswhere.exe)
2. Generates MSVC-compatible `.clangd` configuration
3. Works seamlessly with Visual Studio installation layouts

The CMake LSP functionality (neocmakelsp) is included because Windows C++ developers typically work with CMake projects, and having both MSVC toolchain detection AND CMake support in one extension provides a cohesive experience.

## Repository

https://github.com/spartajet/zed-msvc-toolkit

## License

MIT

Notes for Reviewers

Why CMake Support Included?

Windows C++ development with MSVC almost always involves CMake. Rather than requiring users to install two separate extensions:

  1. neocmake - for CMake LSP
  2. Another extension - for MSVC toolchain detection

This extension provides both in a cohesive package specifically for Windows developers.

No Conflict with neocmake

Users who prefer the standalone neocmake extension can still use it. This extension does not conflict - it simply provides an all-in-one solution for Windows MSVC C++ development.


Current extension.toml

id = "msvc-cpp-toolkit"
name = "Zed MSVC C++ Assistant"
description = "MSVC and clangd assistant for Windows C++ CMake projects in Zed."
version = "0.5.0"
schema_version = 1
authors = ["Dr.Guo"]
repository = "https://github.com/spartajet/zed-msvc-toolkit.git"

@cla-bot cla-bot Bot added the cla-signed label May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant