From e3e43c479ec5d8c4c1382e12c03ed88030dbd368 Mon Sep 17 00:00:00 2001 From: maxxnino <34153891+maxxnino@users.noreply.github.com> Date: Thu, 21 Oct 2021 14:04:36 +0900 Subject: Add zig as compiler for parser --- lua/nvim-treesitter/shell_command_selectors.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lua/nvim-treesitter/shell_command_selectors.lua') diff --git a/lua/nvim-treesitter/shell_command_selectors.lua b/lua/nvim-treesitter/shell_command_selectors.lua index 7acd91d2..ee784312 100644 --- a/lua/nvim-treesitter/shell_command_selectors.lua +++ b/lua/nvim-treesitter/shell_command_selectors.lua @@ -65,6 +65,17 @@ function M.select_compiler_args(repo, compiler) "-Os", "/LD", } + elseif string.match(compiler, "zig$") or string.match(compiler, "zig.exe$") then + return { + "c++", + "-o", + "parser.so", + repo.files, + "-lc", + "-Isrc", + "-shared", + "-Os", + } else local args = { "-o", -- cgit v1.2.3