aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua
Commit message (Collapse)AuthorAge
* tests: disable hl glitch test for now, will be fixed in luahl (next PR)Björn Linse2020-09-10
|
* fix lintsThomas Vigouroux2020-09-09
|
* api/buffer: add "on_bytes" callback to nvim_buf_attachBjörn Linse2020-09-09
| | | | | | This implements byte-resolution updates of buffer changes. Note: there is no promise that the buffer state is valid inside the callback!
* treesitter: revert wrong optimization in highlightsThomas Vigouroux2020-09-09
|
* tests: update query.list_predicates() testBjörn Linse2020-09-06
|
* treesitter: Use excplicit names in testsThomas Vigouroux2020-09-06
|
* treesitter: allow to list supported predicatesThomas Vigouroux2020-09-04
|
* Merge pull request #12814 from theHamsta/escape-queriesThomas Vigouroux2020-09-01
|\ | | | | treesitter: avoid escaping complete query strings
| * treesitter: avoid escaping complete query stringsStephan Seitz2020-08-31
| | | | | | | | | | Escape "\\" only for `vim-match?` not for `match?` Fixes #12595
* | treesitter: add node:field() to get field childrenThomas Vigouroux2020-09-01
| |
* | treesitter: allow to iterate over node childrenThomas Vigouroux2020-08-31
|/
* fix(win): ignore closing wins in win_findbuf #12798Thomas Vigouroux2020-08-31
| | | | | This caused segfaults when calling win_findbuf in an `on_detach` callback, when the callback was triggered when closing the last window containing the buffer.
* lua: add vim.register_keystroke_callback (#12536)TJ DeVries2020-08-14
| | | | | | | | | | | | | | | * 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>
* treesitter: add and test vim-match? predicateThomas Vigouroux2020-08-13
|
* treesitter: add contains? predicateThomas Vigouroux2020-08-13
|
* treesitter: refactor and use lua regexesThomas Vigouroux2020-08-13
|
* buffer_updates: emit valid old_byte_sizeThomas Vigouroux2020-07-21
| | | | | Test this using treesitter highlighting, which is based on this old_byte_size.
* lua: Fix crash on unprotected lua errors (#12658)TJ DeVries2020-07-19
| | | | | | | | | | | | | | | | | | 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.
* lua: Add ability to pass tables with __callTJ DeVries2020-07-10
| | | | | | | | | | | | 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.
* lua: Add ability to pass lua functions directly to vimLTJ DeVries2020-07-10
|
* treesitter: update test to show overlapping worksThomas Vigouroux2020-07-10
|
* treesitter: use single nodes in set_rangesThomas Vigouroux2020-06-29
| | | | fixup! treesitter: fix lint
* treesitter: separate tests into smaller piecesThomas Vigouroux2020-06-29
|
* treesitter: use nodes to mark rangesThomas Vigouroux2020-06-29
|
* treesitter: test newly added set_included_rangesThomas Vigouroux2020-06-29
|
* Merge pull request #12321 from vigoux/treesitter-runtimeMatthieu Coudron2020-06-06
|\ | | | | treesitter: update runtime
| * treesitter: fix testsThomas Vigouroux2020-06-03
| |
| * treesitter: update runtimeThomas Vigouroux2020-06-02
| | | | | | | | | | Since tree-sitter PR 615, predicates are not parsed the same. "Old" way of writing predicates is still supported.
* | test: remove flaky unhelpful testTJ DeVries2020-06-06
| | | | | | | | vim.wait( sthg)
* | lua: fix behavior when split empty string (#12429)notomo2020-06-04
| | | | | | | | | | * lua: fix behavior when split empty string * test: lsp.util.apply_text_edits with an empty edit
* | lua: fix infinite loop for vim.split on empty string (#12420)notomo2020-06-02
|/
* lua: vim.wait implementationTJ DeVries2020-05-30
|
* Change uri_to_fname to not convert non-file URIs (#12351)Mathias Fußenegger2020-05-22
| | | | | | | | | * Change uri_to_fname to not convert non-file URIs A URI with a scheme other than file doesn't have a local file path. * fixup! Change uri_to_fname to not convert non-file URIs * fixup! fixup! Change uri_to_fname to not convert non-file URIs
* test: fix flaky vim.defer_fn testHirokazu Hata2020-05-19
|
* lua: Add highlight.on_yank (#12279)Christian Clason2020-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add lua function to highlight yanked region * extract namespace, better naming, default values * add default for event argument * free timer * factor out mark to position calculation * d'oh * make sure timer stops before callback (cf. luv example) * factor out timer, more documentation * fixup * validate function argument for schedule * fix block selection past eol * correct handling of multibyte characters * move arguments around, some cleanup * move utility functions to vim.lua * use anonymous namespaces, avoid local api * rename function * add test for schedule_fn * fix indent * turn hl-yank into proper (hightlight) module * factor out position-to-region function mark extraction now part of highlight.on_yank * rename schedule_fn to defer_fn * add test for vim.region * todo: handle double-width characters * remove debug printout * do not shadow arguments * defer also callable table * whitespace change * move highlight to vim/highlight.lua * add documentation * add @return documentation * test: add check before vim.defer fires * doc: fixup
* lua: add tbl_deep_extend (#11969)Hirokazu Hata2020-05-17
|
* lua: Add buffer, window and tab accessors (#12268)TJ DeVries2020-05-07
| | | | | * Add buffer, window and tab accessors * Fix deletion and add tests
* LSP: Avoid URI-to-fname conversion for non-file URIs #12243Mathias Fußenegger2020-05-04
| | | Fixes https://github.com/neovim/neovim/issues/12210
* lua: allow deepcopy of functions (#12136)Tristan Konolige2020-04-19
|
* vim.uri: fix uri_to_fname (#12059)Hirokazu Hata2020-03-30
| | | | | fix: #12056 If the colon of the drive letter of windows is URI encoded, it doesn't match the expected pattern, so decode it first.
* lua: add vim.tbl_len() #11889Hirokazu Hata2020-03-01
|
* lua: add regex support, and `@match` support in treesitter queriesBjörn Linse2020-02-26
|
* lua: move test helper function, map and filter, to vim.shared moduleHirokazu Hata2020-02-18
|
* Merge pull request #11864 from h-michael/deepcopyBjörn Linse2020-02-15
|\ | | | | lua: vim.deepcopy() and vim.tbl_extend() should preserve vim.empty_dict()
| * lua: add vim.tbl_extend and vim.deepcopy testHirokazu Hata2020-02-14
| |
| * lua: vim.deepcopy uses empty_dict() instead of {} for empty_dict()Hirokazu Hata2020-02-13
| | | | | | | | fix: https://github.com/neovim/nvim-lsp/issues/94
* | test: add json_encode test for vim.empty_dict()Hirokazu Hata2020-02-12
|/
* treesitter: add standard &rtp/parser/ search path for parsersBjörn Linse2020-02-07
|
* doc: fix typos [ci skip] #11787Hye Sung Jung2020-01-30
|
* Fix shift change callbacks reading bad cursor (#11782)Axel Forsman2020-01-30
| | | | | | | | | | | | | | Sloppy code inherited from Vim caused user scripts to be able to observe the cursor line in an invalid intermediary state, due to Neovim change callbacks being unbuffered unlike Vim listeners. Manifested in Vimscript executed from the callback possibly erroring when `:call`:ing any function, due to the implicit range `curwin->w_cursor.lnum,curwin->w_cursor.lnum` failing validation. Fixed by deferring the call to `changed_lines()` until after `curwin->w_cursor.lnum` gets its correct value.