mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[nvim] Lock treesitter down to the old MacBook
This commit is contained in:
parent
4e384ffa27
commit
2f41ade799
1 changed files with 10 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue