aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
| * test: close timers in vim_spec.lua functional testShreyansh Chouhan2021-09-20
| | | | | | | | | | | | | | Close the timer started during tests before closing the session. This fixes the uv_loop_close hangs happening in the functional tests. Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh2702@gmail.com>
| * test: fix running functional tests under gdbserverShreyansh Chouhan2021-09-20
| | | | | | | | | | | | | | | | | | | | | | It was not possible to run the tests under the gdbserver because we were not closing the old session before starting a new one. This caused the server to not to be able to bind to the given address and crashing the tests. This commit closes the session before starting a new one. Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh2702@gmail.com>
* | Merge pull request #16086 from bfredl/termpipe_inputBjörn Linse2021-10-20
|\ \ | | | | | | feat(nvim_open_term): support input callback in lua
| * | feat(nvim_open_term): support input callback in luaBjörn Linse2021-10-20
| | |
* | | fix(diagnostic): handle diagnostics placed past the end of line (#16095)Gregory Anders2021-10-19
| | |
* | | feat(lua): allow passing handles to vim.b/w/tLewis Russell2021-10-19
| | | | | | | | | | | | | | | | | | vim.bo can target a specific buffer by indexing with a number, e.g: `vim.bo[2].filetype` can get/set the filetype for buffer 2. This change replicates that behaviour for the variable namespace.
* | | refactor(diagnostic)!: replace 'show_*' functions with 'open_float' (#16057)Gregory Anders2021-10-19
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'show_line_diagnostics()' and 'show_position_diagnostics()' are almost identical; they differ only in the fact that the latter also accepts a column to form a full position, rather than just a line. This is not enough to justify two separate interfaces for this common functionality. Renaming this to simply 'show_diagnostics()' is one step forward, but that is also not a good name as the '_diagnostics()' suffix is redundant. However, we cannot name it simply 'show()' since that function already exists with entirely different semantics. Instead, combine these two into a single 'open_float()' function that handles all of the cases of showing diagnostics in a floating window. Also add a "float" key to 'vim.diagnostic.config()' to provide global values of configuration options that can be overridden ephemerally. This makes the float API consistent with the rest of the diagnostic API. BREAKING CHANGE
* | feat(api): evaluate statusline string #16020Famiu Haque2021-10-18
| | | | | | | | | | | | Adds API function `nvim_eval_statusline` to allow evaluating a statusline string and obtaining information regarding it. Closes https://github.com/neovim/neovim/issues/15849
* | fix(lsp): fix cursor row after textEdits (#16038)hrsh7th2021-10-18
| |
* | Merge pull request #15999 from famiu/fix/build/export-windows-symbolsBjörn Linse2021-10-17
|\ \ | | | | | | fix(build): export symbols on Windows
| * | fix(build): export symbols on WindowsFamiu Haque2021-10-17
| | | | | | | | | | | | | | | | | | Closes https://github.com/neovim/neovim/issues/15063 Allows using Neovim core functions using LuaJIT FFI on Windows.
* | | Merge pull request #15973 from bfredl/luapathBjörn Linse2021-10-17
|\ \ \ | | | | | | | | fix(runtime): don't use regexes inside lua require'mod'
| * | | fix(runtime): don't use regexes inside lua require'mod'Björn Linse2021-10-17
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #15147 and fixes #15497. Also sketch "subdir" caching. Currently this only caches whether an rtp entry has a "lua/" subdir but we could consider cache other subdirs potentially or even "lua/mybigplugin/" possibly. Note: the async_leftpad test doesn't actually fail on master, at least not deterministically (even when disabling the fast_breakcheck throttling). It's still useful as a regression test for further changes and included as such.
* | | Merge pull request #15952 from zeertzjq/vim-8.1.1291Jan Edmund Lazo2021-10-17
|\ \ \ | | | | | | | | vim-patch:8.0.{1459,1460,1461,1463},8.1.{0602,0604,1291},8.2.{0189,0876,0909,1411}: chdir and DirChanged related patches
| * | | test(dirchanged): add tests for DirChanged pattern "auto"zeertzjq2021-10-17
| | | |
| * | | refactor(dirchanged): tab -> tabpagezeertzjq2021-10-17
| | | | | | | | | | | | | | | | Match Vim's behavior.
| * | | vim-patch:8.1.0604: autocommand test fails on MS-Windowszeertzjq2021-10-17
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Autocommand test fails on MS-Windows. Solution: Use pathcmp() instead of strcmp() to check if a directory differs. https://github.com/vim/vim/commit/9eb76af451ddd8eaad0cd5dd629f18c4f4035171
| * | | vim-patch:8.1.0602: DirChanged is also triggered when directory didn't changezeertzjq2021-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: DirChanged is also triggered when the directory didn't change. (Daniel Hahler) Solution: Compare the current with the new directory. (closes vim/vim#3697) https://github.com/vim/vim/commit/2caad3fbbdbf1486a176c9f6bfbc3d9be90e09f7
* | | | fix(diagnostic): do not override existing config settings #16043Gregory Anders2021-10-17
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using `true` as the value of a configuration option, the option is configured to use default values. For example, if a user configures virtual text to include the source globally (using vim.diagnostic.config) and a specific namespace or producer configures virtual text with `virt_text = true`, the user's global configuration is overriden. Instead, interpret a value of `true` to mean "use existing settings if defined, otherwise use defaults".
* | | Merge #15994 feat(:source, nvim_exec): script-local scopeJustin M. Keyes2021-10-17
|\ \ \ | |/ / |/| |
| * | feat(:source, nvim_exec): defer script item creation until s:var accessSean Dewar2021-10-14
| | | | | | | | | | | | | | | | | | | | | | | | For anonymous scripts, defer the creation of script items until an attempt to access a script-local variable is made. This dramatically reduces the number of script items created when using lots of vim.cmd and nvim_exec especially. This will mean <SID> usage fails until a script-local variable access is first made.
| * | feat(:source, nvim_exec): support script-local variablesSean Dewar2021-10-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on #13143 (and #11507) with changes: - Omit script_type_E. Use sn_name == NULL to determine anon items. - Keep SID_STR. Used by anon :source for .lua files (no item). - Show SID in get_scriptname output (:verbose set). - Factor item creation into new_script_item. - Leave sc_seq = 0 (anon scripts don't re-use the same item when re-sourced). - Add tests for anon :source. Co-authored-by: Vikram Pal <vikrampal659@gmail.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* | | chore(test): adapt healthcheck test to new css syntaxChristian Clason2021-10-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | The runtime file update https://github.com/vim/vim/commit/2286304cdbba53ceb52b3ba2ba4a521b0a2f8d0f added a `syn keyword` for `css`, which affects (via `html` and `markdown` syntax files) the highlighting of `:checkhealth` output (before, `ERROR:` was highlighted with `healthError`; now the colon is no longer included).
* | | fix: correctly capture uri scheme on windows (#16027)Michael Lingelbach2021-10-15
|/ / | | | | | | | | | | closes https://github.com/neovim/neovim/issues/15261 * normalize uri path to forward slashes on windows * use a capture group on windows that avoids mistaking drive letters as uri scheme
* | fix(lsp): do not invoke handlers for unsupported methods (#15926)Michael Lingelbach2021-10-10
| | | | | | | | | | | | | | Closes https://github.com/neovim/neovim/issues/15174 Instead of invoking handlers with unsupported methods, pre-compute which clients support a given method and only notify the user if no clients support the given method.
* | Merge pull request #15502 from seandewar/vim-8.1.1921Jan Edmund Lazo2021-10-10
|\ \ | | | | | | Add method call support for more built-ins: vim-patch:8.1.{1336,1952,1961,1984}
| * | feat(eval/method): partially port v8.1.1954Sean Dewar2021-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Does not include listener_*() functions. js_*() functions are N/A. json_encode() and json_decode() didn't include tests; add some anyway (to json_functions_spec.lua). test_lua.vim isn't included yet, so add tests to luaeval_spec.lua.
| * | feat(eval/method): partially port v8.1.1953Sean Dewar2021-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds method call support for all functions in the patch, but it cannot be fully ported due to missing tests for: - index(): requires Blobs from v8.1.0735. Note that index() was already added as a method in v8.1.1803; this patch only adds a test. - iconv(): requires v8.1.1136 for test_termcodes.vim. Nvim deprecated inputdialog(), so it no longer has an eval.txt entry. Keep the test for hlexists() commented-out, just like previously. (Nvim always defines the Number group, so it always returns 1 instead) Cannot include both changes to test_syn_attr.vim as Nvim doesn't support ":hi term=..."; however, both test the same ->hlID() syntax anyway.
| * | feat(eval/method): partially port v8.1.1925Sean Dewar2021-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds method call support for all functions in the patch, but it cannot be fully ported due to missing tests for: - getcwd(): requires chdir() and Test_chdir_func() from v8.1.1291. Note that the method call tests for getreg() and getregtype() were removed in v8.2.1547, which has already been ported, but doesn't seem to have been replaced with a new test... This patch also makes getchangelist()'s argument optional (defaults to the current buffer). eval.txt includes a typo for gettabwinvar(), which is fixed in v8.1.1952.
| * | feat(eval/method): partially port v8.1.1921Sean Dewar2021-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds method call support for all functions in the patch, but it cannot be fully ported due to missing tests for: - filereadable(): requires v8.1.1378 for Test_delete_rf(), but there appears to have been some trouble porting it. (#12784) - confirm(): requires v8.1.0832 for Test_confirm() and v8.1.0815 for feedkeys()'s "L" flag. (I did attempt to port the test using nvim_input() instead, but seems that input handling for confirm() doesn't work in --headless mode?) Note that confirm() was actually added as a method in v8.1.1915. Uncomment use of method call syntax in Test_Executable() previously included instead from v8.2.2259.
| * | vim-patch:8.1.1336: some eval functionality is not covered by testsSean Dewar2021-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Some eval functionality is not covered by tests. Solution: Add a few more test cases. (Masato Nishihata, closes vim/vim#4374) https://github.com/vim/vim/commit/17aca707f92235b6f962e637e8073162d18e6de2 Test_expand() changes are required for v8.1.1921. Test_call() and Test_cindent_func() are already ported.
* | | vim-patch:8.2.3461: distinguish Normal and Terminal-Normal mode #15878zeertzjq2021-10-09
| | | | | | | | | | | | | | | Problem: Cannot distinguish Normal and Terminal-Normal mode. Solution: Make mode() return "nt" for Terminal-Normal mode. (issue vim/vim#8856) https://github.com/vim/vim/commit/72406a4bd2896915b6f541e26d41521a59b1f846
* | | fix(lsp): update tests using 0.5.0 handler calls (#15969)Michael Lingelbach2021-10-08
| | | | | | | | | Fixes test regression introduced in https://github.com/neovim/neovim/pull/15262
* | | fix(lsp): expose ContentModified error code to callbacks (#15262)Rishikesh Vaishnav2021-10-08
| | |
* | | fix(buffer_updates): handle :sort of already sorted bufferBjörn Linse2021-10-08
| | |
* | | fix(api): check type in nlua_pop_keydict (#15940)virchau132021-10-08
| | |
* | | fix: support severity_sort option for show_diagnostic functions (#15948)Gregory Anders2021-10-07
| | | | | | | | | Support the severity_sort option for show_{line,position}_diagnostics.
* | | fix(buffer_updates): cleanup test behaviorBjörn Linse2021-10-07
| | |
* | | fix(buffer_updates): make `lockmarks` not affect extmarks and buffer ↵Anton Adamansky2021-10-07
| | | | | | | | | | | | | | | | | | updates. fixes #12861 Now mark_adjust() will trigger appropriate buf_updates_send_splice() called by extmark_adjust()
* | | fix(buffer_updates): handle :delete of the very last line in bufferBjörn Linse2021-10-07
| | |
* | | fix: set cursorlineopt=number in terminal mode (#15493)Yorick Peterse2021-10-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When entering terminal mode, cursorlineopt is no longer entirely disabled. Instead, it's set to `number`. Doing so ensures that users using `set cursorline` combined with `set cursorlineopt=number` have consistent highlighting of the line numbers, instead of this being disabled when entering terminal mode. Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
* | | fix(extmarks): splice extmarks on nv_Undo #15920Tony Chen2021-10-06
| | |
* | | fix(checkhealth): mitigate issues with duplicate healthchecks #15919Javier Lopez2021-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix(runtime/health): mitigate issues with duplicate healthchecks Previously if a healthcheck was found as Lua and Vim it was executed both times. This new implementations prefers Lua, therefore if two are found It only runs the Lua one, this way a plugin can mantain both implementations the Lua one with the method `check()` and the autoload function `#check()` (for none HEAD nvim versions). **Note: This will require plugins to use `check()` as the function name, since the autoload function that wraps the lua implementation won't be called** * docs(health): use spaces and don't overuse backtics followup to #15259
* | | feat(api): named marks set, get, delete #15346Javier Lopez2021-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the following API functions. - nvim_buf_set_mark(buf, name, line, col) * Set marks in a buffer. - nvim_buf_del_mark(buf, name) * Delete a mark that belongs to buffer. - nvim_del_mark(name) * Delete a global mark. - nvim_get_mark(name) * Get a global mark. Tests: - Adds test to all the new api functions, and adds more for the existing nvim_buf_get_mark. * Tests include failure cases. Documentation: - Adds documentation for all the new functions, and improves the existing fucntion docs.
* | | Merge pull request #15259 from muniter/muniter/checkhealth-from-luaMatthieu Coudron2021-10-05
|\ \ \ | | | | | | | | feat(checkhealth): support Lua healthchecks
| * | | feat(ex_checkhealth): provide function for command line completionJavier López2021-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move away from providing completion with ExpandRTDir to ExpandGeneric providing the function get_healthcheck_name which caches the results for the current command line prompt. It does the almost the same thing the Vim function 'get_healthcheck' implemented in 'runtime/autoload/health.vim' does.
| * | | test(runtime/health): cover lua healthchecksJavier López2021-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add tests for lua healthchecks (failure, success and submodules). - Reword some of the test naming for improved logs readability. - Modify render test to accomodate the changes of the health autoload function. - Add test for :checkhealth completion of Lua healtchecks.
* | | | Merge pull request #15813 from bfredl/neomouseBjörn Linse2021-10-04
|\ \ \ \ | |/ / / |/| | | fix(mouse): correct dragged position in composed layout
| * | | fix(mouse): correct dragged position in composed layoutBjörn Linse2021-10-04
| |/ /
* | | Merge #15218 from gpanders/split-trimemptyJustin M. Keyes2021-10-03
|\ \ \ | |/ / |/| | feat(lua): add "noempty" param to vim.split()