summaryrefslogtreecommitdiffstatshomepage
path: root/src/nvim/lua/executor.c
AgeCommit message (Collapse)AuthorFiles
2021-09-19refactor: format with uncrustify #15722dundargoc1
2021-09-14docs: third-party licenses, TEST_COLORS, system() #15665Justin M. Keyes1
2021-09-09feat(lua): make vim.mpack support vim.NIL and vim.empty_dict()Björn Linse1
2021-09-09feat(lua): add vim.mpack for msgpack support in luaBjörn Linse1
2021-09-09feat(lua)!: register_keystroke_callback => on_keyJustin M. Keyes1
Analogous to nodejs's `on('data', …)` interface, here on_key is the "add listener" interface. ref 3ccdbc570d85 #12536 BREAKING_CHANGE: vim.register_keystroke_callback() is now an error.
2021-08-30fix(lua): make core vim module not dependent on $VIMRUNTIME functionsBjörn Linse1
fixes #15524 Note: this is obviously a quickfix. A scalabe solution will involve being able to specify a _list_ of modules to be put into packages.preload, without needing to manually copypasta a blurb of C code. Perhaps even involving bytecode for static builds (to speedup initialization)
2021-08-26Merge #15293 Vimscript "method" syntaxJustin M. Keyes1
Port VimL's method call syntax - vim-patch:8.1.{1638,1800,1803,1807,1809,1816,1820,1821,1828,1834,1835,1861,1863,1878,1879,1888,1909,1911,1912}
2021-08-22refactor(map): remove extra-allocating map_new/map_free functionsBjörn Linse1
Note: the reason for removing them is not that there after this refactor is no use of them, but rather that having them available is an anti-pattern: they manange an _extra_ heap allocation which has nothing to do with the functionality of the map itself (khash manages the real buffers internally). In case there happens to be a reason to allocate the map structure itself later, this should be made explicit using xcalloc/xfree calls.
2021-08-22Merge pull request #15451 from bfredl/metamapBjörn Linse1
perf(map): get rid of unnecessary pointer indirections for maps.
2021-08-22feat(api): add lua C bindings for xdiff (#14536)Lewis Russell1
* feat(api): add lua C bindings for xdiff * chore: opt.hunk_lines -> opt.result_type opt.on_hunk now takes precedence over opt.result_type * chore: fix indents Fix indents * chore: change how priv is managed Assign priv NULL and unconditionally apply XFREE_CLEAR to it when finished.
2021-08-22refactor(api): remove unneccesary indirection around handlesBjörn Linse1
These things are just maps to pointers, no need to perform a huge song and dance around it.
2021-08-12vim-patch:8.1.1800: function call functions have too many argumentsSean Dewar1
Problem: Function call functions have too many arguments. Solution: Pass values in a funcexe_T struct. https://github.com/vim/vim/commit/c6538bcc1cdd1fb83732f22fdc69bd9bb66f968a Use FUNCEXE_INIT to initialize funcexe_T instances. call_callback() and other Vim listener related stuff is N/A.
2021-07-19refactor(lua): initialize lua state at startup instead of dynamicallyBjörn Linse1
lua is used as part of implementation for more core features. As an example, every user keypress will invoke a lua function to check for keypress handlers (regardless if they are registered or not). Thus not starting lua until it is first used doesn't make much sense anymore. nlua_enter was also needed due to the earlier stateful &rtp translation, which by now have been made stateless.
2021-07-07chore: use codespell to spell check #15016dundargoc1
2021-06-21BugFix: Fix inconsistent verbose messageshadmansaleh1
When a keymap is set from lua currently verbose message says it's set from line 1. That's incorrect because we don't really know when it was set. So until proper :verbose support isn't added for sourceing lua it shouldn't say where it was set at.
2021-06-11refactor(source): Move lua file detection to do_sourceshadmansaleh1
So now :source can run lua files too :) * feat: Add support for :[ranged]source for lua files
2021-05-19lua: use proper conversion of vim.g valuesBjörn Linse1
2021-04-13Merge pull request #14318 from chentau/extmark_luadoBjörn Linse1
extmark: splice extmarks on :luado
2021-04-12extmark: splice extmarks on :luadochentau1
2021-04-03test/lsp: disable tracking in LSP tests (here be dragons)Björn Linse1
2021-04-03luaref: simplify handling of table callables and fix leak in vim.fn.call(table)Björn Linse1
I AM THE TABLE
2021-04-03luaref: fix leaks for global luarefsBjörn Linse1
2021-04-03lua: track reference ownership with ASAN when presentBjörn Linse1
2021-03-30ts: Add language version to vim.treesitter (#14255)TJ DeVries1
2021-01-26lintchentau1
2021-01-26Don't show entire context when completingTony Chen1
2021-01-26feat: add completion to ':lua'TJ DeVries1
2021-01-18api: add vim.version (#13762)Michael Lingelbach1
retrun a structured version dict :lua print(vim.inspect(vim.version())) { api_compatible = 0, api_level = 7, api_prerelease = true, major = 0, minor = 5, patch = 0 }
2020-12-01executor: use new nlua_ name patternBjörn Linse1
2020-12-01startup: add init.lua as an alternative user config, fixes #7895dm1try1
2020-11-11Removed restricted mode - Fix #11972georg3tom1
2020-11-05lua: make vim.inspect available early so it can be used for path debuggingBjörn Linse1
2020-11-02startup: handle autoload and lua packages during startupBjörn Linse1
¡NO HAY BANDA!
2020-11-01api: add API for themesBjörn Linse1
co-author: hlpr98 <hlpr98@gmail.com> (dict2hlattrs function) orange is sus?? NOVEMBER DAWN erase the lie that is redraw_later()
2020-10-06lua: vim.wait allows control of fast events (#13053)TJ DeVries1
* lua: vim.wait allows control of fast events * fixup: remove requirement of function for easier waiting * fixup: lint * fixup: bfredl comments
2020-09-10lua: cleanup naming conventions of executor functionsBjörn Linse1
2020-08-14lua: add vim.register_keystroke_callback (#12536)TJ DeVries1
* feat: Add vim.register_keystroke_callback * fixup: Forgot to remove mention of old option * fixup: Answer jamessan comments * fixup: Answer norcalli comments * fixup: portability * Update runtime/doc/lua.txt Co-authored-by: Ashkan Kiani <ashkan.k.kiani@gmail.com>
2020-08-10fix: runtimepath always updates lua package.pathTJ DeVries1
2020-07-20Merge pull request #12653 from erw7/fix-build-freebsd-ciJames McCoy1
build: Fix build failure with CI in FreeBSD
2020-07-20build: Fix build failure with CI in FreeBSDerw71
Co-authored-by: James McCoy <jamessan@jamessan.com>
2020-07-19lua: Fix crash on unprotected lua errors (#12658)TJ DeVries1
Can be reproduced with a script like this: -- in some lua file vim.fn.timer_start(10, function() error("uh....") end) -- will cause neovim to crash with the following error. PANIC: unprotected error in call to Lua API (nlua_CFunction_func_call failed.) After this, it will instead print the error message from the top of the stack, like so. tmp/error_nvim.lua:10: uh... Also added an example test. Previously this test caused the embedded nvim to panic.
2020-07-10lua: Add ability to pass tables with __callTJ DeVries1
vim-patch:8.2.1054: not so easy to pass a lua function to Vim vim-patch:8.2.1084: Lua: registering function has useless code I think I have also opened up the possibility for people to use these callbacks elsewhere, since I've added a new struct that we should be able to use. Also, this should allow us to determine what the state of a list is in Lua or a dictionary in Lua, since we now can track the luaref as we go.
2020-07-10lua: Add ability to pass lua functions directly to vimLTJ DeVries1
2020-06-23treesitter: simplify puhstree call processThomas Vigouroux1
2020-05-30lua: vim.wait implementationTJ DeVries1
2020-05-30lua: vim.wait initial outlineBjörn Linse1
2020-04-26Merge #11851 'eval.c: factor out eval/userfunc.c'Justin M. Keyes1
vim-patch:7.4.2058
2020-02-26lua: add regex support, and `@match` support in treesitter queriesBjörn Linse1
2020-02-13rename: user_funcs -> userfuncJakub Łuczyński1
Lets stick with vim for now
2020-02-13fix: includesJakub Łuczyński1