aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/executor.c
Commit message (Collapse)AuthorAge
...
* fix(f_wait): flush UI before blocking (#25962)zeertzjq2023-11-10
|
* fix: flush UI state before blocking in vim.wait (#25938)Gregory Anders2023-11-08
|
* refactor: move defaults into separate module (#25929)Gregory Anders2023-11-08
| | | | Move default mappings and autocommands into a separate module and add comments and docstrings to document each of the defaults.
* refactor: the long goodbyedundargoc2023-11-05
| | | | | | long is 32 bits on windows, while it is 64 bits on other architectures. This makes the type suboptimal for a codebase meant to be cross-platform. Replace it with more appropriate integer types.
* fix(ui): empty line before the next message after :silent commandnwounkn2023-10-14
| | | | | | | | | | Problem: The next command after `silent !{cmd}` or `silent lua print('str')` prints an empty line before printing a message, because these commands set `msg_didout = true` despite not printing any messages. Solution: Set `msg_didout = true` only if `msg_silent == 0`
* refactor: move cmdline completion types to cmdexpand_defs.h (#25465)zeertzjq2023-10-02
|
* refactor: reorganize option header files (#25437)zeertzjq2023-09-30
| | | | | | - Move vimoption_T to option.h - option_defs.h is for option-related types - option_vars.h corresponds to Vim's option.h - option_defs.h and option_vars.h don't include each other
* build(iwyu): add a few more _defs.h mappings (#25435)zeertzjq2023-09-30
|
* refactor(messages): fold msg_attr into msgbfredl2023-09-27
| | | | | problem: there are too many different functions in message.c solution: fold some of the functions into themselves
* build: download busted from own neovim/deps repositorydundargoc2023-09-03
| | | | | | | | Downloading the necessary files all at once instead of doing dependency handling with luarocks speeds up installation immensely. We speed up the process even more by using luv as a replacement for the C modules in the busted dependencies, which allows us to skip costly compilation times. Co-authored-by: bfredl <bjorn.linse@gmail.com>
* refactor(memline): distinguish mutating uses of ml_get_buf()bfredl2023-08-24
| | | | | | | | | | | | | | ml_get_buf() takes a third parameters to indicate whether the caller wants to mutate the memline data in place. However the vast majority of the call sites is using this function just to specify a buffer but without any mutation. This makes it harder to grep for the places which actually perform mutation. Solution: Remove the bool param from ml_get_buf(). it now works like ml_get() except for a non-current buffer. Add a new ml_get_buf_mut() function for the mutating use-case, which can be grepped along with the other ml_replace() etc functions which can modify the memline.
* fix(treesitter): logger memory leakLewis Russell2023-08-13
|
* docs: also change "vimL" and "viml" to "Vimscript" (#24414)zeertzjq2023-07-21
|
* refactor: rename _meta.lua to _options.luaLewis Russell2023-07-17
|
* fix(api, lua): make blank lines in a message work properly (#24244)zeertzjq2023-07-04
|
* fix(messages): use "Vimscript" instead of "VimL" #24111Justin M. Keyes2023-06-22
| | | | followup to #24109 fix #16150
* fix: vim.loop in luv threads (#23924)Lewis Russell2023-06-05
| | | Fixes #23914
* feat(lua): rename vim.loop -> vim.uv (#22846)Lewis Russell2023-06-03
|
* refactor: fix clang/PVS warnings (#23731)zeertzjq2023-05-23
|
* refactor(vim.secure): move to lua/secure.cLewis Russell2023-05-22
|
* refactor(map): avoid duplicated khash_t types for valuesbfredl2023-05-17
| | | | | | | | | | | | | | | | | | | | | This reduces the total number of khash_t instantiations from 22 to 8. Make the khash internal functions take the size of values as a runtime parameter. This is abstracted with typesafe Map containers which are still specialized for both key, value type. Introduce `Set(key)` type for when there is no value. Refactor shada.c to use Map/Set instead of khash directly. This requires `map_ref` operation to be more flexible. Return pointers to both key and value, plus an indicator for new_item. As a bonus, `map_key` is now redundant. Instead of Map(cstr_t, FileMarks), use a pointer map as the FileMarks struct is humongous. Make `event_strings` actually work like an intern pool instead of wtf it was doing before.
* fix(heredoc): allow missing end marker for scriptszeertzjq2023-04-29
| | | | Also do not crash when getting heredoc fails.
* refactor: uncrustifydundargoc2023-04-26
| | | | Notable changes: replace all infinite loops to `while(true)` and remove `int` from `unsigned int`.
* build: update uncrustify to 0.76Lewis Russell2023-04-19
|
* refactor: remove redundant castsii142023-04-07
|
* refactor: remove redundant const char * castsii142023-04-07
|
* refactor: add const and remove unnecessary casts (#22841)ii142023-04-01
|
* refactor: do more in TRY_WRAPLewis Russell2023-03-22
|
* feat(lua): allow `:=expr` as a shorter version of `:lua =expr`bfredl2023-03-22
| | | | | | | | | | | | | | | | existing behavior of := and :[range]= are unchanged. `|` is still allowed with this usage. However, :=p and similar are changed in a way which could be construed as a breaking change. Allowing |ex-flags| for := in the first place was a mistake as any form of := DOES NOT MOVE THE CURSOR. So it would print one line number and then print a completely different line contents after that.
* refactor(completion): don't add and remove '^' for Lua (#22702)zeertzjq2023-03-17
|
* refactor!: rename vim.pretty_print => vim.printJustin M. Keyes2023-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The function name `vim.pretty_print`: 1. is verbose, which partially defeats its purpose as sugar 2. does not draw from existing precedent or any sort of convention (except external projects like penlight or python?), which reduces discoverability, and degrades signaling about best practices. Solution: - Rename to `vim.print`. - Change the behavior so that 1. strings are printed without quotes 2. each arg is printed on its own line 3. tables are indented with 2 instead of 4 spaces - Example: :lua ='a', 'b', 42, {a=3} a b 42 { a = 3 } Comparison of alternatives: - `vim.print`: - pro: consistent with Lua's `print()` - pro: aligns with potential `nvim_print` API function which will replace nvim_echo, nvim_notify, etc. - con: behaves differently than Lua's `print()`, slightly misleading? - `vim.echo`: - pro: `:echo` has similar "pretty print" behavior. - con: inconsistent with Lua idioms. - `vim.p`: - pro: very short, fits with `vim.o`, etc. - con: not as discoverable as "echo" - con: less opportunity for `local p = vim.p` because of potential shadowing.
* vim-patch:8.2.1398: autoload script sourced twice if sourced directly (#22622)zeertzjq2023-03-11
| | | | | | | | | | | Problem: Autoload script sourced twice if sourced directly. Solution: Do not source an autoload script again. (issue vim/vim#6644) https://github.com/vim/vim/commit/daa2f36573db3e1df7eb1fdbc3a09a2815644048 Cherry-pick ret_sid changes from patch 8.2.0149. Use do_in_runtimepath() as that's what source_runtime() calls in Nvim. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* Merge pull request #13834 from bfredl/omniluabfredl2023-03-07
|\ | | | | omnifunc for builtin lua
| * feat(lua): omnifunc for builting lua interpreterBjörn Linse2023-03-06
| | | | | | | | | | | | | | also make implicit submodules "uri" and "_inspector" work with completion this is needed for `:lua=vim.uri_<tab>` wildmenu completion to work even before uri or _inspector functions are used.
* | feat(lua): add semver apiKelly Lin2023-03-06
|/
* fix(luado): get old_line length before executing Lua codezeertzjq2023-03-04
|
* refactor: reduce scope of locals as per the style guide (#22211)dundargoc2023-02-11
|
* refactor: replace char_u with char (#21901)dundargoc2023-02-11
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor(exit): pass error message to preserve_exit() (#22097)zeertzjq2023-02-04
| | | | | | | | | | | | | | | Problem: 1. Some calls to preserve_exit() don't put a message in IObuff, so the IObuff printed by preserve_exit() contains unrelated information. 2. If a TUI client runs out of memory or receives a deadly signal, the error message is shown on alternate screen and cannot be easily seen because the TUI exits alternate screen soon afterwards. Solution: Pass error message to preserve_exit() and exit alternate screen before printing it. Note that this doesn't fix the problem that server error messages cannot be easily seen on exit. This is tracked in #21608 and #21843.
* fix(test): fix issues detected by running unittests in ASAN/UBSANbfredl2023-01-31
|
* feat(lua): low-level interpreter mode (nvim -ll)bfredl2023-01-31
|
* refactor: replace char_u with char 25 (#21838)dundargoc2023-01-19
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with char 24 (#21823)dundargoc2023-01-18
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor: fix IWYU mapping file and use IWYU (#21802)dundargoc2023-01-15
| | | Also add the EXITFREE definition to main_lib rather than the nvim target, as the header generation needs the EXITFREE flag to work properly.
* refactor: replace char_u with char 18 (#21237)dundargoc2023-01-09
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* feat(lua): store "nvim -l" scriptname in _G.arg[0]Justin M. Keyes2023-01-07
|
* fix(coverity/433537): don't call kv_concat_len() when read_size is 0 (#21664)zeertzjq2023-01-07
| | | fix(coverity): don't call kv_concat_len() when read_size is 0
* refactor: extract code to open stdin for readingJustin M. Keyes2023-01-05
|
* refactor(lua): move _G.arg init to nlua_init()Justin M. Keyes2023-01-05
|
* feat(lua): execute stdin ("-") as LuaJustin M. Keyes2023-01-05
|