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
Björn Linse
e355cc8cc5
Merge pull request #13875 from smolck/vim_fn_error_on_api
...
vim.fn: throw error when trying to use API function
2021-03-09 23:12:23 +01:00
smolck
d1899bb5f4
use pcall_err
2021-03-09 15:23:42 -06:00
Björn Linse
6995fad260
Merge pull request #13973 from chentau/on_bytes_undofile
...
New versions of neovim will not read undofiles written by nvim before this merge (there will be an error message about incopmatible version). Nvim 0.4 (or an master up to bda12927be
) can be used to recover older undofiles, so if you worried about unsaved changes lurking around in undofiles it would make sense to keep such version around somewhere to recover them.
This is a necessary change to keep tree-sitter and plugins dependent on byte-level buffer change events fully working with undo states from a undofile. If there is a clear demand we might implement reading of the old format. Such recovered buffers will not be be fully functional with plugins relying on buffer updates or tree-sitter, however.
2021-03-03 09:45:06 +01:00
chentau
f42e932df4
Extmarks: Save extmark undo information to undofile.
2021-03-02 12:45:54 -08:00
Björn Linse
772421f6b1
Merge pull request #13692 from mjlbach/fix_cursor_respect_current_line
...
fix_cursor: do not change line number when edit will not impact cursor row
2021-02-16 18:32:38 +01:00
Björn Linse
c7a65fe6a1
buffer_updates: autoload episode III: revenge of the trees
2021-02-14 11:10:36 +01:00
Björn Linse
94622ca66b
buffer updates: add on_reload callback and handle it in treesitter parser
2021-02-10 18:58:46 +01:00
Thomas Vigouroux
3094bb4e38
fix(buf_updates): send updates when putting past last line
...
Fixes #13710
2021-02-08 19:08:42 +01:00
smolck
ad1a437835
vim.fn: add test for error
2021-02-04 09:22:27 -06:00
Björn Linse
209fb35acd
tests: clean up lua/buffer_updates_spec.lua
2021-02-04 14:35:30 +01:00