From 6abde88457fb8f7572d603b265b2d3ecd70123a1 Mon Sep 17 00:00:00 2001 From: connorgmeean Date: Thu, 18 Nov 2021 21:21:31 +1100 Subject: [PATCH] Made error detection and message platform agnostic --- lua/doom/modules/config/doom-neorg.lua | 4 ++-- lua/doom/modules/config/doom-treesitter.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/doom/modules/config/doom-neorg.lua b/lua/doom/modules/config/doom-neorg.lua index 2561d3d..d527778 100644 --- a/lua/doom/modules/config/doom-neorg.lua +++ b/lua/doom/modules/config/doom-neorg.lua @@ -44,8 +44,8 @@ return function() local cc = select_executable(compilers) local version = vim.fn.systemlist(cc .. (cc == "cl" and "" or " --version"))[1] - if (version:match('Apple clang')) then - log.warn('doom-neorg: clang has poor compatibility compiling treesitter parsers. We recommend using gcc on MacOS, see issue #246 for details.') + if (version:match('clang')) then + log.warn('doom-neorg: clang has poor compatibility compiling treesitter parsers. We recommend using gcc instead, see issue #246 for details.') end end, 1000) end diff --git a/lua/doom/modules/config/doom-treesitter.lua b/lua/doom/modules/config/doom-treesitter.lua index e714d6c..08f6f6a 100644 --- a/lua/doom/modules/config/doom-treesitter.lua +++ b/lua/doom/modules/config/doom-treesitter.lua @@ -89,8 +89,8 @@ return function() local cc = select_executable(compilers) local version = vim.fn.systemlist(cc .. (cc == "cl" and "" or " --version"))[1] - if (version:match('Apple clang')) then - log.warn('doom-treesitter: clang has poor compatibility compiling treesitter parsers. We recommend using gcc on MacOS, see issue #246 for details.') + if (version:match('clang')) then + log.warn('doom-treesitter: clang has poor compatibility compiling treesitter parsers. We recommend using gcc, see issue #246 for details.') end end, 1000) end