conflicts fix
This commit is contained in:
commit
df1e0a51c0
@ -16,7 +16,7 @@ Plug 'kyazdani42/nvim-web-devicons' " for file icons
|
||||
Plug 'kyazdani42/nvim-tree.lua'
|
||||
|
||||
" old version that runs on neovim 0.4.x
|
||||
Plug 'kyazdani42/nvim-tree.lua' { 'commit': 'afc86a9' }
|
||||
Plug 'kyazdani42/nvim-tree.lua', { 'commit': 'afc86a9' }
|
||||
" for icons in old version
|
||||
Plug 'ryanoasis/vim-devicons'
|
||||
```
|
||||
@ -29,6 +29,7 @@ let g:lua_tree_width = 40 "30 by default
|
||||
let g:lua_tree_ignore = [ '.git', 'node_modules', '.cache' ] "empty by default
|
||||
let g:lua_tree_auto_open = 1 "0 by default, opens the tree when typing `vim $DIR` or `vim`
|
||||
let g:lua_tree_auto_close = 1 "0 by default, closes the tree when it's the last window
|
||||
let g:lua_tree_quit_on_open = 1 "0 by default, closes the tree when you open a file
|
||||
let g:lua_tree_follow = 1 "0 by default, this option allows the cursor to be updated when entering a buffer
|
||||
let g:lua_tree_indent_markers = 1 "0 by default, this option shows indent markers when folders are open
|
||||
let g:lua_tree_hide_dotfiles = 1 "0 by default, this option hides files and folders starting with a dot `.`
|
||||
|
||||
@ -134,6 +134,12 @@ Can be `0` or `1`. When `1`, will bind |BufEnter| to automatically
|
||||
close the tree if it's the last window.
|
||||
Default is 0
|
||||
|
||||
|g:lua_tree_quit_on_open| *g:lua_tree_quit_on_open*
|
||||
|
||||
Can be `0` or `1`. When `1`, will close the tree when a file is opened.
|
||||
Applies to: `preview`, `edit`, `edit_vsplit`, `edit_split`, `edit_tab`.
|
||||
Default is 0
|
||||
|
||||
|g:lua_tree_disable_keybindings| *g:lua_tree_disable_keybindings*
|
||||
|
||||
Can be `0` or `1`. When `1`, will disable all keybindings by the plugin.
|
||||
@ -307,4 +313,3 @@ LuaTreeFileNew
|
||||
LuaTreeFileRenamed
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
|
||||
@ -197,10 +197,13 @@ function M.open_file(mode, filename)
|
||||
api.nvim_command(string.format("%s %s", mode, filename))
|
||||
end
|
||||
if M.Tree.win_width_allow_resize ~= true then
|
||||
local cur_win = api.nvim_get_current_win()
|
||||
M.win_focus()
|
||||
api.nvim_command('vertical resize '..M.Tree.win_width)
|
||||
M.win_focus(cur_win)
|
||||
local cur_win = api.nvim_get_current_win()
|
||||
M.win_focus()
|
||||
api.nvim_command('vertical resize '..M.Tree.win_width)
|
||||
M.win_focus(cur_win)
|
||||
end
|
||||
if vim.g.lua_tree_quit_on_open then
|
||||
M.close()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -131,12 +131,13 @@ end
|
||||
function M.find_file(with_open)
|
||||
local bufname = vim.fn.bufname()
|
||||
local filepath = vim.fn.fnamemodify(bufname, ':p')
|
||||
if not is_file_readable(filepath) then return end
|
||||
|
||||
if with_open then
|
||||
M.open()
|
||||
lib.win_focus()
|
||||
end
|
||||
|
||||
if not is_file_readable(filepath) then return end
|
||||
lib.set_index_and_redraw(filepath)
|
||||
end
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user