2023-01-07 17:52:40 +08:00
|
|
|
-- Autocmds are automatically loaded on the VeryLazy event
|
|
|
|
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
|
|
|
-- Add any additional autocmds here
|
2023-09-23 10:25:18 +08:00
|
|
|
|
|
|
|
-- autocmds.lua
|
|
|
|
local augroup = vim.api.nvim_create_augroup -- Create/get autocommand group
|
|
|
|
local autocmd = vim.api.nvim_create_autocmd -- Create autocommand
|
|
|
|
|
|
|
|
-- Remove whitespace on save
|
|
|
|
--autocmd('BufWritePre', {
|
|
|
|
-- pattern = '',
|
|
|
|
-- command = ":%s/\\s\\+$//e"
|
|
|
|
--})
|
|
|
|
|
|
|
|
-- Don't auto commenting new lines
|
|
|
|
autocmd('BufEnter', {
|
|
|
|
pattern = '',
|
|
|
|
command = 'set fo-=c fo-=r fo-=o'
|
|
|
|
})
|
|
|
|
|
|
|
|
|