From 411da289ed1b8f4d05845da39f971a987331719e Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Mon, 5 Jun 2023 10:15:17 +0100 Subject: [PATCH] Add conditions to only load treesitter and neorg on NixOS systems Remove magma_nvim --- lua/plugins/magma_nvim.lua | 5 ----- lua/plugins/nvim_neorg.lua | 2 +- lua/plugins/treesitter.lua | 15 ++------------- 3 files changed, 3 insertions(+), 19 deletions(-) delete mode 100644 lua/plugins/magma_nvim.lua diff --git a/lua/plugins/magma_nvim.lua b/lua/plugins/magma_nvim.lua deleted file mode 100644 index 423321d..0000000 --- a/lua/plugins/magma_nvim.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - "dccsillag/magma-nvim", - cond = not vim.g.vscode, - event = { "FileType python" }, -} diff --git a/lua/plugins/nvim_neorg.lua b/lua/plugins/nvim_neorg.lua index 675858d..39c645a 100644 --- a/lua/plugins/nvim_neorg.lua +++ b/lua/plugins/nvim_neorg.lua @@ -1,6 +1,6 @@ return { "nvim-neorg/neorg", - cond = not vim.g.vscode, + cond = function() return string.match(vim.loop.os_uname().version, "NixOS") and not vim.g.vscode end, build = ":Neorg sync-parsers", event = { "FileType norg" }, cmd = "Neorg", diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 8c67424..c715782 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -7,6 +7,7 @@ end return { "nvim-treesitter/nvim-treesitter", + cond = function() return string.match(vim.loop.os_uname().version, "NixOS") end, version = false, build = ":TSUpdate", event = { "BufReadPre", "BufNewFile" }, @@ -24,19 +25,7 @@ return { require("nvim-treesitter.configs").setup(opts) end, opts = { - ensure_installed = { - "bash", - "fish", - "gitcommit", - "gitignore", - "lua", - "make", - "nix", - "python", - "vim", - "vimdoc", - }, - auto_install = false, + auto_install = true, highlight = { enable = true, disable = { "fortran" },