summaryrefslogtreecommitdiff
path: root/nvim/lua/autocommands.lua
diff options
context:
space:
mode:
author2025-05-02 16:05:47 +0300
committer2025-05-02 16:05:47 +0300
commit446d2716e7bb83e58fb516ec27e5c7750069e98c (patch)
tree3e2bdee9d79cf8495fde84a559d2b05bf7ca45b8 /nvim/lua/autocommands.lua
parentСделал кейбинды (diff)
downloaddotfiles-446d2716e7bb83e58fb516ec27e5c7750069e98c.tar.gz
dotfiles-446d2716e7bb83e58fb516ec27e5c7750069e98c.tar.bz2
dotfiles-446d2716e7bb83e58fb516ec27e5c7750069e98c.tar.xz
dotfiles-446d2716e7bb83e58fb516ec27e5c7750069e98c.zip
Перешел на lazy nvim, навел порядок в плагинах
Diffstat (limited to '')
-rw-r--r--nvim/lua/autocommands.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/nvim/lua/autocommands.lua b/nvim/lua/autocommands.lua
index a0a7e5e..0e95ee4 100644
--- a/nvim/lua/autocommands.lua
+++ b/nvim/lua/autocommands.lua
@@ -124,7 +124,16 @@ vim.api.nvim_create_autocmd({ "BufReadPost", "BufWinEnter", "WinEnter" }, {
end
end,
})
-
+vim.api.nvim_create_autocmd({ "VimEnter" }, {
+ callback = function(data)
+ local directory = vim.fn.isdirectory(data.file) == 1
+ if not directory then
+ return
+ end
+ vim.cmd.cd(data.file)
+ require("nvim-tree.api").tree.open()
+ end,
+})
-- vim.api.nvim_create_autocmd("InsertEnter", {
-- pattern = "*",
-- command = "set norelativenumber",