Explorar el Código

pcall for view

christianchiarulli hace 4 años
padre
commit
beb1d28b19
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. 6 1
      lua/lv-nvimtree/init.lua

+ 6 - 1
lua/lv-nvimtree/init.lua

@@ -65,7 +65,12 @@ M.config = function()
   }
   }
 end
 end
 
 
-local view = require "nvim-tree.view"
+local view_status_ok, view = pcall(require, "nvim-tree.view")
+if not view_status_ok then
+  return
+end
+
+--local view = require "nvim-tree.view"
 
 
 M.toggle_tree = function()
 M.toggle_tree = function()
   if view.win_open() then
   if view.win_open() then