ii14
921e634119
fix(api): nvim_create_autocmd crash on invalid types inside pattern array
...
Co-authored-by: ii14 <ii14@users.noreply.github.com >
2023-01-12 15:25:44 +00:00
Justin M. Keyes
1c324cb192
docs #20986
...
- https://github.com/neovim/tree-sitter-vimdoc v1.2.4 eliminates most
errors in pi_netrw.txt, so we can remove that workaround from
ignore_parse_error().
- improved codeblock
2022-12-11 18:41:26 -08:00
Christian Clason
0b05bd87c0
docs(gen): support language annotation in docstrings
2022-12-02 16:05:00 +01:00
dundargoc
66360675cf
build: allow IWYU to fix includes for all .c files
...
Allow Include What You Use to remove unnecessary includes and only
include what is necessary. This helps with reducing compilation times
and makes it easier to visualise which dependencies are actually
required.
Work on https://github.com/neovim/neovim/issues/549 , but doesn't close
it since this only works fully for .c files and not headers.
2022-11-15 10:30:03 +01:00
Christian Clason
f44ad75380
docs(api): pattern is not expanded for autocommands ( #20812 )
...
Problem: Unlike `:autocmd`, `nvim_create_autocommand()` does not expand
environment variables in the `pattern`, which is unexpected.
Solution: Add a note to the documentation explaining this and suggesting
using `expand()` explicitly.
2022-10-27 22:31:58 +02:00
Justin M. Keyes
63be765182
fix(docs): invalid :help links #20345
...
Fix those naughty single quotes.
closes #20159
2022-09-25 16:58:27 -07:00
kylo252
0f93aa12fd
docs(autocmds): re-add buffer param to docstring ( #20204 )
2022-09-16 09:18:42 +02:00
Dundar Göc
3ff46544c9
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-09-11 13:28:59 +02:00
bfredl
7784dc9e0d
refactor(api): provide a temporary copy solution for nvim_call_atomic
...
Make the copy_object() family accept an optional arena. More than
half of the callsites should be refactored to use an arena later
anyway.
2022-08-24 14:22:26 +02:00
zeertzjq
6f14c5d2dd
refactor: remove some unused includes ( #19747 )
...
- Remove autocmd.h from fileio.h
- Remove normal.h from main.h
- Move bufinfo_T from undo_defs.h to undo.c
2022-08-13 08:59:11 +08:00
Gregory Anders
8c2b870544
fix(api): change default value of 'pattern' in nvim_exec_autocmds ( #19115 )
...
Omitting 'pattern' in nvim_exec_autocmds should be equivalent to
omitting the 'fname' argument in :doautoall, which is equivalent to
using an empty string as the pattern. Fixes regression introduced
in #19091 .
2022-06-27 09:51:33 +02:00
Christian Clason
5c8025967e
refactor(api): use FOREACH_ITEM macro in autocmd
2022-06-26 17:57:45 +02:00
Christian Clason
da358d4521
feat(api): support pattern array for exec_autocmds
2022-06-26 13:04:45 +02:00
kylo252
3da3cfc864
feat(autocmds): retrieve lua callback ( #18642 )
...
add a new `callback` field to `nvim_get_autocmds`
2022-06-09 07:18:56 -06:00
dundargoc
9fec6dc9a2
refactor(uncrustify): set maximum number of consecutive newlines to 2 ( #18695 )
2022-05-25 12:31:14 -06:00
kylo252
55246d44f9
fix(autocmds): separate command from desc ( #18617 )
2022-05-21 15:55:48 +02:00
Gregory Anders
8a9ab88945
feat(api): enable nvim_exec_autocmds to pass arbitrary data ( #18613 )
...
Add a "data" key to nvim_exec_autocmds that passes arbitrary data (API
objects) to autocommand callbacks.
2022-05-18 09:51:26 -06:00
bfredl
d14d308ce8
Merge pull request #18431 from famiu/feat/api/nvim_get_autocmds/group_name
...
feat(api): add `group_name` to `nvim_get_autocmds`
2022-05-05 20:17:11 +02:00
Famiu Haque
96289f2416
feat(api): add group_name
to nvim_get_autocmds
2022-05-05 23:17:36 +06:00
Dundar Goc
9a671e6a24
refactor: replace char_u variables and functions with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-05-05 18:10:46 +02:00
Dundar Goc
f08477789f
refactor: replace char_u variables and functions with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-05-04 17:49:37 +02:00
Dundar Goc
5576d30e89
refactor: replace char_u variables and functions with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-05-04 15:25:54 +02:00
zeertzjq
13520aae16
fix(coverity): use xstrndup() instead of vim_strsave() ( #18363 )
2022-05-03 09:29:55 +08:00
Mathias Fußenegger
a48a0a4f7b
docs(api): add example showing necessity to wrap callback function ( #18179 )
...
Some people ran into issues trying to use `callback = myluafun` because
of the event data payload.
Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com >
2022-04-20 18:42:07 +02:00
dundargoc
e63e5d1dbd
docs: typo fixes ( #17859 )
...
Co-authored-by: Elias Alves Moura <eliamoura.alves@gmail.com >
Co-authored-by: venkatesh <shariharanvenkatesh@gmail.com >
Co-authored-by: zeertzjq <zeertzjq@outlook.com >
Co-authored-by: Vikas Raj <24727447+numToStr@users.noreply.github.com >
Co-authored-by: Steve Vermeulen <sfvermeulen@gmail.com >
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com >
Co-authored-by: rwxd <rwxd@pm.me >
Co-authored-by: casswedson <58050969+casswedson@users.noreply.github.com >
2022-04-15 12:35:06 +02:00
Gregory Anders
30bc02c636
feat(api)!: pass args table to autocommand callbacks
2022-04-08 15:12:54 +02:00
bfredl
80d4d6b486
Merge pull request #17938 from ggandor/autocmd-api-names
...
refactor(api)!: use singular/plural consistently in the autocmd API
2022-04-01 00:35:21 +02:00
György Andorka
9d40b2fda9
refactor(api)!: use singular/plural consistently in the autocmd API
2022-03-31 23:58:47 +02:00
bfredl
4a89812d85
Merge pull request #17929 from lewis6991/autocmd
...
fix(api): improve autocmd error handling
2022-03-31 19:28:06 +02:00
Lewis Russell
929293815b
fix(api): improve autocmd error handling
...
- nvim_del_augroup_* now works with pcall
- nvim_del_autocmd now errors for invalid ids
2022-03-31 14:23:53 +01:00
TJ DeVries
b80651eda9
feat(api): nvim_clear_autocmd
...
Co-authored-by: Christian Clason <christian.clason@uni-due.de >
2022-03-31 14:30:42 +02:00
Javier Lopez
a490db5ba8
refactor!: rename nvim_do_autocmd to nvim_exec_autocmd ( #17854 )
...
according to established code standards (`:h dev-api`)
2022-03-26 15:34:56 +01:00
かわえもん
85821d8b6f
docs(api): fix wrong documentation of nvim_create_autocmd
( #17870 )
...
also add doc changes from typofix PR
2022-03-26 13:21:32 +01:00
Javier Lopez
174deafcef
docs(api): improve autocommand docs ( #17545 )
...
[skip ci]
2022-03-25 19:24:53 +01:00
Dundar Göc
7e3bdc75e4
refactor(uncrustify): format all c files
2022-03-10 09:14:12 +01:00
Dhruv Manilawala
2783f4cc4a
feat(api): autocmd group
can be either name or id ( #17559 )
...
* feat(api): `group` can be either string or int
This affects the following API functions:
- `vim.api.nvim_create_autocmd`
- `vim.api.nvim_get_autocmds`
- `vim.api.nvim_do_autocmd`
closes #17552
* refactor: add two maps for fast lookups
* fix: delete augroup info from id->name map
When in "stupid_legacy_mode", the value in name->id map would be updated
to `AUGROUP_DELETED`, but the entry would still remain in id->name. This
would create a problem in `augroup_name` function which would return the
name of the augroup instead of `--DELETED--`.
The id->name map is only used for fast loopup in `augroup_name` function
so there's no point in keeping the entry of deleted augroup in it.
Co-authored-by: TJ DeVries <devries.timothyj@gmail.com >
2022-03-07 23:15:43 -05:00
Gregory Anders
92349b1db0
feat(api): add 'buffer' argument to nvim_get_autocmds ( #17594 )
...
This enables retrieving autocommands defined in the given buffers. Under
the hood this simply translates the buffer numbers into '<buffer=%d>'
patterns.
2022-03-06 12:35:14 -07:00
zeertzjq
8ba47a6457
refactor(PVS/V547): aucmd.type == CALLABLE_NONE is always false
2022-03-02 15:14:52 +08:00
zeertzjq
22d1b2423f
refactor(PVS/V560): ap == NULL is always false
2022-03-02 15:14:11 +08:00
zeertzjq
55a189583e
chore(PVS): add PVS header to api/autocmd.c
2022-03-02 08:50:15 +08:00
Christian Clason
37a86a2f96
fix(api): include event in get_autocmds ( #17553 )
2022-03-01 09:07:41 +01:00
TJ DeVries
0f613482b3
feat(lua): add missing changes to autocmds lost in the rebase
...
Note: some of these changes are breaking, like change of API signatures
2022-02-28 19:53:50 +01:00
TJ DeVries
991e472881
feat(lua): add api and lua autocmds
2022-02-27 22:04:55 +01:00