[nvim] Lock treesitter down to the old MacBook

This commit is contained in:
Alyxia Sother 2023-06-15 10:12:16 +02:00
parent 4e384ffa27
commit 2f41ade799
No known key found for this signature in database
GPG Key ID: 01E16C4E775A37E4
1 changed files with 10 additions and 1 deletions

View File

@ -9,8 +9,17 @@ if not ok then return end
-- So, the nix-darwin configuration specifies the installation of zig as a
-- replacement compiler solely so the Treesitter dialects compile. Very
-- intuitive.
-- Sadly, the solution only works on my old MacBook pro, which is a 13 inch
-- model. So my only option is to lock it down to that device.
if vim.loop.os_uname().sysname == 'Darwin' then
require('nvim-treesitter.install').compilers = { "zig" }
local meta = vim.fn.system({"system_profiler", "SPHardwareDataType"});
if not string.match(meta, "MacBookPro13,1") then
return
end
local opts = require('nvim-treesitter.install')
opts.compilers = { "zig" }
opts.command_extra_args = { "--help" }
end
local parser_configs = parser_configs.get_parser_configs()