diff --git a/lua/lib/state.lua b/lua/lib/state.lua index 8218b235..d7fe0acc 100644 --- a/lua/lib/state.lua +++ b/lua/lib/state.lua @@ -19,7 +19,10 @@ local Tree = {} local IGNORE_LIST = "" -if api.nvim_call_function('exists', { 'g:lua_tree_ignore' }) == 1 then +local UNIX = api.nvim_call_function('has', { 'unix' }) == 1 + +-- --ignore does not work with mac ls +if UNIX and api.nvim_call_function('exists', { 'g:lua_tree_ignore' }) == 1 then local ignore_patterns = api.nvim_get_var('lua_tree_ignore') if type(ignore_patterns) == 'table' then for _, pattern in pairs(ignore_patterns) do diff --git a/plugin/tree.vim b/plugin/tree.vim index b4717967..a6e176f9 100644 --- a/plugin/tree.vim +++ b/plugin/tree.vim @@ -1,4 +1,4 @@ -if exists('g:loaded_tree') | finish | endif +if has('win32') || exists('g:loaded_tree') | finish | endif let s:save_cpo = &cpo set cpo&vim