Björn Linse
c1dc1bedba
tree-sitter: style
2019-09-28 14:55:43 +02:00
Björn Linse
c8f861b739
tree-sitter: rename tree_sitter => treesitter for consistency
2019-09-28 14:55:43 +02:00
Björn Linse
4ea5e63aa8
tree-sitter: add basic testing on ci
...
build tree-sitter c parser on ci for testing purposes
2019-09-28 14:55:43 +02:00
Björn Linse
afba23099f
tree-sitter: support pre-registration of languages
2019-09-28 14:55:43 +02:00
Björn Linse
1e9e2451be
tree-sitter: objectify API
2019-09-28 14:55:43 +02:00
Björn Linse
0e0beef85e
tree-sitter: load parsers as .so files
2019-09-28 14:31:03 +02:00
Björn Linse
cd10096386
tree-sitter: initial tree-sitter support
2019-09-28 14:31:03 +02:00
Björn Linse
7a85792884
tui/input: defer nvim_paste properly.
...
Otherwise cursor and redraw code for normal and insert mode will not run. The
"tickle" workaround was used for this instead, and can now be removed.
The builtin vim.lua got the name
[string "-- Nvim-Lua stdlib: thevimmodule (:help l..."]
in error messages. Fix it to something reasonable.
2019-08-31 09:20:24 +02:00
Daniel Hahler
e2d6e67bbc
Merge pull request #10171 from blueyed/vim-8.1.1318
...
vim-patch:8.1.1318: code for text changes is in a "misc" file
2019-08-09 19:25:56 +02:00
Björn Linse
1f54f68732
lua: minimal UTF-16 support needed for LSP
2019-08-08 20:10:14 +02:00
Daniel Hahler
0e3b9ea74d
includes
2019-08-07 14:21:23 +02:00
Björn Linse
88938634e7
lua: add vim.in_fast_event() to check if we are in a luv callback
2019-08-05 13:57:24 +02:00
Björn Linse
e6d77993d1
lua: do not crash on syntax error in debug.debug()
2019-08-05 13:19:44 +02:00
Björn Linse
d3a7bdefb0
lua: immediate-callback safe print()
2019-08-05 13:19:44 +02:00
Björn Linse
6ee05536ca
api/lua: make nvim_execute_lua use native lua floats, not special tables
...
Rationale: the purpose of nvim_execute_lua is to simply call lua code with lua
values. If a lua function expects a floating point value, it should be enough
to specify a float as argument to nvim_execute_lua.
However, make sure to preserve the existing roundtripping behavior of
API values when using `vim.api` functions. This is covered by existing
lua/api_spec.lua tests.
2019-07-01 18:44:58 +02:00
Björn Linse
99f24dfbed
make vim.loop == require'luv'
...
This avoids initializing libluv a second time if a plugin invokes
require'luv'. It is probably not an issue, but better to be safe.
2019-06-30 15:16:32 +02:00
Björn Linse
d33aaa0f5f
libluv: use luv_set_callback to control callback execution
...
Disable the use of deferred API functions in a fast lua callback
Correctly display error messages from a fast lua callback
2019-06-30 13:13:08 +02:00
Björn Linse
64cdf9f78a
api/lua: add on_detach to nvim_buf_attach
2019-06-15 13:19:12 +02:00
George Zhao
c83926cd0a
lua: introduce vim.loop (expose libuv event-loop) #10123
...
Co-authored-by: Andrey Popp <8mayday@gmail.com >
closes #9546
closes #10084
2019-06-10 14:13:18 +02:00
Björn Linse
b684bd05b5
lua: docs and tests for vim.schedule
2019-06-05 10:46:22 +02:00
Andrey Popp
81e1dbca99
lua: add vim.schedule(cb)
...
This executes Lua callback on main loop's event queue so that nvim API
is safe to call.
2019-06-05 10:42:23 +02:00
Björn Linse
f5c56f03bb
api: allow nvim_buf_attach from lua using callbacks
2019-06-04 13:45:20 +02:00
Björn Linse
8ed54bbec3
messages: use proper multiline error message for rpcrequest and API wrappers
2019-05-26 15:42:16 +02:00
Justin M. Keyes
11a481f711
Merge #9686 'win/Lua: monkey-patch os.getenv()'
...
fixes #9681
2019-03-16 20:28:52 +01:00
erw7
c9264e6d52
Fix os.getenv of lua on Windows
...
Change to use os_getenv instead of getenv because environment variable
set by uv_os_setenv can not be get with getenv.
2019-03-07 13:49:02 +09:00
Björn Linse
27b7813025
cleanup: reduce some duplicate code, avoid function pointers for a condition
...
Add 'multiline' flag to history for correct :messages output
Use larger buffer size for multiline messages. if this turns out to not
be enough, we could do size calculation like api_set_error
2019-01-23 19:34:13 +01:00
Alexandre Dubray
7f2e43c637
message.c: add msg_echo_attr functions, use it for lua error messages
...
The added function behaves like the non-echo function but display message
in a echo-style way (i.e. tab and newline are preserved)
2019-01-22 20:15:27 +01:00
MichaHoffmann
affef0aab8
add func_attr_printf in :
...
log.c
message.c
strings.c
fixed some printf warnings in:
src/nvim/undo.c
src/nvim/eval.c
src/nvim/eval/encode.c
src/nvim/eval/typval.c
src/nvim/ex_getln.c
src/nvim/fileio.c
src/nvim/lua/executor.c
src/nvim/main.c
src/nvim/regexp_nfa.c
src/nvim/shada.c
src/nvim/spellfile.c
src/nvim/tui/terminfo.c
src/nvim/garray.h
2018-09-24 21:28:04 +02:00
ZyX
db346b5b48
lua/executor: Remove all places where lightuserdata is used
...
Should fix problems with luajit+arm64.
Fixes #7879
Ref LuaJIT/LuaJIT#230
2018-01-21 01:47:46 +03:00
Justin M. Keyes
842a54a1bb
doc
2017-11-06 01:56:04 +01:00
Justin M. Keyes
42b80c3acf
Merge #7165 'lua: Move stricmp to vim module'
2017-10-22 16:29:36 +02:00
ZyX
b1a8dcefee
lua/executor: Fix crash when first string contains NUL and second not
2017-08-15 17:18:05 +03:00
ZyX
93ef823f5e
lua/executor: Move stricmp to vim “module” and document it
2017-08-15 16:34:51 +03:00
ZyX
ef6641ba69
lua/executor: Make stricmp function work with strings with NULs
2017-08-15 16:34:25 +03:00
Nikolai Aleksandrovich Pavlov
bf1b1ea6ee
lua/executor: Fix crash when printing empty string ( #7157 )
2017-08-13 17:37:35 +02:00
Justin M. Keyes
f34befe74c
Merge #6789 from ZyX-I/lua-path
...
lua: Add paths from &runtimepath to package.path and package.cpath
2017-06-27 02:29:15 +02:00
Björn Linse
3f553ac0b9
lint: fix indentation of FUNC_ATTR lines
2017-06-03 08:17:22 +02:00
ZyX
97602371e6
lua: Add paths from &runtimepath to package.path and package.cpath
2017-05-25 16:27:40 +03:00
ZyX
7dc7d2f83f
lua: Add PVS comment to lua/*.c
2017-05-20 05:06:55 +03:00
Björn Linse
f424189093
api: execute lua directly from the remote api
2017-05-13 15:03:42 +02:00
ZyX
f98a3d85ed
lua: Move files from src/nvim/viml/executor to src/nvim/lua
2017-04-11 01:09:36 +03:00