aboutsummaryrefslogtreecommitdiff
path: root/dot_config/nvim/lua/util/plugin.lua
blob: 8bf6a94a8f10ab7159641e05f6c5a7193836868b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
local M = {}

M.lazy_file_events = { 'BufReadPost', 'BufNewFile', 'BufWritePre' }

function M.lazy_file()
  -- Add support for the LazyFile event
  local Event = require 'lazy.core.handler.event'

  Event.mappings.LazyFile = { id = 'LazyFile', event = M.lazy_file_events }
  Event.mappings['User LazyFile'] = Event.mappings.LazyFile
end

return M