Björn Linse
0f596665cc
feat(lua): make vim.mpack support vim.NIL and vim.empty_dict()
2021-09-09 16:06:43 +02:00
Justin M. Keyes
69fe427df4
feat(lua)!: register_keystroke_callback => on_key
...
Analogous to nodejs's `on('data', …)` interface, here on_key is the "add
listener" interface.
ref 3ccdbc570d
#12536
BREAKING_CHANGE: vim.register_keystroke_callback() is now an error.
2021-09-09 06:09:33 -07:00
Björn Linse
6896d22b63
fix(lua): preserve argument lists which are not lists
2021-08-29 16:04:50 +02:00
notomo
08e223cebb
tests(lua/on_yank): assert conditions that fail correctly #15495
...
The test added in 274a3504a7
does not fail if the code changes are reverted.
2021-08-27 04:54:01 -07:00
notomo
274a3504a7
fix(lua): verify buffer in highlight.on_yank ( #15482 )
...
Resolve an issue with deferred clearing of highlight failing if the
buffer is deleted before the timeout by checking whether the
buffer is valid first.
2021-08-26 16:37:36 +02:00
Justin M. Keyes
4c499899b2
Merge #15293 Vimscript "method" syntax
...
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-26 04:26:32 -07:00
Thomas Vigouroux
14231463a4
fix(bufupdates): send correct updates for visual paste
...
One step further towards stable tree-sitter.
Co-authored-by: Björn Linse <bjorn.linse@gmail.com >
2021-08-25 15:11:39 +02:00
Lewis Russell
3d3c0c669d
feat(api): add lua C bindings for xdiff ( #14536 )
...
* 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-22 12:22:04 +02:00
Sean Dewar
b2994e35c9
feat(v:lua): support calling v:lua as a method
2021-08-13 01:11:36 +01:00
Sean Dewar
da9005af79
fix(v:lua): fix emsg when calling v:lua directly
...
v:lua expressions are represented using vvlua_partial. As v:lua isn't
intended to be called directly, it's given an empty pt_name.
Because of this, calling v:lua directly like "v:lua()" will cause "E117:
Unknown function: ", with an empty name.
Instead, have call_func() show the name "v:lua" in the emsg.
2021-08-12 22:35:25 +01:00
Folke Lemaitre
526fc609b8
fix(shared): do not treat empty tables as list in deep extend ( #15094 )
...
An empty table was previously always treated as a list, which means that
while merging tables, whenever an empty table was encountered it would
always truncate any table on the left.
`vim.tbl_deep_extend("force", { b = { a = 1 } }, { b = {} })`
Before: `{ b = {} }`
After: `{ b = { a = 1 } }`
2021-07-19 08:52:44 -07:00
Tom Payne
1dab9357de
feat(vim.uri): Allow URI schemes other than file: without authority
2021-07-10 18:27:37 +01:00
Alessandro Pezzoni
ce5f4228aa
test(lsp): file URIs without a hostname
2021-07-10 18:27:37 +01:00
jadedpasta
490615612e
fix(vim.opt): vimL map string values not trimmed ( #14982 )
...
Options formatted as a list of comma-separated key-value pairs may have
values that contain leading and trailing whitespace characters. For
example, the `listchars` option has a default value of
`"tab:> ,trail:-,nbsp:+"`. When converting this value to a lua table,
leading and trailing whitespace should not be trimmed.
Co-authored-by: Robert Hrusecky <robert.hrusecky@utexas.edu >
2021-07-04 00:14:39 -07:00
TJ DeVries
2bcf18deaa
Merge pull request #14779 from tjdevries/tjdevries/vim_opt_fixes
...
An assortment of various vim.opt fixups.
2021-06-29 10:24:41 -04:00
Björn Linse
f8990870ff
Merge pull request #14335 from chentau/extmark_delbytes
...
Extmarks: manually zero out `curbuf->deleted_bytes2` on substitute and join
2021-06-29 15:31:23 +02:00
TJ DeVries
19b7cef0a7
fix(vim.opt): Fix #14828 with empty values being incorrectly inserted
2021-06-29 09:18:59 -04:00
TJ DeVries
6ecec87c09
fix(vim.opt): Fix #14668 Now correctly handles unescaped commas in isfname style
2021-06-29 08:42:07 -04:00
TJ DeVries
9119ea1bec
fix(vim.opt): Fix #14669 whichwrap now acts as expected
2021-06-29 08:42:07 -04:00
David Zhang
b02e64c4df
fix(vim.opt): Add basic error handling
2021-06-29 08:42:07 -04:00
ckipp01
e6175f6389
fix(vim.opt): Get window options before setting.
...
This closes #14677 , but I also am a little unsure if there are times
where this may not be correct. However, this just changes the behavior
that even if `was_set` was false, we still get for
`nvim_win_get_option`.
2021-06-29 08:42:07 -04:00
TJ DeVries
1d3ee1c441
fix(vim.opt): #14708 Now lets you put duplicate values in wildmode
2021-06-29 08:42:07 -04:00
chentau
1c962401a1
Manually zero out deleted_bytes2 when substituting and joining lines
2021-06-29 00:48:24 -07:00
shadmansaleh
92b6b3764c
refactor(tests): Simplify tests at functional/lua/runtime_spec
2021-06-11 01:01:03 +06:00
shadmansaleh
f000251e08
feat(runtime): Allow lua to be used in syntax
2021-06-11 01:01:03 +06:00
shadmansaleh
f256a18fef
feat(runtime): Allow lua to be used in ftdetect
2021-06-11 01:01:02 +06:00
shadmansaleh
4dffe1ff2f
feat(runtime): Allow lua to be used in indent
2021-06-11 01:01:02 +06:00
shadmansaleh
fd5e5d2715
feat(runtime): Allow lua to be used in ftplugin
2021-06-11 01:01:02 +06:00
shadmansaleh
68be8b99cf
feat(runtime): Allow lua to be used in compiler
2021-06-11 01:01:02 +06:00
shadmansaleh
1e6c02510a
feat(runtime): Allow lua to be used in colorschemes
...
* tests(runtime): move runtime/plugin tests to functional/lua/runtime_spec
2021-06-11 01:01:02 +06:00
notomo
1a9eb7a987
api: add nvim_win_call
2021-06-10 09:34:29 +02:00
jbyuki
a15c2cbab6
add tests in buffer_updates
2021-06-09 12:20:13 -07:00
TJ DeVries
43956dea55
lua: Add vim.opt and fix scopes of vim.o ( #13479 )
...
* lua: Add vim.opt
* fixup: cleaning
* fixup: comments
* ty clason
* fixup: comments
* this is the last commit. period.
2021-05-28 17:24:48 +02:00
Thomas Vigouroux
3bd9cce368
Merge pull request #14575 from vigoux/virtualedit-bytes
...
fix(bufupdate): send events when inserting with virtualedit
2021-05-20 20:05:25 +02:00
Björn Linse
7fbf3bf18b
lua: use proper conversion of vim.g values
2021-05-19 19:29:19 +02:00
Thomas Vigouroux
237175cf20
fix(bufupdate): send events when inserting with virtualedit
...
Problem first raised
https://github.com/nvim-treesitter/nvim-treesitter/issues/1304
2021-05-18 19:31:56 +02:00
chentau
13a9bd006f
make get_region_bytecount end-exclusive
2021-05-09 16:23:01 -07:00
chentau
a847abc21b
refactor nvim_buf_set_lines to use extmark_splice
2021-05-09 16:22:20 -07:00
chentau
37c8067226
splice extmarks on every line for block visual paste
2021-05-06 20:40:26 -07:00
Björn Linse
63b64ebab0
Merge pull request #14385 from chentau/extmark_delete
...
Extmarks: remove `curbuf->deleted_bytes2` from `op_delete`
2021-04-17 09:25:44 +02:00
chentau
e32eaf6538
extmarks: remove curbuf->deleted_bytes2 from op_delete
2021-04-16 23:42:53 -07:00
chentau
5a36d413fb
flush curbuf->deleted_bytes2 after calling do_move
2021-04-14 21:47:21 -07:00
Björn Linse
c9817603cf
Merge pull request #14318 from chentau/extmark_luado
...
extmark: splice extmarks on :luado
2021-04-13 15:00:42 +02:00
chentau
ff43d9597e
extmark: splice extmarks on :luado
2021-04-12 11:33:50 -07:00
Björn Linse
6435b46b48
Merge pull request #14317 from chentau/extmark_sub
...
extmark: correct extmark_splice call with substitute and inccommand when replacing with escaped backslashes
2021-04-10 18:14:42 +02:00
chentau
343ee2d254
extmark: correct extmark_splice call with inccommand
2021-04-09 00:34:02 -07:00
chentau
7602c56050
extmark: fixes for noexpandtab and retab
2021-04-02 16:21:46 -07:00
Björn Linse
1186f7dd96
Merge pull request #14191 from chentau/extmark_blockpaste
...
Extmarks: send correct buffer events on blockwise paste for nonuniform lines
2021-03-24 00:27:55 +01:00
chentau
7fbabbaa57
Extmarks: correct buffer events on blockwise paste
2021-03-23 14:06:57 -07:00
chentau
a92a8ef506
Correctly splice extmarks on tab with noexpandtab set
2021-03-22 20:26:25 -07:00