diff options
| author | 2026-02-22 13:02:08 +0300 | |
|---|---|---|
| committer | 2026-02-22 15:28:51 +0300 | |
| commit | ad175cdb4045fbe8fecb686c871b481e312d43dd (patch) | |
| tree | 533b63cdadd138d94ff3247fa5faabea95dfd5a6 /config/nvim/lua/autocommands.lua | |
| parent | fixes zshrc (diff) | |
| download | dotfiles-ad175cdb4045fbe8fecb686c871b481e312d43dd.tar.gz dotfiles-ad175cdb4045fbe8fecb686c871b481e312d43dd.tar.bz2 dotfiles-ad175cdb4045fbe8fecb686c871b481e312d43dd.tar.xz dotfiles-ad175cdb4045fbe8fecb686c871b481e312d43dd.zip | |
nvim configs
Diffstat (limited to '')
| -rw-r--r-- | config/nvim/lua/autocommands.lua | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/config/nvim/lua/autocommands.lua b/config/nvim/lua/autocommands.lua index 9811dbe..aec32ec 100644 --- a/config/nvim/lua/autocommands.lua +++ b/config/nvim/lua/autocommands.lua @@ -118,10 +118,26 @@ vim.api.nvim_create_autocmd({ "VimEnter" }, { return end vim.cmd.cd(data.file) - require("nvim-tree.api").tree.open() + -- require("nvim-tree.api").tree.open() end, }) +local api = require("nvim-tree.api") + +vim.api.nvim_create_augroup("NvimTreeResize", { + clear = true, +}) + +vim.api.nvim_create_autocmd({ "VimResized", "WinResized" }, { + group = "NvimTreeResize", + callback = function() + -- Get the nvim-tree window ID + local winid = api.tree.winid() + if winid then + api.tree.reload() + end + end, +}) vim.api.nvim_create_autocmd("FileType", { pattern = "*.go", callback = function() |
