Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save tahir-hassan/65cdd60543ba07582b030e038cbe6f4f to your computer and use it in GitHub Desktop.

Select an option

Save tahir-hassan/65cdd60543ba07582b030e038cbe6f4f to your computer and use it in GitHub Desktop.
Setting up C Compiler on Windows 11 for Tree-sitter

There are many ways of setting up a C compiler for Tree-sitter on Windows 11, but this is one such way.

Installing Clang

Install Visual Studio Build Tools 2026 using winget install Microsoft.VisualStudio.BuildTools. Run the Visual Studio Installer, which you will find in the Start menu.

On the left, select Desktop development with C++. After selecting it, the right hand panel will list optional components you can install, from which select C++ Clang tools for Windows.

Adding Clang to PATH

You can run the following line in PowerShell which will change the PATH (temporarily):

. "C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools\Common7\Tools\Launch-VsDevShell.ps1" -Arch x64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment