add: update config

This commit is contained in:
asep.komarudin 2024-04-25 07:02:03 +07:00
parent 60b34681f6
commit 8b1ecc923b
2 changed files with 7 additions and 8 deletions

View file

@ -65,9 +65,3 @@ vim.g.VM_Insert_hl = "DiffChange"
-- end -- end
-- end, -- end,
-- }) -- })
-- auto open file if creation
local api = require("nvim-tree.api")
api.events.subscribe(api.events.Event.FileCreated, function(file)
vim.cmd("edit " .. file.fname)
end)

View file

@ -2,7 +2,7 @@ return {
{ {
"kyazdani42/nvim-tree.lua", "kyazdani42/nvim-tree.lua",
lazy = true, lazy = true,
-- event = "BufRead", event = "VeryLazy",
cmd = { "NvimTree", "NvimTreeOpen", "NvimTreeToggle", "NvimTreeFocus", "NvimTreeClose" }, cmd = { "NvimTree", "NvimTreeOpen", "NvimTreeToggle", "NvimTreeFocus", "NvimTreeClose" },
-- dependencies = "kyazdani42/nvim-web-devicons", -- dependencies = "kyazdani42/nvim-web-devicons",
config = function() config = function()
@ -19,7 +19,7 @@ return {
return return
end end
local HEIGHT_RATIO = 0.8 -- You can change this local HEIGHT_RATIO = 0.9 -- You can change this
local WIDTH_RATIO = 0.5 -- You can change this too local WIDTH_RATIO = 0.5 -- You can change this too
local icons = require("user.icons") local icons = require("user.icons")
@ -269,6 +269,11 @@ return {
}) })
end end
end end
-- auto open file if creation
local api = require("nvim-tree.api")
api.events.subscribe(api.events.Event.FileCreated, function(file)
vim.cmd("edit " .. file.fname)
end)
end, end,
}, },
} }