aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/executor.c
Commit message (Collapse)AuthorAge
...
* feat(api): add `unsilent` to command APIszeertzjq2022-07-03
|
* vim-patch:8.2.1900: Vim9: command modifiers do not workzeertzjq2022-07-03
| | | | | | Problem: Vim9: command modifiers do not work. Solution: Make most command modifiers work. https://github.com/vim/vim/commit/02194d2bd54eacd0b7b9a017a3fe1702ecb80971
* fix(lua): clear got_int when calling vim.on_key() callback (#18979)zeertzjq2022-06-16
|
* Merge pull request #18947 from zeertzjq/vim-8.2.1897zeertzjq2022-06-14
|\ | | | | vim-patch:8.2.{1897,1898,5088}
| * vim-patch:8.2.5088: value of cmod_verbose is a bit complicated to usezeertzjq2022-06-14
| | | | | | | | | | | | | | | | Problem: Value of cmod_verbose is a bit complicated to use. Solution: Use zero for not set, value + 1 when set. (closes vim/vim#10564) https://github.com/vim/vim/commit/cd7496382efc9e6748326c6cda7f01003fa07063 Omit has_cmdmod(): only used for Vim9 script
| * vim-patch:8.2.1898: command modifier parsing always uses global cmdmodzeertzjq2022-06-14
| | | | | | | | | | | | Problem: Command modifier parsing always uses global cmdmod. Solution: Pass in cmdmod_T to use. Rename struct fields consistently. https://github.com/vim/vim/commit/e10044015841711b989f9a898d427bcc1fdb4c32
| * vim-patch:8.2.1897: command modifiers are saved and set inconsistentlyzeertzjq2022-06-14
| | | | | | | | | | | | | | | | | | Problem: Command modifiers are saved and set inconsistently. Solution: Separate parsing and applying command modifiers. Save values in cmdmod_T. https://github.com/vim/vim/commit/5661ed6c833e05467cab33cb9b1c535e7e5cc570 Cherry-pick: :0verbose fix from patch 8.2.4741
* | perf(memory): use an arena for RPC decodingbfredl2022-06-14
|/ | | | | | | | | drawback: tracing memory errors with ASAN is less accurate for arena allocated memory. Therefore, to start with it is being used for Object types around serialization/deserialization exclusively. This is going to have a large impact especially when TUI is refactored as a co-prosess as all UI events will be serialized and deserialized by nvim itself.
* fix: correct nlua_wait error message #18867resolritter2022-06-09
| | | the message is wrapped in `if (timeout < 0)`, which means 0 is a valid value
* fix(nvim_create_user_command): make `smods` work with `nvim_cmd`Famiu Haque2022-06-08
| | | | Closes #18876.
* feat: add preview functionality to user commandsFamiu Haque2022-05-31
| | | | Adds a Lua-only `preview` flag to user commands which allows the command to be incrementally previewed like `:substitute` when 'inccommand' is set.
* feat(nvim_create_user_command): pass structured modifiers to commandsFamiu Haque2022-05-29
| | | | | | | Adds an `smods` key to `nvim_create_user_command` Lua command callbacks, which has command modifiers but in a structured format. This removes the need to manually parse command modifiers. It also reduces friction in using `nvim_cmd` inside a Lua command callback.
* Merge pull request #18306 from lewis6991/fnfastbfredl2022-05-26
|\ | | | | feat(lua): allow some viml functions to run in fast
| * feat(lua): allow some viml functions to run in fastLewis Russell2022-05-17
| | | | | | | | | | This change adds the necessary plumbing to annotate functions in funcs.c as being allowed in run in luv fast events.
* | refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|/
* Merge pull request #18489 from dundargoc/refactor/remove-char_ubfredl2022-05-13
|\ | | | | refactor: replace char_u variables and functions with char
| * refactor: replace char_u variables and functions with charDundar Goc2022-05-11
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
* | feat(api): add `nvim_cmd`Famiu Haque2022-05-11
|/ | | | Adds the API function `nvim_cmd` which allows executing an Ex-command through a Dictionary which can have the same values as the return value of `nvim_parse_cmd()`. This makes it much easier to do things like passing arguments with a space to commands that otherwise may not allow it, or to make commands interpret certain characters literally when they otherwise would not.
* refactor: replace char_u variables and functions with charDundar Goc2022-05-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-05
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-04
| | | | Work on https://github.com/neovim/neovim/issues/459
* fix(coverity): use xstrndup() instead of vim_strsave() (#18363)zeertzjq2022-05-03
|
* refactor(uncrustify): change rules to better align with the style guideDundar Goc2022-04-29
| | | | | | | | | | | | | Add space around arithmetic operators '+' and '-'. Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('. Remove space between '((' or '))' of control statements. Add space between ')' and '{' of control statements. Remove space between function name and '(' on function declaration. Collapse empty blocks between '{' and '}'. Remove newline at the end of the file. Remove newline between 'enum' and '{'. Remove newline between '}' and ')' in a function invocation. Remove newline between '}' and 'while' of 'do' statement.
* fix(api): correctly pass f-args for nvim_create_user_command (#18098)Gregory Anders2022-04-13
| | | | | Skip runs of whitespace and do not include `\` characters when followed by another `\` or whitespace. This matches the behavior of <f-args> when used with `:command`.
* Merge pull request #17459 from rktjmp/lua-error-tostringbfredl2022-03-18
|\ | | | | feat: __tostring lua errors if possible before showing in messages
| * feat: call __tostring on lua errors if possible before reporting to userOliver Marriott2022-02-25
| |
* | refactor(uncrustify): format all c filesDundar Göc2022-03-10
| |
* | fix(lua): don't use nlua_error when exiting earlybfredl2022-03-07
| | | | | | | | Screen state is not initialized yet. Print directly to stderr instead.
* | refactor(lua): move only runtime lua file in src/ to runtime/luabfredl2022-03-04
| | | | | | | | reorganize so that initialization is done in lua
* | refactor(lua): reorganize builtin modules, phase 1bfredl2022-03-03
| |
* | Merge pull request #15079 from shadmansaleh/feat/verbose_luabfredl2022-03-01
|\ \ | | | | | | feat(lua): add :verbose support for lua config
| * | fix: anonymous sid not workingshadmansaleh2022-02-28
| | |
| * | feat(lua): show proper verbose output for lua configurationshadmansaleh2022-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `:verbose` didn't work properly with lua configs (For example: options or keymaps are set from lua, just say that they were set from lua, doesn't say where they were set at. This fixes that issue. Now `:verbose` will provide filename and line no when option/keymap is set from lua. Changes: - compiles lua/vim/keymap.lua as vim/keymap.lua - When souring a lua file current_sctx.sc_sid is set to SID_LUA - Moved finding scripts SID out of `do_source()` to `get_current_script_id()`. So it can be reused for lua files. - Added new function `nlua_get_sctx` that extracts current lua scripts name and line no with debug library. And creates a sctx for it. NOTE: This function ignores C functions and blacklist which currently contains only vim/_meta.lua so vim.o/opt wrappers aren't targeted. - Added function `nlua_set_sctx` that changes provided sctx to current lua scripts sctx if a lua file is being executed. - Added tests in tests/functional/lua/verbose_spec.lua - add primary support for additional types (:autocmd, :function, :syntax) to lua verbose Note: These can't yet be directly set from lua but once that's possible :verbose should work for them hopefully :D - add :verbose support for nvim_exec & nvim_command within lua Currently auto commands/commands/functions ... can only be defined by nvim_exec/nvim_command this adds support for them. Means if those Are defined within lua with vim.cmd/nvim_exec :verbose will show their location . Though note it'll show the line no on which nvim_exec call was made.
* | | feat(lua): add missing changes to autocmds lost in the rebaseTJ DeVries2022-02-28
|/ / | | | | | | Note: some of these changes are breaking, like change of API signatures
* | feat(lua): add api and lua autocmdsTJ DeVries2022-02-27
| |
* | feat(lua): add <f-args> to user commands callback (#17522)Javier Lopez2022-02-27
| | | | | | | | | | Works similar to ex <f-args>. It only splits the arguments if the command has more than one posible argument. In cases were the command can only have 1 argument opts.fargs = { opts.args }
* | refactor(lua): use references directly on main threadBjörn Linse2022-02-26
| |
* | feat(lua): add proper support of luv threadserw72022-02-26
|/
* refactor(lua): call loadfile internallyLewis Russell2022-02-18
| | | | | | .. instead of luaL_loadfile allows files to be cached
* vim-patch:8.2.4241: some type casts are redundantDundar Göc2022-01-30
| | | | | | | | Problem: Some type casts are redundant. Solution: Remove the type casts. (closes vim/vim#9643) https://github.com/vim/vim/commit/420fabcd4ffeaf79082a6e43db91e1d363f88f27 This is not a literal port but an equivalent one.
* feat(ts): expose minimum language version to lua (#17186)Thomas Vigouroux2022-01-27
|
* fix(lua): print multiple return values with =expr (#16933)Shadman2022-01-06
|
* feat: filetype.lua (#16600)Gregory Anders2022-01-04
| | | | Adds a new vim.filetype module that provides support for filetype detection in Lua.
* feat(lua): make =expr print result of exprshadmansaleh2022-01-04
|
* feat(api): implement nvim_{add,del}_user_commandGregory Anders2021-12-28
| | | | | Add support for adding and removing custom user commands with the Nvim API.
* perf: pre-compile embedded Lua source into bytecode (#16631)Gregory Anders2021-12-16
| | | | | | The Lua modules that make up vim.lua are embedded as raw source files into the nvim binary. These sources are loaded by the Lua runtime on startuptime. We can pre-compile these sources into Lua bytecode before embedding them into the binary, which minimizes the size of the binary and improves startuptime.
* refactor(misc1): move out high-level input functions to a new file: input.cBjörn Linse2021-12-10
| | | | | Possibly dialog code is messages.c could be moved here as well. misc1.c is now empty, so delete it.
* fix: check for interrupt in nvim_echo, write_msg and nlua_print (#16537)ii142021-12-08
| | | | | Fixes `q` in more pager, where `:highlight` can be quit out of with a single `q` keystroke, while in `:lua print(vim.inspect(vim))` it just scrolls down a page.
* refactor: reduce number of explicit char casts (#16077)dundargoc2021-11-16
| | | * refactor: reduce number of explicit char casts
* feat(lua): enable stack traces in error output (#16228)Gregory Anders2021-11-06
|