File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 29
29
{
30
30
event = "LspAttach" ;
31
31
group = "nixvim_lsp_on_attach" ;
32
+ # `event` is documented in `:h event-args`:
33
+ # • id: (number) autocommand id
34
+ # • event: (string) name of the triggered event
35
+ # • group: (number|nil) autocommand group id, if any
36
+ # • file: (string) <afile> (not expanded to a full path)
37
+ # • match: (string) <amatch> (expanded to a full path)
38
+ # • buf: (number) <abuf>
39
+ # • data: (any) arbitrary data passed from `:h nvim_exec_autocmds()`
40
+ # see `:h LspAttach`
41
+ #
42
+ # `:h event-args`: https://neovim.io/doc/user/api.html#event-args
43
+ # `:h LspAttach`: https://neovim.io/doc/user/lsp.html#LspAttach
32
44
callback = lib . nixvim . mkRaw ''
33
- function(args )
45
+ function(event )
34
46
do
35
47
-- client and bufnr are supplied to the builtin `on_attach` callback,
36
48
-- so make them available in scope for our global `onAttach` impl
37
- local client = vim.lsp.get_client_by_id(args.data.client_id)
38
- local bufnr = args.bufnr
39
-
49
+ local client = vim.lsp.get_client_by_id(event.data.client_id)
50
+ local bufnr = event.buf
40
51
${ cfg . onAttach }
41
52
end
42
53
end
You can’t perform that action at this time.
0 commit comments