aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/vim_spec.lua
Commit message (Collapse)AuthorAge
* vim-patch:8.1.0793: incorrect error messages for functions that take a BlobSean Dewar2021-09-15
| | | | | | | Problem: Incorrect error messages for functions that now take a Blob argument. Solution: Adjust the error messages. (Dominique Pelle, closes vim/vim#3846) https://github.com/vim/vim/commit/0d17f0d1c09fa6db306336695ba646c21ea24909
* feat(lua)!: register_keystroke_callback => on_keyJustin M. Keyes2021-09-09
| | | | | | | | | Analogous to nodejs's `on('data', …)` interface, here on_key is the "add listener" interface. ref 3ccdbc570d85 #12536 BREAKING_CHANGE: vim.register_keystroke_callback() is now an error.
* fix(lua): preserve argument lists which are not listsBjörn Linse2021-08-29
|
* fix(shared): do not treat empty tables as list in deep extend (#15094)Folke Lemaitre2021-07-19
| | | | | | | | | | 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 } }`
* fix(vim.opt): vimL map string values not trimmed (#14982)jadedpasta2021-07-04
| | | | | | | | | 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>
* fix(vim.opt): Fix #14828 with empty values being incorrectly insertedTJ DeVries2021-06-29
|
* fix(vim.opt): Fix #14668 Now correctly handles unescaped commas in isfname styleTJ DeVries2021-06-29
|
* fix(vim.opt): Fix #14669 whichwrap now acts as expectedTJ DeVries2021-06-29
|
* fix(vim.opt): Add basic error handlingDavid Zhang2021-06-29
|
* fix(vim.opt): Get window options before setting.ckipp012021-06-29
| | | | | | | 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`.
* fix(vim.opt): #14708 Now lets you put duplicate values in wildmodeTJ DeVries2021-06-29
|
* api: add nvim_win_callnotomo2021-06-10
|
* lua: Add vim.opt and fix scopes of vim.o (#13479)TJ DeVries2021-05-28
| | | | | | | | | | | | | * lua: Add vim.opt * fixup: cleaning * fixup: comments * ty clason * fixup: comments * this is the last commit. period.
* lua: use proper conversion of vim.g valuesBjörn Linse2021-05-19
|
* use pcall_errsmolck2021-03-09
|
* vim.fn: add test for errorsmolck2021-02-04
|
* runtime: propagate lua parsing errors while using "require"dm1try2020-12-10
|
* lua: make vim.inspect available early so it can be used for path debuggingBjörn Linse2020-11-05
|
* Merge pull request #12053 from tjdevries/tjdevries/nicer_validateTJ DeVries2020-10-17
|\ | | | | vim.validate(): include stacktrace in message
| * test/vim.validate(): assert normalized stacktraceJustin M. Keyes2020-10-05
| | | | | | | | | | | | | | - 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()
| * vim.validate(): include stacktrace in messageTJ DeVries2020-10-05
| |
* | lua: vim.wait allows control of fast events (#13053)TJ DeVries2020-10-06
|/ | | | | | | | | * lua: vim.wait allows control of fast events * fixup: remove requirement of function for easier waiting * fixup: lint * fixup: bfredl comments
* api: add nvim_buf_call to call function with curbuf changed to bufferBjörn Linse2020-09-13
|
* 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>
* 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
|
* 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
* lua: allow deepcopy of functions (#12136)Tristan Konolige2020-04-19
|
* 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
|/
* lua: metatable for empty dict valueBjörn Linse2020-01-01
|
* Fix access on vim.wo (#11517)Ashkan Kiani2019-12-07
| | | * Add more tests for vim.wo
* Add vim.startswith and vim.endswith (#11248)Ashkan Kiani2019-12-01
|
* Add vim.cmd as an alias for nvim_command (#11446)Ashkan Kiani2019-12-01
|
* Return nil instead of NIL for vim.env (#11486)Ashkan Kiani2019-12-01
|
* lua: make vim.wo and vim.bo used nested indexing for specified handleBjörn Linse2019-11-26
| | | | | Also missing option should be an error. Options are functionality, not arbitrary variable names (as for vim.g)
* Merge branch 'master' into lsp-followupAshkan Kiani2019-11-24
|\
| * Lua: vim.env, vim.{g,v,w,bo,wo} #11442Ashkan Kiani2019-11-24
| | | | | | | | | | | | | | | | - Add vim variable meta accessors: vim.env, vim.{g,v,w,bo,wo} - Redo gen_char_blob to generate multiple blobs instead of just one so that multiple Lua modules can be inlined. - Reorder vim.lua inclusion so that it can use previously defined C functions and utility functions like vim.shared and vim.inspect things. - Inline shared.lua into nvim, but also keep it available in runtime.
* | Extend list_extend to take start/finish.Ashkan Kiani2019-11-20
|/
* lua LSP client: initial implementation (#11336)Ashkan Kiani2019-11-13
| | | | | | Mainly configuration and RPC infrastructure can be considered "done". Specific requests and their callbacks will be improved later (and also served by plugins). There are also some TODO:s for the client itself, like incremental updates. Co-authored by at-tjdevries and at-h-michael, with many review/suggestion contributions.