aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/generators/gen_eval.lua
Commit message (Collapse)AuthorAge
* vim-patch:8.1.2062: the mouse code is spread out (#24817)zeertzjq2023-08-21
| | | | | | | | | | | | | | | | | | | | | Problem: The mouse code is spread out. Solution: Move all the mouse code to mouse.c. (Yegappan Lakshmanan, closes vim/vim#4959) https://github.com/vim/vim/commit/b20b9e14ddd8db111e886ad0494e15b955159426 Also move getmousepos() there. N/A patches for version.c: vim-patch:8.1.2070: mouse code is spread out Problem: Mouse code is spread out. Solution: Move mouse terminal code parsing to mouse.c. (Yegappan Lakshmanan, closes vim/vim#4966) https://github.com/vim/vim/commit/b8ff5c271ee5dcef6f63436b77e228e062ff9a0e Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.1.2047: cannot check the current statezeertzjq2023-08-21
| | | | | | | | | Problem: Cannot check the current state. Solution: Add the state() function. https://github.com/vim/vim/commit/0e57dd859ecb1e8a3b91509d2f4343e839340eb8 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* feat(docs): generate builtin.txt (#24493)Lewis Russell2023-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - eval.lua is now the source of truth. - Formatting is much more consistent. - Fixed Lua type generation for polymorphic functions (get(), etc). - Removed "Overview" section from builtin.txt - Can generate this if we really want it. - Moved functions from sign.txt and testing.txt into builtin.txt. - Removed the *timer* *timers* tags since libuv timers via vim.uv should be preferred. - Removed the temp-file-name tag from tempname() - Moved lueval() from lua.txt to builtin.txt. * Fix indent * fixup! * fixup! fixup! * fixup! better tag formatting * fixup: revert changes no longer needed * fixup! CI --------- Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* vim-patch:partial:8.1.1981: the evalfunc.c file is too big (#24490)zeertzjq2023-07-26
| | | | | | | | | | | | | Problem: The evalfunc.c file is too big. Solution: Move undo functions to undo.c. Move cmdline functions to ex_getln.c. Move some container functions to list.c. https://github.com/vim/vim/commit/08c308aeb5e7dfa18fa61f261b0bff79517a4883 Undo functions only. Cmdline functions have already been moved. A lot of container functions have been added to eval/funcs.c instead of list.c in previously ported Vim 8.2.x patches, so deal with that later. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.2344: using inclusive index for slice is not always desiredzeertzjq2023-05-04
| | | | | | | | | | | | Problem: Using inclusive index for slice is not always desired. Solution: Add the slice() method, which has an exclusive index. (closes vim/vim#7408) https://github.com/vim/vim/commit/6601b62943a19d4f8818c3638440663d67a17b6a Cherry-pick a line in docs added later. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.3139: functions for string manipulation are spread out (#23316)zeertzjq2023-04-26
| | | | | | | | | Problem: Functions for string manipulation are spread out. Solution: Move string related functions to a new source file. (Yegappan Lakshmanan, closes vim/vim#8470) https://github.com/vim/vim/commit/a2438132a675be4dde3acbdf03ba1fdb2f09427c Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* fix(build): distinguish vim.mpack from global require'mpack'bfredl2023-04-20
| | | | | problem: the api of vim.mpack is not compatible with a system provided mpack solution: don't require 'mpack' directly from the system path
* refactor(build): use vendored versions of mpack and luabitopbfredl2023-04-19
|
* refactor: remove use of reserved c++ keywordsii142023-04-06
| | | | | | libnvim couldn't be easily used in C++ due to the use of reserved keywords. Additionally, add explicit casts to *alloc function calls used in inline functions, as C++ doesn't allow implicit casts from void pointers.
* vim-patch:9.0.0244: cannot easily get the list of sourced scripts (#22596)Michal Liszcz2023-03-11
| | | | | | | | | | | Problem: Cannot easily get the list of sourced scripts. Solution: Add the getscriptinfo() function. (Yegappan Lakshmanan, closes vim/vim#10957) https://github.com/vim/vim/commit/f768c3d19c518822d89dec4cc3947ddeea249316 Cherry-pick usr_41.txt change from a later runtime update. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* build: make generated source files reproducible #21586Arnout Engelen2023-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Build is not reproducible, because generated source files (.c/.h/) are not deterministic, mostly because Lua pairs() is unordered by design (for security). https://github.com/LuaJIT/LuaJIT/issues/626#issuecomment-707005671 https://www.lua.org/manual/5.1/manual.html#pdf-next > The order in which the indices are enumerated is not specified [...] > >> The hardening of the VM deliberately randomizes string hashes. This in >> turn randomizes the iteration order of tables with string keys. Solution: - Update the code generation scripts to be deterministic. - That is only a partial solution: the exported function (funcs_metadata.generated.h) and ui event (ui_events_metadata.generated.h) metadata have some mpack'ed tables, which are not serialized deterministically. - As a workaround, introduce `PRG_GEN_LUA` cmake setting, so you can inject a modified build of luajit (with LUAJIT_SECURITY_PRN=0) that preserves table order. - Longer-term we should change the mpack'ed data structure so it no longer uses tables keyed by strings. Closes #20124 Co-Authored-By: dundargoc <gocdundar@gmail.com> Co-Authored-By: Arnout Engelen <arnout@bzzt.net>
* vim-patch:8.1.2001: some source files are too big (#21231)zeertzjq2022-11-29
| | | | | | | Problem: Some source files are too big. Solution: Move buffer and window related functions to evalbuffer.c and evalwindow.c. (Yegappan Lakshmanan, closes vim/vim#4898) https://github.com/vim/vim/commit/261f346f8154c0ec7094a4a211c653c74e9f7c2e
* build: allow IWYU to fix includes for all .c filesdundargoc2022-11-15
| | | | | | | | | | 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.
* perf(api): allow to use an arena for return valuesbfredl2022-08-23
|
* 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(eval): use Hashy McHashFace instead of gperfbfredl2022-05-12
| | | | this removes gperf as a build dependency
* vim-patch:8.1.1807: more functions can be used as a methodSean Dewar2021-08-12
| | | | | | | | | Problem: More functions can be used as a method. Solution: Add append(), appendbufline(), assert_equal(), etc. Also add the :eval command. https://github.com/vim/vim/commit/25e42231d3ee27feec2568fa4be2aa2bfba82ae5 :eval is already ported.
* vim-patch:8.1.1803: all builtin functions are globalSean Dewar2021-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: All builtin functions are global. Solution: Add the method call operator ->. Implemented for a limited number of functions. https://github.com/vim/vim/commit/ac92e25a33c37ec5becbfffeccda136c73b761ac - Note that to *exactly* port hunk @@ -7376,18 +7444,19 from handle_subscript(), we need the :scriptversion patches (I have an open PR for those, but this patch works fine without them anyway). - Port call_internal_func() from v7.4.2058. - Adjust some error messages in tests, as they rely on the Blob patches. - Add a modeline to test_method.vim. Ignore the global_functions and base_method tables and prefer the current GPerf implementation. Instead, add an extra base_arg field to VimLFuncDef that holds the number of the argument to use as the base (1-indexed, so that 0 may be used to refer to functions that cannot be used as methods). This also means we support using any argument as a base from the get-go, rather than just the first (Vim includes this ability in future patches, however). To mark a function as usable as a method, use the "base" key as described in eval.lua.
* api: allow open non-current buffer as terminal (+ xmas bonus)Björn Linse2021-03-12
| | | | vim.api.nvim_chan_send(vim.api.nvim_open_term(0), io.open("/path/to/smile.cat", "r"):read("*a"))
* tree-sitter: implement query functionality and highlighting prototype ↵Björn Linse2019-12-22
| | | | [skip.lint]
* gen_eval.lua: use correct name in usageDaniel Hahler2019-07-30
|
* Fix luacheck errors for all Lua source filesSameed Ali2019-07-04
|
* api: always use prefix FUNC_API, also change NOEVAL to REMOTE_ONLYBjörn Linse2017-05-10
|
* generators: separate source generators from scriptsBjörn Linse2017-05-10