diff --git a/lua/nvim-tree-config.lua b/lua/nvim-tree-config.lua index 92dab5e..9fa7f23 100644 --- a/lua/nvim-tree-config.lua +++ b/lua/nvim-tree-config.lua @@ -33,7 +33,7 @@ local function open_nvim_tree(data) end -- Using VimEnter is crucial, other autocmds will break the "focus = false" behaviour -vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree }) +--vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree }) -- From https://github.com/nvim-tree/nvim-tree.lua/issues/1368#issuecomment-1512248492 vim.api.nvim_create_autocmd("QuitPre", { diff --git a/lua/plugins.lua b/lua/plugins.lua index ca8c2b0..2d7463a 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -20,10 +20,14 @@ require("lazy").setup({ dependencies = { "nvim-tree/nvim-web-devicons", -- optional, for file icons }, - init = function() - require("nvim-tree-config") - end, + --[[ init = function() + require("nvim-tree-config") + end,]] opts = { + hijack_directories = { + enable = false, + auto_open = false, + }, renderer = { highlight_modified = "name", }, @@ -33,7 +37,7 @@ require("lazy").setup({ diagnostics = { enable = true, }, - update_focused_file = { enable = true }, + --update_focused_file = { enable = true }, filters = { dotfiles = false, git_ignored = false, @@ -117,6 +121,9 @@ require("lazy").setup({ file_browser = { theme = "ivy", hijack_netrw = true, + auto_depth = true, + no_ignore = false, + hidden = { file_browser = true, folder_browser = true }, }, }, }, @@ -327,3 +334,11 @@ vim.diagnostic.config({ }) vim.cmd("colorscheme catppuccin") + +vim.api.nvim_create_autocmd({ "VimEnter" }, { + callback = function(data) + if vim.fn.isdirectory(data.file) == 1 then + require("telescope").extensions.file_browser.file_browser() + end + end, +}) diff --git a/lua/which-key-config.lua b/lua/which-key-config.lua index 13408b0..984df8f 100644 --- a/lua/which-key-config.lua +++ b/lua/which-key-config.lua @@ -23,5 +23,5 @@ wk.add({ { "xr", "Trouble lsp_references toggle", desc = "" }, { "xx", "Trouble diagnostics toggle", desc = "Open Trouble" }, { "tt", require("telescope").extensions.file_browser.file_browser, desc = "Open the file browser" }, - { "/", require("telescope.builtin").grep_string, desc = "Search for a string in the current buffer" }, + { "/", require("telescope.builtin").current_buffer_fuzzy_find, desc = "Search for a string in the current buffer" }, })