Check for nix executable rather than NixOS in uname

This commit is contained in:
Evie Litherland-Smith 2023-06-06 11:14:31 +01:00
parent 98e5633959
commit 497fed2c07
3 changed files with 4 additions and 11 deletions

View file

@ -6,6 +6,6 @@ return {
opts = {
background_colour = "#000000",
fps = 60,
render = "compact",
render = "default",
},
}

View file

@ -1,6 +1,6 @@
return {
"nvim-neorg/neorg",
cond = function() return string.match(vim.loop.os_uname().version, "NixOS") and not vim.g.vscode end,
cond = function() return vim.fn.executable("nix") == 1 and not vim.g.vscode end,
build = ":Neorg sync-parsers",
event = { "FileType norg" },
cmd = "Neorg",

View file

@ -1,17 +1,10 @@
local dependencies
if vim.g.vscode then
dependencies = { "nvim-treesitter/nvim-treesitter-refactor" }
else
dependencies = { "nvim-treesitter/nvim-treesitter-refactor", "nvim-neorg/neorg" }
end
return {
"nvim-treesitter/nvim-treesitter",
cond = function() return string.match(vim.loop.os_uname().version, "NixOS") end,
cond = function() return vim.fn.executable "nix" == 1 end,
version = false,
build = ":TSUpdate",
event = { "BufReadPre", "BufNewFile" },
dependencies = dependencies,
dependencies = { "nvim-treesitter/nvim-treesitter-refactor", "nvim-neorg/neorg" },
config = function(_, opts)
if type(opts.ensure_installed) == "table" then
-- @type table<string, boolean>