1
0
Fork 0

cumulative update

This commit is contained in:
Arthur Khachaturov 2024-06-19 11:51:19 +03:00
parent 3ecbac352e
commit c360fc2339
71 changed files with 3281 additions and 380 deletions

View file

@ -1,18 +1,19 @@
-- Open NvimTree on startup
local function open_nvim_tree(data)
local real_file = vim.fn.filereadable(data.file) == 1
local no_name = data.file == "" and vim.bo[data.buf].buftype == ""
local directory = vim.fn.isdirectory(data.file) == 1
vim.api.nvim_create_autocmd({ "VimEnter" }, {
callback = function(data)
local real_file = vim.fn.filereadable(data.file) == 1
local no_name = data.file == "" and vim.bo[data.buf].buftype == ""
local directory = vim.fn.isdirectory(data.file) == 1
if real_file or no_name then
require("nvim-tree.api").tree.toggle({ focus = false, find_file = true, })
elseif directory then
vim.cmd.enew()
vim.cmd.cd(data.file)
require("nvim-tree.api").tree.open()
if real_file or no_name then
require("nvim-tree.api").tree.toggle({ focus = false, find_file = true, })
elseif directory then
vim.cmd.enew()
vim.cmd.cd(data.file)
require("nvim-tree.api").tree.open()
end
end
end
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })
})
-- Resotre cursor on exit
-- vim.api.nvim_create_autocmd("VimLeave", {