docs(events): Lua types for autocmd event-data #38518

Problem:
  No LuaLS types for event-data fields (ev.data). Types are only
  documented ad hoc in scattered locations.

Solution:
  Add runtime/lua/vim/_meta/events.lua defining vim.event.<name>.data
  classes for events that provide ev.data. Reference the types from
  each event's help in autocmd.txt, lsp.txt, and pack.txt.
(cherry picked from commit 2cb240319b)
This commit is contained in:
Aditya Malik
2026-04-18 22:47:45 +05:30
committed by github-actions[bot]
parent 9aadbed770
commit 326a7d5afb
5 changed files with 82 additions and 6 deletions

View File

@@ -175,6 +175,8 @@
---- `spec` - plugin's specification with defaults made explicit.
---- `path` - full path to plugin's directory.
---
---See `vim.event.packchanged.data` and `vim.event.packchangedpre.data`.
---
--- These events can be used to execute plugin hooks. For example:
---```lua
---local hooks = function(ev)