config.nvim

NeoVim config
git clone git://popovic.xyz/nvim.config.git/
Log | Files | Refs

autocmd.lua (517B)


      1 ---@diagnostic disable: undefined-global
      2 local autocmd = vim.api.nvim_create_autocmd
      3 
      4 -- Delete trailing whitespace
      5 autocmd({ 'BufWritePre' }, {
      6   pattern = '*',
      7   command = [[%s/\s\+$//e]],
      8 })
      9 
     10 autocmd({ 'BufEnter' }, {
     11   pattern = 'justfile',
     12   command = "set filetype=make",
     13 })
     14 
     15 autocmd({ 'BufWritePost' }, {
     16   pattern = vim.fn.expand('~') .. '/.config/X/Xresources',
     17   command = '!xrdb %',
     18 })
     19 
     20 autocmd({ 'BufWritePost' }, {
     21   pattern = vim.fn.expand('~') .. '/.config/X/Xresources.mon',
     22   command = '!xrdb %',
     23 })