65 lines
1.4 KiB
Lua
Executable File
65 lines
1.4 KiB
Lua
Executable File
local configs = require("nvim-treesitter.configs")
|
|
|
|
local f = io.popen("uname -s")
|
|
if (f ~= nil) then
|
|
MY_OS = f:read("*a")
|
|
MY_OS = string.gsub(MY_OS, "%s+", "")
|
|
f:close()
|
|
end
|
|
|
|
if (MY_OS == 'Linux')
|
|
then
|
|
configs.setup({
|
|
ensure_installed = {
|
|
"bash",
|
|
"c",
|
|
"json",
|
|
"julia",
|
|
"lua",
|
|
"vim",
|
|
"vimdoc",
|
|
"zig",
|
|
},
|
|
sync_install = false,
|
|
highlight = { enable = true },
|
|
indent = { enable = true },
|
|
})
|
|
elseif (MY_OS == 'FreeBSD') or (MY_OS == 'OpenBSD')
|
|
then
|
|
--print('Should be here if on BSD')
|
|
configs.setup({
|
|
ensure_installed = {
|
|
"bash",
|
|
"c",
|
|
"json",
|
|
"vim",
|
|
"vimdoc",
|
|
"zig",
|
|
},
|
|
sync_install = false,
|
|
highlight = { enable = true },
|
|
indent = { enable = true },
|
|
})
|
|
elseif (MY_OS == 'Darwin')
|
|
then
|
|
--print('Should be here if on MacOS')
|
|
configs.setup({
|
|
ensure_installed = {
|
|
"bash",
|
|
"c",
|
|
"julia",
|
|
"json",
|
|
"lua",
|
|
"ocaml",
|
|
"vim",
|
|
"vimdoc",
|
|
"zig",
|
|
},
|
|
sync_install = false,
|
|
highlight = { enable = true },
|
|
indent = { enable = true },
|
|
})
|
|
else
|
|
print('Should never be here')
|
|
end
|