1
0
Fork 0

begin nvim config cleanup

This commit is contained in:
Arthur Khachaturov 2024-08-25 07:52:04 +03:00
parent d2d85c8cff
commit 4ecc5566b4
No known key found for this signature in database
GPG key ID: CAC2B7EB6DF45D55
37 changed files with 326 additions and 476 deletions

View file

@ -1,24 +1,4 @@
-- Open NvimTree on startup
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()
end
end
vim.api.nvim_create_autocmd('FileType', {
pattern = "go",
command = "setlocal tabstop=4",
})
-- Resotre cursor on exit
-- vim.api.nvim_create_autocmd("VimLeave", {
-- pattern = "*",
-- callback = function()
-- vim.o.guicursor = "n:ver20-blinkwait700-blinkoff400-blinkon250"
-- end,
-- })