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" )
9
9
10
10
local _config = {}
11
11
@@ -21,7 +21,7 @@ function M.change_root(path, bufnr)
21
21
if type (bufnr ) == " number" then
22
22
local ft
23
23
24
- if vim .fn .has " nvim-0.10" == 1 then
24
+ if vim .fn .has ( " nvim-0.10" ) == 1 then
25
25
ft = vim .api .nvim_get_option_value (" filetype" , { buf = bufnr }) or " "
26
26
else
27
27
ft = vim .api .nvim_buf_get_option (bufnr , " filetype" ) or " " --- @diagnostic disable-line : deprecated
@@ -76,11 +76,11 @@ function M.change_root(path, bufnr)
76
76
end
77
77
78
78
function M .tab_enter ()
79
- if view .is_visible { any_tabpage = true } then
79
+ if view .is_visible ( { any_tabpage = true }) then
80
80
local bufname = vim .api .nvim_buf_get_name (0 )
81
81
82
82
local ft
83
- if vim .fn .has " nvim-0.10" == 1 then
83
+ if vim .fn .has ( " nvim-0.10" ) == 1 then
84
84
ft = vim .api .nvim_get_option_value (" filetype" , { buf = 0 }) or " "
85
85
else
86
86
ft = vim .api .nvim_buf_get_option (0 , " ft" ) --- @diagnostic disable-line : deprecated
@@ -91,7 +91,7 @@ function M.tab_enter()
91
91
return
92
92
end
93
93
end
94
- view .open { focus_tree = false }
94
+ view .open ( { focus_tree = false })
95
95
96
96
local explorer = core .get_explorer ()
97
97
if explorer then
145
145
--- @param hijack_netrw boolean
146
146
local function manage_netrw (disable_netrw , hijack_netrw )
147
147
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 *" )
150
150
end
151
151
if disable_netrw then
152
152
vim .g .loaded_netrw = 1
@@ -316,7 +316,7 @@ local function setup_autocommands(opts)
316
316
callback = function ()
317
317
vim .schedule (function ()
318
318
vim .api .nvim_buf_call (0 , function ()
319
- vim .cmd [[ norm! zz]]
319
+ vim .cmd ( [[ norm! zz]] )
320
320
end )
321
321
end )
322
322
end ,
811
811
812
812
--- @param conf table | nil
813
813
function 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" )
816
816
return
817
817
end
818
818
@@ -840,7 +840,7 @@ function M.setup(conf)
840
840
require (" nvim-tree.notify" ).setup (opts )
841
841
require (" nvim-tree.log" ).setup (opts )
842
842
843
- if log .enabled " config" then
843
+ if log .enabled ( " config" ) then
844
844
log .line (" config" , " default config + user" )
845
845
log .raw (" config" , " %s\n " , vim .inspect (opts ))
846
846
end
0 commit comments