refactor(nvim): remove uneeded autocmds

This commit is contained in:
Price Hiller 2022-09-06 00:34:30 -05:00
parent 466a4bec62
commit 988f1397cc
2 changed files with 3 additions and 33 deletions

View File

@ -12,39 +12,6 @@ M.setup = function()
vim.api.nvim_create_autocmd("BufWritePre", {
command = "%s/\\s\\+$//e",
})
-- -- NOTE: Handles scenarios in which the filetype isn't detected on load
-- vim.api.nvim_create_autocmd('BufReadPost', {
-- pattern = '*',
-- callback = function()
-- local opt_ft = vim.opt_local.ft:get()
-- if opt_ft == nil or opt_ft == '' then
-- vim.cmd('filetype detect')
-- end
-- end,
-- })
-- NOTE: Local cursorline
vim.api.nvim_create_autocmd("BufEnter", {
pattern = "*",
callback = function()
vim.opt_local.cursorline = true
end,
})
vim.api.nvim_create_autocmd("WinEnter", {
pattern = "*",
callback = function()
vim.opt_local.cursorline = true
end,
})
vim.api.nvim_create_autocmd("WinLeave", {
pattern = "*",
callback = function()
vim.opt_local.cursorline = false
end,
})
end
return M

View File

@ -72,6 +72,9 @@ M.setup = function()
opt.conceallevel = 2
opt.concealcursor = "ic"
-- Cursor line highlight
opt.cursorline = true
-- Lazy Redraw to Speed Up Macros
opt.lazyredraw = true