aboutsummaryrefslogtreecommitdiff
path: root/test/functional
Commit message (Collapse)AuthorAge
...
* Merge pull request #28183 from bfredl/intechnicolorbfredl2024-04-07
|\ | | | | refactor(tests): use more standard colors but with extra colors
| * refactor(tests): use more standard colors but with extra colorsbfredl2024-04-05
| |
* | test: more tests for aucmd_win remaining floating (#28214)zeertzjq2024-04-07
| |
* | test: fix vimscript/server_spec leaving behind a dir (#28204)zeertzjq2024-04-06
| |
* | fix: adjust error message for error in UI event callback (#28200)zeertzjq2024-04-06
| | | | | | | | | | | | Also close Nvim instance before removing log file, otherwise the Nvim instance will still write to the log file. Also adjust log level in libuv_process_spawn(). Ref #27660
* | test: reduce sleep for file timestamp change (#28196)zeertzjq2024-04-06
| | | | | | | | Now that Nvim always supports nanotime, sleeping for some milliseconds is enough.
* | feat(comment): add built-in commentingEvgeni Chasnovski2024-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Design - Enable commenting support only through `gc` mappings for simplicity. No ability to configure, no Lua module, no user commands. Yet. - Overall implementation is a simplified version of 'mini.comment' module of 'echasnovski/mini.nvim' adapted to be a better suit for core. It basically means reducing code paths which use only specific fixed set of plugin config. All used options are default except `pad_comment_parts = false`. This means that 'commentstring' option is used as is without forcing single space inner padding. As 'tpope/vim-commentary' was considered for inclusion earlier, here is a quick summary of how this commit differs from it: - **User-facing features**. Both implement similar user-facing mappings. This commit does not include `gcu` which is essentially a `gcgc`. There are no commands, events, or configuration in this commit. - **Size**. Both have reasonably comparable number of lines of code, while this commit has more comments in tricky areas. - **Maintainability**. This commit has (purely subjectively) better readability, tests, and Lua types. - **Configurability**. This commit has no user configuration, while 'vim-commentary' has some (partially as a counter-measure to possibly modifying 'commentstring' option). - **Extra features**: - This commit supports tree-sitter by computing `'commentstring'` option under cursor, which can matter in presence of tree-sitter injected languages. - This commit comments blank lines while 'tpope/vim-commentary' does not. At the same time, blank lines are not taken into account when deciding the toggle action. - This commit has much better speed on larger chunks of lines (like above 1000). This is thanks to using `nvim_buf_set_lines()` to set all new lines at once, and not with `vim.fn.setline()`.
* | feat(lsp): set workDoneToken in initialize request (#28182)Mathias Fußenegger2024-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Some servers don't report progress during initialize unless the client sets the `workDoneToken` See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initiatingWorkDoneProgress In particular: > There is no specific client capability signaling whether a client will > send a progress token per request. The reason for this is that this is > in many clients not a static aspect and might even change for every > request instance for the same request type. So the capability is signal > on every request instance by the presence of a workDoneToken property. And: > Servers can also initiate progress reporting using the > window/workDoneProgress/create request. This is useful if the server > needs to report progress outside of a request (for example the server > needs to re-index a database). The token can then be used to report > progress using the same notifications used as for client initiated > progress. So far progress report functionality was relying entirely on the latter. Solution: Set a `workDoneToken` Closes https://github.com/neovim/neovim/issues/27938
* | feat(defaults): add :Inspect to right-click menu (#28181)zeertzjq2024-04-05
| | | | | | | | | | | | | | Ref #21393 - Move default user commands to _defaults.lua as that now contains all kinds of defaults rather than just default mappings and menus. - Remove the :aunmenu as there are no menus when _defaults.lua is run.
* | vim-patch:8.1.0815: dialog for file changed outside of Vim not tested (#28184)zeertzjq2024-04-05
| | | | | | | | | | | | | | | | | | Problem: Dialog for file changed outside of Vim not tested. Solution: Add a test. Move FileChangedShell test. Add 'L' flag to feedkeys(). https://github.com/vim/vim/commit/5e66b42aae7c67a3ef67617d4bd43052ac2b73ce Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | test: reduce `exec_lua` callsdundargoc2024-04-04
|/ | | | | | | | | | | | | | | | | | | | | `exec_lua` makes code slighly harder to read, so it's beneficial to remove it in cases where it's possible or convenient. Not all `exec_lua` calls should be removed even if the test passes as it changes the semantics of the test even if it happens to pass. From https://github.com/neovim/neovim/pull/28155#discussion_r1548185779: "Note for tests like this, which fundamentally are about conversion, you end up changing what conversion you are testing. Even if the result happens to be same (as they often are, as we like the rules to be consistent if possible), you are now testing the RPC conversion rules instead of the vim script to in-process lua conversion rules." From https://github.com/neovim/neovim/pull/28155#discussion_r1548190152: "A test like this specifies that the cursor is valid immediately and not after a separate cycle of normal (or an other input-processing) mode."
* vim-patch:9.1.0259: Normal mode TextChanged isn't tested properly (#28167)zeertzjq2024-04-04
| | | | | | | | | | Problem: Normal mode TextChanged isn't tested properly. Solution: Combine Test_Changed_ChangedI() and Test_Changed_ChangedI_2() and also run it on Windows. Fix a typo in main.c. (zeertzjq) closes: vim/vim#14396 https://github.com/vim/vim/commit/c422662933275484e61af79d8148898337a5c38e
* Merge pull request #28156 from bfredl/attr_extendbfredl2024-04-03
|\ | | | | refactor(tests): allow to extend the new base set of attrs
| * refactor(tests): allow to extend the new base set of attrsbfredl2024-04-02
| | | | | | | | | | | | | | | | | | | | | | We start at 100 so we can make the base set larger if needed. (It might need to grow/shrink as a result of adopting the new default color scheme as the default for tests) Usage best illustrataded by example. Improving the workflow for making new tests with `screen:snapshot_util()` will be a follow up.
* | fix(stdpath): remove duplicate directories (#26653)Raphael2024-04-03
| |
* | vim-patch:9.0.0581: adding a character for incsearch fails at end of linezeertzjq2024-04-03
|/ | | | | | | | | Problem: Adding a character for incsearch fails at end of line. Solution: Only check cursor line number. https://github.com/vim/vim/commit/d4566c14e71c55dcef05fb34ea94eba835831527 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* test: silence expected errorsdundargoc2024-04-02
| | | | This will remove unrelated errors in .nvimlog at the end of test output.
* vim-patch:9.1.0251: Filetype test fails (#28142)zeertzjq2024-04-01
| | | | | | | | | | | | | Problem: Filetype test fails. Solution: Move detection by name before detection by extension. Improve TextChanged test and remove wrong test and fix a typo in a comment (zeertzjq). closes: vim/vim#14373 https://github.com/vim/vim/commit/8eb7523802cb51984e2202d08a4fbc1a2cd803c7 The changes to filetype.vim are N/A since Nvim always prefers filename matches to extension matches.
* Merge pull request #28080 from echasnovski/intro-buf-changezeertzjq2024-04-01
|\ | | | | fix(intro): link showing intro to state at start
| * fix(intro): clear intro if new buffer is shown in focused floatEvgeni Chasnovski2024-03-29
| |
| * fix(intro): link showing intro to state at startEvgeni Chasnovski2024-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Current behavior of stateful intro message is too persistent. For example, it is still drawn if new empty buffer is shown in current window (either by explicitly setting it or after `tabnew`). Although the buffer is empty, the act of it being shown should be made visible. Solution: Make intro message persist if all is true: - Current buffer is the same as it was just after start, i.e. empty nameless with initial handle (i.e. 1). - Current window is the same as it was just after start, i.e. single non-floating with initial handle.
* | test(core/job_spec): skip exit test if "sleep" command missing (#28137)zeertzjq2024-04-01
| |
* | vim-patch:9.1.0230: TextChanged autocommand not triggered under some ↵zeertzjq2024-04-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | circumstances (#28135) Problem: TextChanged autocommand not triggered under some circumstances (Sergey Vlasov) Solution: Trigger TextChanged when TextChangedI has not been triggered fixes: vim/vim#14332 closes: vim/vim#14339 https://github.com/vim/vim/commit/86032702932995db74fed265ba99ae0c823cb75d Co-authored-by: Christian Brabandt <cb@256bit.org>
* | fix(api): set script context when using nvim_set_hl (#28123)zeertzjq2024-03-31
| |
* | feat(lua): pass keys before mapping to vim.on_key() callback (#28098)zeertzjq2024-03-31
| | | | | | Keys before mapping (i.e. typed keys) are passed as the second argument.
* | fix: explain that user should run nvim with -V1 to see more informationdundargoc2024-03-30
| | | | | | | | | | It's not obvious for users how to figure out where a mapping is set from only "Last set from Lua".
* | test: use matches(...) instead of ok(string.find(...)) (#28111)zeertzjq2024-03-30
| |
* | fix(extmarks): splice earlier when opening new line (#28108)zeertzjq2024-03-30
| | | | | | | | Related #26364 #26499 #26501 Fix #28107
* | fix: support UNC paths in vim.fs.normalizedundargoc2024-03-30
| | | | | | | | Closes https://github.com/neovim/neovim/issues/27068.
* | fix(fs): allow backslash characters in unix pathsJames Trew2024-03-29
| | | | | | | | | | | | | | Backslashes are valid characters in unix style paths. Fix the conversion of backslashes to forward slashes in several `vim.fs` functions when not on Windows. On Windows, backslashes will still be converted to forward slashes.
* | fix(terminal): fix duplicate recording with mouse click (#28103)zeertzjq2024-03-29
| |
* | test(normal): port legacy normal test for page scrolling (#28100)luukvbaal2024-03-29
| |
* | test: add a bit more testing for vim.on_key() (#28095)zeertzjq2024-03-29
|/ | | | | Also: - Don't use NUMBUFLEN as buffer length as its unrelated. - Restore accidentally removed comment from last commit.
* feat(ui): indicate margins for the area used by win_viewportbfredl2024-03-29
| | | | | | | | Problem: using win_viewport for implementing smooth scrolling in an external UI might run into problems when winbar or borders is used, as there is no indication that the entire grid is not used for scrolled buffer text. Solution: add `win_viewport_margins` event.
* test: print screen snapshot in desired format (#28088)luukvbaal2024-03-29
| | | | Problem: Screen snapshot is printed in a way that still needs to be formatted. Solution: Adjust the snapshot formatting (indentation, braces).
* test: skip another flaky test on macOS (#28087)zeertzjq2024-03-29
|
* test: skip flaky testsdundargoc2024-03-28
|
* vim-patch:9.1.0215: Half-page scrolling does not support smooth-scrollingLuuk van Baal2024-03-28
| | | | | | | | | | | | | Problem: Page-wise scrolling with Ctrl-D/Ctrl-U implements it's own logic to change the topline and cursor. More logic than necessary for scrolling with Ctrl-F/Ctrl-B was removed in patch 9.1.0211. Solution: Re-use the logic from Ctrl-E/Ctrl-Y/Ctrl-F/Ctrl-B while staying backward compatible as much as possible. Restore some of the logic that determined how many lines will be scrolled (Luuk van Baal) https://github.com/vim/vim/commit/5a2e3ec9ac72b6e644fea4ebba7e632498296e2f
* vim-patch:9.1.0211: page-wise scrolling does not support smooth-scrollingLuuk van Baal2024-03-28
| | | | | | | | | | | Problem: Page-wise scrolling with Ctrl-F/Ctrl-B implements it's own logic to change the topline and cursor. In doing so, skipcol is not handled properly for 'smoothscroll', and virtual lines. Solution: Re-use the logic from Ctrl-E/Ctrl-Y while staying backward compatible as much as possible. https://github.com/vim/vim/commit/b9f5b95b7bec2414a5a96010514702d99afea18e
* fix(plines): cursor position with 'showbreak' and resized grid (#28067)zeertzjq2024-03-28
|
* feat(tui): query extended underline support using DECRQSS (#28052)zeertzjq2024-03-28
|
* Merge pull request #28057 from bfredl/nosethl_2bfredl2024-03-27
|\ | | | | refactor(tests): use global defaults instead of set_default_attr_ids (2)
| * refactor(tests): use global defaults instead of set_default_attr_ids (2)bfredl2024-03-27
| |
* | fix(treesitter): return correct match table in iter_captures()Lewis Russell2024-03-27
| |
* | Merge pull request #28025 from luukvbaal/introfloatbfredl2024-03-27
|\ \ | |/ |/| fix(intro): still show intro message with floating window
| * fix(intro): still show intro message with floating windowLuuk van Baal2024-03-27
| | | | | | | | Stop drawing the intro only after a split is opened.
* | Merge pull request #28046 from bfredl/nosethl_1bfredl2024-03-27
|\ \ | | | | | | refactor(tests): use new global defaults instead of set_default_attr_ids
| * | refactor(tests): use new global defaults instead of set_default_attr_idsbfredl2024-03-26
| | | | | | | | | | | | This will be done in batches.
* | | test(tui_spec): fix flaky test for isolated "stop paste" (#28053)zeertzjq2024-03-27
|/ / | | | | In rare cases there may be multiple chunks of phase 2 because of timing.
* | test(lsp): fix flaky basic_finish test again (#28041)zeertzjq2024-03-26
| | | | | | | | | | | | | | Problem: LSP basic_finish test modified in #27899 is flaky again after #28030. Solution: Run on_setup() immediately after setup using a before_init callback.