From 2228aaea4acd6248ea289e86bf9233dc482760d2 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Tue, 19 Oct 2021 10:11:59 +0300 Subject: nvim: remove fern, use nvim-tree --- .config/nvim/lua/plugin_settings.lua | 68 ++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) (limited to '.config/nvim/lua/plugin_settings.lua') diff --git a/.config/nvim/lua/plugin_settings.lua b/.config/nvim/lua/plugin_settings.lua index 2dfbaeb..0ca647a 100644 --- a/.config/nvim/lua/plugin_settings.lua +++ b/.config/nvim/lua/plugin_settings.lua @@ -392,3 +392,71 @@ npairs.add_rule(Rule('%"','%"',"remind")) -- }}} nvim-autopairs -- + +-- nvim-tree {{{ -- + +require'nvim-tree'.setup { + disable_netrw = true, + hijack_netrw = true, + open_on_setup = false, + ignore_ft_on_setup = {}, + -- closes neovim automatically when the tree is the last **WINDOW** in the view + auto_close = true, + open_on_tab = false, + -- hijacks new directory buffers when they are opened. + update_to_buf_dir = { + -- enable the feature + enable = true, + -- allow to open the tree if it was previously closed + auto_open = true, + }, + -- hijack the cursor in the tree to put it at the start of the filename + hijack_cursor = false, + -- updates the root directory of the tree on `DirChanged` (when your run `:cd` usually) + update_cwd = true, + -- show lsp diagnostics in the signcolumn + diagnostics = { + enable = false, + icons = { + hint = "❔", + info = "❕", + warning = "❗", + error = "❌", + } + }, + -- update the focused file on `BufEnter`, un-collapses the folders recursively until it finds the file + update_focused_file = { + -- enables the feature + enable = false, + -- update the root directory of the tree to the one of the folder containing the file if the file is not under the current root directory + update_cwd = false, + -- list of buffer names / filetypes that will not update the cwd if the file isn't found under the current root directory + ignore_list = {} + }, + -- configuration options for the system open command (`s` in the tree by default) + system_open = { + -- the command to run this, leaving nil should work in most cases + cmd = nil, + -- the command arguments as a list + args = {} + }, + + view = { + -- width of the window, can be either a number (columns) or a string in `%`, for left or right side placement + width = 30, + -- height of the window, can be either a number (columns) or a string in `%`, for top or bottom side placement + height = 30, + -- side of the tree, can be one of 'left' | 'right' | 'top' | 'bottom' + side = 'left', + -- if true the tree will resize itself after opening a file + auto_resize = false, + mappings = { + -- custom only false will merge the list with the default mappings + -- if true, it will only use your list to set the mappings + custom_only = false, + -- list of mappings to set on the tree manually + list = {} + } + } +} +-- }}} nvim-tree -- -- cgit v1.2.3-70-g09d2