dotfiles/.config/nvim/lua/core/autocmds.lua

21 lines
473 B
Lua
Raw Normal View History

2022-10-21 06:15:28 -04:00
vim.api.nvim_create_autocmd({"WinEnter","BufEnter"},{
callback = function()
vim.opt.statusline = "%F"
end
})
vim.api.nvim_create_autocmd({"BufEnter","BufWinEnter","WinEnter","CmdwinEnter"},{
callback = function()
if vim.fn.expand("%") == "NvimTree_1" then
vim.opt.statusline = " NvimTree"
end
end,
})
vim.api.nvim_create_autocmd({"BufEnter","BufWinEnter"},{
pattern = {"*.json"},
callback = function()
vim.lsp.buf.formatting()
end,
})