From ca86a5fb2cf98ed8bef6dbb7d7a36e81ac889622 Mon Sep 17 00:00:00 2001 From: glmlm <91877885+glmlm@users.noreply.github.com> Date: Sat, 22 Nov 2025 09:08:36 +0900 Subject: [PATCH] fix(install): explicitly set `gcc` as `CC` on Windows when `cl` is unavailable --- lua/nvim-treesitter/install.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua index 94d21d46a..d8092c2b6 100644 --- a/lua/nvim-treesitter/install.lua +++ b/lua/nvim-treesitter/install.lua @@ -281,6 +281,10 @@ end local function do_compile(logger, compile_location) logger:info(string.format('Compiling parser')) + if uv.os_uname().sysname == 'Windows_NT' and fn.executable('cl') == 0 then + vim.env.CC = 'gcc' + end + local r = system({ 'tree-sitter', 'build',