diff options
Diffstat (limited to 'nvim/lua/config/autocmds.lua')
| -rw-r--r-- | nvim/lua/config/autocmds.lua | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/nvim/lua/config/autocmds.lua b/nvim/lua/config/autocmds.lua index a4ce4ae..b07f9ce 100644 --- a/nvim/lua/config/autocmds.lua +++ b/nvim/lua/config/autocmds.lua | |||
| @@ -14,22 +14,6 @@ vim.api.nvim_create_autocmd("FileType", { | |||
| 14 | callback = enable_treesitter_features, | 14 | callback = enable_treesitter_features, |
| 15 | }) | 15 | }) |
| 16 | 16 | ||
| 17 | -- https://github.com/nvim-tree/nvim-tree.lua/wiki/Open-At-Startup | ||
| 18 | vim.api.nvim_create_autocmd("VimEnter", { | ||
| 19 | callback = function(data) | ||
| 20 | -- buffer is a real file on the disk | ||
| 21 | local real_file = vim.fn.filereadable(data.file) == 1 | ||
| 22 | |||
| 23 | -- buffer is a [No Name] | ||
| 24 | local no_name = data.file == "" and vim.bo[data.buf].buftype == "" | ||
| 25 | |||
| 26 | if not real_file and not no_name then return end | ||
| 27 | |||
| 28 | -- open the tree, find the file but don't focus it | ||
| 29 | require("nvim-tree.api").tree.toggle({ focus = false, find_file = true }) | ||
| 30 | end, | ||
| 31 | }) | ||
| 32 | |||
| 33 | -- https://github.com/nvim-tree/nvim-tree.lua/wiki/Auto-Close | 17 | -- https://github.com/nvim-tree/nvim-tree.lua/wiki/Auto-Close |
| 34 | vim.api.nvim_create_autocmd("QuitPre", { | 18 | vim.api.nvim_create_autocmd("QuitPre", { |
| 35 | callback = function() | 19 | callback = function() |
