mirror of
https://github.com/neovim/neovim.git
synced 2026-08-27 09:31:47 +00:00
docs: use "ev" convention in event-handlers
Problem: In autocmd examples, using "args" as the event-object name is vague and may be confused with a user-command. Solution: Use "ev" as the conventional event-object name.
This commit is contained in:
@@ -438,9 +438,9 @@ end
|
||||
---
|
||||
--- ```lua
|
||||
--- vim.api.nvim_create_autocmd( 'FileType', { pattern = 'tex',
|
||||
--- callback = function(args)
|
||||
--- vim.treesitter.start(args.buf, 'latex')
|
||||
--- vim.bo[args.buf].syntax = 'ON' -- only if additional legacy syntax is needed
|
||||
--- callback = function(ev)
|
||||
--- vim.treesitter.start(ev.buf, 'latex')
|
||||
--- vim.bo[ev.buf].syntax = 'ON' -- only if additional legacy syntax is needed
|
||||
--- end
|
||||
--- })
|
||||
--- ```
|
||||
|
||||
Reference in New Issue
Block a user