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
Björn Linse
aa50369897
inccommand: preserve extmarks when undoing preview substitution
2021-02-04 14:33:37 +01:00
Michael Lingelbach
563d7b694b
tests: add test for cursor postion when deleting buffer lines
2021-01-31 12:43:48 -08:00
chentau
f0ccac0ba4
lint
2021-01-26 17:09:35 -08:00
Tony Chen
d95a465b43
Don't show entire context when completing
2021-01-26 17:04:32 -08:00
TJ DeVries
901dd79f6a
feat: add completion to ':lua'
2021-01-26 17:04:31 -08:00
Björn Linse
adb01190c4
tests: make treesitter its own category
2021-01-03 14:47:29 +01:00
Björn Linse
39d098f9f9
api: set_text: fix some byte count issues
...
add byte count tests
update documentation
2021-01-01 19:51:58 +01:00
Björn Linse
5e202f69b3
Merge pull request #13367 from nvim-treesitter/offset-lang-injection
...
feat(treesitter): add offset predicate for language injection
2020-12-16 13:59:36 +01:00
Thomas Vigouroux
25e20da550
feat(buffer_updates): allow ignoring when previewing
...
Also adds a test that we actually subscribe to buffer events when in
CMDPREVIEW.
2020-12-15 22:29:27 +01:00
Steven Sojka
929f194145
feat(treesitter): add offset predicate for language injection
...
refactor(treesitter): add directives to queries
2020-12-15 07:03:47 -06:00
Björn Linse
52e660e857
Merge pull request #13482 from dm1try/propagate_lua_file_loading_errors
...
runtime: propagate lua parsing errors while using "require"
2020-12-10 12:15:40 +01:00
Thomas Vigouroux
99007bcc12
Merge pull request #13450 from nvim-treesitter/fix-unknown-language-parser
...
fix(treesitter): don't throw an error for missing injected langs
2020-12-10 11:12:39 +01:00
dm1try
3421485253
runtime: propagate lua parsing errors while using "require"
2020-12-10 10:53:28 +01:00
Steven Sojka
e15c5f58df
fix(treesitter): don't throw an error for missing injected langs
2020-12-04 16:56:29 -06:00
Steven Sojka
2985c17867
fix(treesitter): incorrect method name call
2020-12-04 16:15:47 -06:00
Thomas Vigouroux
52d76f0a32
fix(treesitter): allow ranges in set_included_ranges
2020-11-23 15:09:32 +01:00
Steven Sojka
1a631026a9
feat(treesitter): add language tree
...
Implement the LanguageTree structure to enable language injection.
This is done be removing the old Parser metatable and replacing by the
new structure, with the same API (almost).
Some noticeable differences :
- `parser:parse()` now returns a table of trees
- There is no incremental parsing for child (injected) languages
Co-authored-by: Thomas Vigouroux <tomvig38@gmail.com>
2020-11-23 08:06:17 +01:00
Björn Linse
1b0e4a5906
lua: make vim.inspect available early so it can be used for path debugging
2020-11-05 14:46:41 +01:00
Thomas Vigouroux
8e73cf6731
tree-sitter: ignore some tests on windows
...
Weirdl this test is failing, but can't reproduce locally, this is an
unnecessary blocker for this PR.
2020-11-03 10:39:36 +01:00
Jan Edmund Lazo
0d9fa42d83
fixup! startup: handle autoload and lua packages during startup
2020-11-02 22:37:07 -05:00
Björn Linse
c60c7375f5
startup: handle autoload and lua packages during startup
...
¡NO HAY BANDA!
2020-11-02 15:21:36 +01:00
Björn Linse
03c478ae53
treesitter: add node:id()
2020-11-01 14:59:17 +01:00
TJ DeVries
0ad5b34170
Merge pull request #12053 from tjdevries/tjdevries/nicer_validate
...
vim.validate(): include stacktrace in message
2020-10-17 16:47:18 -04:00
Thomas Vigouroux
bdbc56f931
treesitter: allow custom parser for highlighter
...
Also allow to get parser ranges.
This will be useful for language injection, allowing us to tweak the
parser's ranges on the fly.
Update runtime/lua/vim/treesitter.lua
Co-authored-by: Paul Burlumi <paul@burlumi.com>
2020-10-12 18:23:14 +02:00
Thomas Vigouroux
d3f544002c
treesitter: runtime queries
...
Runtime queries just work like ftplugins, that is:
- Queries in the `after` directory are sourced _after_ the "base" query
- Otherwise, the last define query takes precedence.
Queries can be found in the `queries` directory.
Update runtime/lua/vim/treesitter/query.lua
Co-authored-by: Paul Burlumi <paul@burlumi.com>
2020-10-11 21:18:28 +02:00
Björn Linse
0b615dae07
api: multiple decoration providers at once
2020-10-10 15:16:45 +02:00
TJ DeVries
7b89353985
lua: vim.wait allows control of fast events ( #13053 )
...
* lua: vim.wait allows control of fast events
* fixup: remove requirement of function for easier waiting
* fixup: lint
* fixup: bfredl comments
2020-10-06 12:58:05 -04:00
Justin M. Keyes
8e77d70e29
test/vim.validate(): assert normalized stacktrace
...
- The previous commit lost information in the tests. Instead, add some
more "normalization" substitutions in pcall_err(), so that the general
shape of the stacktrace is included in the asserted text.
- Eliminate contains(), it is redundant with matches()
2020-10-05 09:47:59 -04:00