1- local lib = require " nvim-tree.lib"
2- local log = require " nvim-tree.log"
3- local appearance = require " nvim-tree.appearance"
4- local view = require " nvim-tree.view"
5- local utils = require " nvim-tree.utils"
6- local actions = require " nvim-tree.actions"
7- local core = require " nvim-tree.core"
8- local notify = require " nvim-tree.notify"
1+ local lib = require ( " nvim-tree.lib" )
2+ local log = require ( " nvim-tree.log" )
3+ local appearance = require ( " nvim-tree.appearance" )
4+ local view = require ( " nvim-tree.view" )
5+ local utils = require ( " nvim-tree.utils" )
6+ local actions = require ( " nvim-tree.actions" )
7+ local core = require ( " nvim-tree.core" )
8+ local notify = require ( " nvim-tree.notify" )
99
1010local _config = {}
1111
@@ -21,7 +21,7 @@ function M.change_root(path, bufnr)
2121 if type (bufnr ) == " number" then
2222 local ft
2323
24- if vim .fn .has " nvim-0.10" == 1 then
24+ if vim .fn .has ( " nvim-0.10" ) == 1 then
2525 ft = vim .api .nvim_get_option_value (" filetype" , { buf = bufnr }) or " "
2626 else
2727 ft = vim .api .nvim_buf_get_option (bufnr , " filetype" ) or " " --- @diagnostic disable-line : deprecated
@@ -76,11 +76,11 @@ function M.change_root(path, bufnr)
7676end
7777
7878function M .tab_enter ()
79- if view .is_visible { any_tabpage = true } then
79+ if view .is_visible ( { any_tabpage = true }) then
8080 local bufname = vim .api .nvim_buf_get_name (0 )
8181
8282 local ft
83- if vim .fn .has " nvim-0.10" == 1 then
83+ if vim .fn .has ( " nvim-0.10" ) == 1 then
8484 ft = vim .api .nvim_get_option_value (" filetype" , { buf = 0 }) or " "
8585 else
8686 ft = vim .api .nvim_buf_get_option (0 , " ft" ) --- @diagnostic disable-line : deprecated
@@ -91,7 +91,7 @@ function M.tab_enter()
9191 return
9292 end
9393 end
94- view .open { focus_tree = false }
94+ view .open ( { focus_tree = false })
9595
9696 local explorer = core .get_explorer ()
9797 if explorer then
145145--- @param hijack_netrw boolean
146146local function manage_netrw (disable_netrw , hijack_netrw )
147147 if hijack_netrw then
148- vim .cmd " silent! autocmd! FileExplorer *"
149- vim .cmd " autocmd VimEnter * ++once silent! autocmd! FileExplorer *"
148+ vim .cmd ( " silent! autocmd! FileExplorer *" )
149+ vim .cmd ( " autocmd VimEnter * ++once silent! autocmd! FileExplorer *" )
150150 end
151151 if disable_netrw then
152152 vim .g .loaded_netrw = 1
@@ -316,7 +316,7 @@ local function setup_autocommands(opts)
316316 callback = function ()
317317 vim .schedule (function ()
318318 vim .api .nvim_buf_call (0 , function ()
319- vim .cmd [[ norm! zz]]
319+ vim .cmd ( [[ norm! zz]] )
320320 end )
321321 end )
322322 end ,
811811
812812--- @param conf table | nil
813813function M .setup (conf )
814- if vim .fn .has " nvim-0.9" == 0 then
815- notify .warn " nvim-tree.lua requires Neovim 0.9 or higher"
814+ if vim .fn .has ( " nvim-0.9" ) == 0 then
815+ notify .warn ( " nvim-tree.lua requires Neovim 0.9 or higher" )
816816 return
817817 end
818818
@@ -840,7 +840,7 @@ function M.setup(conf)
840840 require (" nvim-tree.notify" ).setup (opts )
841841 require (" nvim-tree.log" ).setup (opts )
842842
843- if log .enabled " config" then
843+ if log .enabled ( " config" ) then
844844 log .line (" config" , " default config + user" )
845845 log .raw (" config" , " %s\n " , vim .inspect (opts ))
846846 end
0 commit comments