aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schmucker <ts@its1.de>2026-03-09 08:02:53 +0100
committerThomas Schmucker <ts@its1.de>2026-03-09 08:02:53 +0100
commitb8f1da5ea149068ba3aae66685b64c251ad45461 (patch)
tree0bdc461eeb86bb88866a04703574f18180b0413c
parent72e9c5c84d754adb3761ff92edebfad90df5fe5a (diff)
downloaddotfiles-b8f1da5ea149068ba3aae66685b64c251ad45461.tar.gz
dotfiles-b8f1da5ea149068ba3aae66685b64c251ad45461.tar.bz2
dotfiles-b8f1da5ea149068ba3aae66685b64c251ad45461.zip
Neovim: Nerdtree wird nicht weiter beim Start geladen
-rw-r--r--nvim/lua/config/autocmds.lua16
-rw-r--r--nvim/lua/plugins/ui.lua1
2 files changed, 1 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
18vim.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
34vim.api.nvim_create_autocmd("QuitPre", { 18vim.api.nvim_create_autocmd("QuitPre", {
35 callback = function() 19 callback = function()
diff --git a/nvim/lua/plugins/ui.lua b/nvim/lua/plugins/ui.lua
index 219cd3b..94a420f 100644
--- a/nvim/lua/plugins/ui.lua
+++ b/nvim/lua/plugins/ui.lua
@@ -25,6 +25,7 @@ return {
25 "nvim-tree/nvim-web-devicons", 25 "nvim-tree/nvim-web-devicons",
26 }, 26 },
27 cmd = { "NvimTreeToggle", "NvimTreeOpen" }, 27 cmd = { "NvimTreeToggle", "NvimTreeOpen" },
28 lazy = true,
28 keys = { 29 keys = {
29 { "<leader>e", "<cmd>NvimTreeToggle<cr>", desc = "Explorer toggle" }, 30 { "<leader>e", "<cmd>NvimTreeToggle<cr>", desc = "Explorer toggle" },
30 }, 31 },