aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
* | | fix(jobs): do not block UI when jobwait() doesn't block (#31803)Gregory Anders2025-01-01
| | |
* | | fix(vim.fs.abspath): correctly handle UNC pathsdundargoc2025-01-01
| | |
* | | docs: misc #31479Justin M. Keyes2025-01-01
| | |
* | | feat(clipboard)!: use OSC 52 as fallback clipboard provider (#31730)Gregory Anders2024-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently enable the OSC 52 clipboard provider by setting g:clipboard when a list of conditions are met, one of which is that $SSH_TTY must be set. We include this condition because often OSC 52 is not the best clipboard provider, so if there are "local" providers available Nvim should prefer those over OSC 52. However, if no other providers are available, Nvim should use OSC 52 even when $SSH_TTY is not set. When a user is in an SSH session then the checks for the other clipboard providers will still (typically) fail, so OSC 52 continues to be enabled by default in SSH sessions. This is marked as a breaking change because there are some cases where OSC 52 wasn't enabled before and is now (or vice versa).
* | | fix(vim.fs): joinpath() does not normalize slashes on Windows #31782Gustav Eikaas2024-12-31
| | |
* | | test: skip flaky watchdirs() test on macosdundargoc2024-12-31
| | |
* | | feat(lsp): return resolved config for vim.lsp.config[name]Mathias Fussenegger2024-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows to retrieve the configuration as it will be used by `lsp.enable` - including the parts merged from `*` and rtp. This is useful for explicit startup control (`vim.lsp.start(vim.lsp.config[name])`) Closes https://github.com/neovim/neovim/issues/31640
* | | vim-patch:9.1.0982: TI linker files are not recognizedChristian Clason2024-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: TI linker files are not recognized Solution: inspect '*.cmd' files and detect TI linker files as 'lnk' filetype, include a lnk ftplugin and syntax script (Wu, Zhenyu) closes: vim/vim#16320 https://github.com/vim/vim/commit/39a4eb0b2ca901b59800fad086550053556e59dc Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
* | | vim-patch:9.1.0983: not able to get the displayed items in complete_i… ↵glepnir2024-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#31796) vim-patch:9.1.0983: not able to get the displayed items in complete_info() Problem: not able to get the displayed items in complete_info() (Evgeni Chasnovski) Solution: return the visible items via the "matches" key for complete_info() (glepnir) fixes: vim/vim#10007 closes: vim/vim#16307 https://github.com/vim/vim/commit/d4088edae21659e14ab5f763c820f4eab9d36981
* | | vim-patch:9.1.0981: tests: typo in test_filetype.vim (#31794)zeertzjq2024-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: tests: typo in test_filetype.vim Solution: fix comment, update lnkmap syntax file and add DESCT keyword (Wu, Zhenyu) closes: vim/vim#16348 https://github.com/vim/vim/commit/2bee7e43e137bcef62e6872791e2be7ce9c32703 Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
* | | vim-patch:9.1.0978: GUI tests sometimes fail when setting 'scroll' options ↵zeertzjq2024-12-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#31785) Problem: GUI tests sometimes fail when setting 'scroll' options Solution: decrease the 'scroll' and 'scrolljump' option value from 20 to 15, in case the Gui window is not large enough to handle 20. tests: decrease the scroll and scrolljump values the gui tests sometimes fail with: ``` From test_options_all.vim: Found errors in Test_opt_set_scroll(): Caught exception in Test_opt_set_scroll(): Vim(set):E49: Invalid scroll size: scroll=20 @ command line..script /home/runner/work/vim/vim/src/testdir/runtest.vim[617]..function RunTheTest[57]..Test_opt_set_scroll, line 7 Found errors in Test_opt_set_scrolljump(): Caught exception in Test_opt_set_scrolljump(): Vim(set):E49: Invalid scroll size: scrolljump=20 @ command line..script /home/runner/work/vim/vim/src/testdir/runtest.vim[617]..function RunTheTest[57]..Test_opt_set_scrolljump, line 9 ``` closes: vim/vim#16337 https://github.com/vim/vim/commit/2e1f757f7b52a00b77eb19648b7ea46e932eff2b Co-authored-by: Christian Brabandt <cb@256bit.org>
* | | vim-patch:9.1.0977: filetype: msbuild filetypes are not recognizedChristian Clason2024-12-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: msbuild filetypes are not recognized Solution: detect msbuild files as xml filetype (Gustav Eikaas) closes: vim/vim#16339 https://github.com/vim/vim/commit/32b7e3a8c99d369b02154df74cbe42a37c7c7e68 Co-authored-by: GustavEikaas <gustav.eikaas@gmail.com>
* | | vim-patch:9.1.0972: filetype: TI linker map files are not recognizedChristian Clason2024-12-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: TI linker map files are not recognized Solution: detect TI linker map files as lnkmap filetype (Wu, Zhenyu) References: https://downloads.ti.com/docs/esd/SPRUI03A/Content/SPRUI03A_HTML/linker_description.html closes: vim/vim#16324 https://github.com/vim/vim/commit/5113831d16c05f3a8b47da0c6f95a641d5fc7b2e Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
* | | vim-patch:9.1.0971: filetype: SLNX files are not recognizedChristian Clason2024-12-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: SLNX files are not recognized Solution: detect '*.slnx' files as xml filetype (Gustav Eikaas) References: https://blog.ndepend.com/slnx-the-new-net-solution-xml-file-format/ https://blog.jetbrains.com/dotnet/2024/10/04/support-for-slnx-solution-files/ closes: vim/vim#16334 https://github.com/vim/vim/commit/3b3318b64043dcf29d6f06322739f695a5cc257e Co-authored-by: GustavEikaas <gustav.eikaas@gmail.com>
* | | vim-patch:9.1.0968: tests: GetFileNameChecks() isn't fully sorted by ↵zeertzjq2024-12-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | filetype name (#31763) Problem: tests: GetFileNameChecks() isn't fully sorted by filetype name Solution: re-sort the list closes: vim/vim#16322 https://github.com/vim/vim/commit/e51043ad9f8e07d4c0a1e0056a8f8853e08f6a30
* | | vim-patch:9.1.0965: filetype: sh filetype set when detecting the use of bash ↵Luca Saccarola2024-12-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#31749) Problem: filetype: sh filetype set when detecting the use of bash Solution: when bash is detected, use 'bash' filetype instead (Luca Saccarola) closes: vim/vim#16309 https://github.com/vim/vim/commit/b9b762c21f2b61e0e7d8fee43d4d3dc8ecffd721
* | | feat(lua): add `vim.fs.abspath`Famiu Haque2024-12-28
| | | | | | | | | | | | | | | | | | Problem: There is currently no way to check if a given path is absolute or convert a relative path to an absolute path through the Lua stdlib. `vim.fs.joinpath` does not work when the path is absolute. There is also currently no way to resolve `C:foo\bar` style paths in Windows. Solution: Add `vim.fs.abspath`, which allows converting any path to an absolute path. This also allows checking if current path is absolute by doing `vim.fs.abspath(path) == path`. It also has support for `C:foo\bar` style paths in Windows.
* | | feat(lsp): support function for client root_dir (#31630)Gregory Anders2024-12-27
| | | | | | | | | | | | | | | | | | | | | | | | If root_dir is a function it is evaluated when the client is created to determine the root directory. This enables dynamically determining the root directory based on e.g. project or directory structure (example: finding a parent Cargo.toml file that contains "[workspace]" in a Rust project).
* | | vim-patch:9.1.0962: filetype: bun.lock file is not recognizedChristian Clason2024-12-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: bun.lock file is not recognized Solution: detect 'bun.lock' file as jsonc filetype (Anton Kastritskii) closes: vim/vim#16308 https://github.com/vim/vim/commit/f07ae5b3bdb7331ee0e65adcb74402eef74f0a2b Co-authored-by: Anton Kastritskii <halloy52@gmail.com>
* | | vim-patch:9.1.0963: fuzzy-matching does not prefer full match (#31741)glepnir2024-12-27
|/ / | | | | | | | | | | | | | | | | | | | | Problem: fuzzy-matching does not prefer full match (Maxim Kim) Solution: add additional score for a full match (glepnir) fixes: vim/vim#15654 closes: vim/vim#16300 https://github.com/vim/vim/commit/5a04999a7402201cf1b47ff10bc474dd1cdc24f4
* | fix(api): clamp range lines in `nvim__redraw()` (#31710)Artem2024-12-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `nvim__redraw()` doesn't clamp the lines in the `range` parameter before truncating to int. The resulting range may be empty when the original range contained buffer lines and vice versa. E.g. for a buffer with 4 lines, these are the redrawn lines: ```lua { 2, 2 ^ 31 } -> none (should be { 2, 3 }) { 2, 2 ^ 32 } -> none (should be { 2, 3 }) { 2 ^ 32 - 1, 2 } -> { 0, 1 } (should be none) ``` Solution: Clamp `range` values before truncating to int.
* | vim-patch:9.1.0961: filetype: TI gel files are not recognizedChristian Clason2024-12-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: TI gel files are not recognized Solution: detect '*.gel' files as gel filetype, include get filetype and syntax plugins (Wu, Zhenyu) References: https://downloads.ti.com/ccs/esd/documents/users_guide/ccs_debug-gel.html closes: vim/vim#16226 https://github.com/vim/vim/commit/9360de9027aa286e802363ede59c9e97025ae123 Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
* | vim-patch:9.1.0960: filetype: hy history files are not recognizedChristian Clason2024-12-25
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: hy history files are not recognized Solution: detect '*.hy', '.hy-history' files as hy filetype, detect '.lips_repl_history' files are scheme filetype (Wu, Zhenyu) closes: vim/vim#16298 https://github.com/vim/vim/commit/a32daed55933df49a7aed571cc6e400ae01c7976 Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
* | Merge pull request #31713 from glepnir/vim-9.1.0954zeertzjq2024-12-24
|\ \ | | | | | | vim-patch:9.1.{0954,0956}
| * | vim-patch:9.1.0956: completion may crash, completion highlight wrong with ↵glepnir2024-12-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | preview window Problem: completion may crash, completion highlight wrong with preview window (after v9.1.0954) Solution: correctly calculate scroll offset, check for preview window when adding extra highlighting (glepnir) when there have a preview window prepare_tagpreview will change curwin to preview window and this may cause ComplMatchIns check condition not correct. check wp is curwin and also the type of wp is not a preview or poup info fixes: https://github.com/vim/vim/issues/16284 closes: https://github.com/vim/vim/pull/16283 https://github.com/vim/vim/commit/8d0bb6dc9f2e5d94ebb59671d592c1b7fa325ca6
* | | feat(test): support and document lua test case debuggingMathias Fussenegger2024-12-24
|/ / | | | | | | | | | | | | Similar to how there is a `GDB` environment variable to let the nvim test instances to be run under `gdbserver` this adds a `OSV_PORT` variable to start nvim test instances with `osv` in blocking mode to let a debug client attach to it for debugging of `exec_lua` code blocks.
* | vim-patch:9.1.0958: filetype: supertux2 config files detected as lispChristian Clason2024-12-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: supertux2 config files detected as lisp Solution: detect supertux2 config files as scheme instead (Wu, Zhenyu) References: https://github.com/SuperTux/supertux/wiki/S-Expression supertux uses #t and #f as bool type, which is same as scheme, not common lisp closes: vim/vim#16287 https://github.com/vim/vim/commit/e62d93ead10b4c5818e3c0b7551f1784d24bfe33 Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
* | fix(terminal): set cursor cell percentage (#31703)Gregory Anders2024-12-23
| | | | | | Fixes: https://github.com/neovim/neovim/issues/31685
* | Merge #31661 cmdline_show/hide eventsJustin M. Keyes2024-12-22
|\ \
| * | feat(ui): specify whether msg_show event is added to historyLuuk van Baal2024-12-23
| | | | | | | | | | | | | | | Pass along whether message in msg_show event is added to the internal :messages history.
| * | feat(ui): additional arguments for cmdline_show/hide eventsLuuk van Baal2024-12-22
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Unable to tell what highlight the prompt part of a cmdline_show event should have, and whether cmdline_hide was emitted after aborting. Solution: Add additional arguments hl_id to cmdline_show, and abort to cmdline_hide.
* | | vim-patch:9.1.0953: filetype: APKBUILD files not correctly detectedChristian Clason2024-12-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: APKBUILD files not correctly detected Solution: detect 'APKBUILD' files as apkbuild filetype, include a apkbuild syntax script (which basically just sources the sh.vim syntax file) (Hugo Osvaldo Barrera) Vim plugins (e.g.: ALE, nvim-lspconfig, etc) rely on filetype to determine which integrations/helpers are applicable. They expect filetype=apkbuild for APKBUILD files. On the other hand, plugins also enable bash-specific linters and functionality when filetype=bash, but APKBUILD files are POSIX sh, not bash, so these often provide bogus results. Change the filetype for APKBUILD to a 'apkbuild', so that tools and ftplugin can properly target these files. This filetype will use the existing `sh` syntax rules, since these are applicable for them. https://github.com/vim/vim/commit/7cb24917a112ba473cb351bdcdc48b8adbd46793 Co-authored-by: Hugo Osvaldo Barrera' via vim_dev <vim_dev@googlegroups.com>
* | | vim-patch:9.1.0951: filetype: jshell files are not recognizedChristian Clason2024-12-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: jshell files are not recognized Solution: detect '*.jsh' files as java filetype (Konfekt) closes: vim/vim#16260 https://github.com/vim/vim/commit/62e3014ab1146d7f78694c97fc6974f1af2cc5af Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
* | | test: format C test files and fix clang-tidy warningsdundargoc2024-12-21
| | | | | | | | | | | | | | | | | | | | | It's probably not worth adding the C test files to regular formatting as they're pretty much never touched, but ensuring the files are formatted according to our standards and getting rid of warnings is a cheap one-time fix.
* | | vim-patch:9.1.0950: filetype: fennelrc files are not recognizedChristian Clason2024-12-21
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: fennelrc files are not recognized Solution: detect 'fennelrc' files as fennel filetype (Wu Zhenyu) References: https://github.com/bakpakin/Fennel/issues/193 closes: vim/vim#16262 https://github.com/vim/vim/commit/f173f4249fc785fb3e2b341bcfb0f21192cd4bf5 Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
* | fix(messages): no message kind for completion menu messages #31646Tomasz N2024-12-20
| |
* | vim-patch:9.1.0948: Missing cmdline completion for :pbuffer (#31645)zeertzjq2024-12-20
| | | | | | | | | | | | | | | | | | | | Problem: Missing cmdline completion for :pbuffer. Solution: Add cmdline completion for :pbuffer like :buffer. (zeertzjq) fixes: vim/vim#16250 closes: vim/vim#16251 https://github.com/vim/vim/commit/3baf19a2b144b215c5b537c3c1b3b80a79b0fe99
* | feat(jobs): jobstart(…,{term=true}), deprecate termopen() #31343Justin M. Keyes2024-12-19
| | | | | | | | | | | | | | | | | | | | | | | | Problem: `termopen` has long been a superficial wrapper around `jobstart`, and has no real purpose. Also, `vim.system` and `nvim_open_term` presumably will replace all features of `jobstart` and `termopen`, so centralizing the logic will help with that. Solution: - Introduce `eval/deprecated.c`, where all deprecated eval funcs will live. - Introduce "term" flag of `jobstart`. - Deprecate `termopen`.
* | fix(messages): better formatting for :highlight with ext_messages #31627luukvbaal2024-12-19
| | | | | | Also avoid going down message callstack with empty message, and remove expected grid for some tests where it did not change, and we are just testing for expected messages.
* | vim-patch:9.1.0945: ComplMatchIns highlight doesn't end after inserted text ↵zeertzjq2024-12-18
| | | | | | | | | | | | | | | | | | | | | | | | (#31628) Problem: ComplMatchIns highlight doesn't end after inserted text. Solution: Handle ComplMatchIns highlight more like search highlight. Fix off-by-one error. Handle deleting text properly. (zeertzjq) closes: vim/vim#16244 https://github.com/vim/vim/commit/f25d8f9312a24da2727671560a865888812ab8d9
* | test(cursor_spec): global highlight definitions (#31613)luukvbaal2024-12-18
| |
* | fix(terminal): restore cursor from 'guicursor' on TermLeave (#31620)Gregory Anders2024-12-18
| | | | | | Fixes: https://github.com/neovim/neovim/issues/31612
* | refactor(man.lua): various changesLewis Russell2024-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replace all uses of vim.regex with simpler Lua patterns. - Replace all uses of vim.fn.substitute with string.gsub. - Rework error handling so expected errors are passed back via a return. - These get routed up an passed to `vim.notify()` - Any other errors will cause a stack trace. - Reworked the module initialization of `localfile_arg` - Updated all type annotations. - Refactored CLI completion by introduction a parse_cmdline() function. - Simplified `show_toc()` - Refactor highlighting - Inline some functions - Fix completion on MacOS 13 and earlier. - Prefer `manpath -q` over `man -w` - Make completion more efficient by avoiding vim.fn.sort and vim.fn.uniq - Reimplement using a single loop
* | fix(lsp): vim.lsp.start fails if existing client has no workspace_folders #31608phanium2024-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: regression since https://github.com/neovim/neovim/pull/31340 `nvim -l repro.lua`: ```lua vim.lsp.start { cmd = { 'lua-language-server' }, name = 'lua_ls' } vim.lsp.start { cmd = { 'lua-language-server' }, name = 'lua_ls', root_dir = 'foo' } -- swapped case will be ok: -- vim.lsp.start { cmd = { 'lua-language-server' }, name = 'lua_ls', root_dir = 'foo' } -- vim.lsp.start { cmd = { 'lua-language-server' }, name = 'lua_ls' } ``` Failure: ``` E5113: Error while calling lua chunk: /…/lua/vim/lsp.lua:214: bad argument #1 to 'ipairs' (table expected, got nil) stack traceback: [C]: in function 'ipairs' /…/lua/vim/lsp.lua:214: in function 'reuse_client' /…/lua/vim/lsp.lua:629: in function 'start' repro.lua:34: in main chunk ```
* | test(old): fix incorrect comment in test_preview.vim (#31619)zeertzjq2024-12-18
| |
* | vim-patch:9.1.0940: Wrong cursor shape with "gq" and 'indentexpr' executes ↵zeertzjq2024-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | :normal (#31616) Problem: Wrong cursor shape with "gq" and 'indentexpr' executes :normal Solution: Update cursor and mouse shape after restoring old_State. (zeertzjq) closes: vim/vim#16241 Solution: Update cursor and mouse shape after restoring old_State. https://github.com/vim/vim/commit/6c3027744e71937b24829135ba072090d7d52bc3
* | vim-patch:9.1.0942: a few typos were foundzeertzjq2024-12-18
| | | | | | | | | | | | | | | | | | Problem: a few typos were found Solution: fix them (zeertzjq) closes: vim/vim#16232 https://github.com/vim/vim/commit/d32bf0a06762f9ad08334d67b4d7f235f87f9063
* | vim-patch:9.1.0941: ComplMatchIns doesn't work after multibyte charszeertzjq2024-12-18
| | | | | | | | | | | | | | | | | | | | Problem: ComplMatchIns doesn't work after multibyte chars (after v9.1.0936) Solution: Use (ptr - line) instead of wlv.col (zeertzjq). closes: vim/vim#16233 https://github.com/vim/vim/commit/f4ccada5c372b2c14cc32490860c6995cd00268c
* | vim-patch:9.1.0936: cannot highlight completed textzeertzjq2024-12-18
| | | | | | | | | | | | | | | | | | | | | | | | Problem: cannot highlight completed text Solution: (optionally) highlight auto-completed text using the ComplMatchIns highlight group (glepnir) closes: vim/vim#16173 https://github.com/vim/vim/commit/6a38aff218f5b99a1aed7edaa357df24b9092734 Co-authored-by: glepnir <glephunter@gmail.com>
* | feat(terminal)!: cursor shape and blink (#31562)Gregory Anders2024-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a terminal application running inside the terminal emulator sets the cursor shape or blink status of the cursor, update the cursor in the parent terminal to match. This removes the "virtual cursor" that has been in use by the terminal emulator since the beginning. The original rationale for using the virtual cursor was to avoid having to support additional UI methods to change the cursor color for other (non-TUI) UIs, instead relying on the TermCursor and TermCursorNC highlight groups. The TermCursor highlight group is now used in the default 'guicursor' value, which has a new entry for Terminal mode. However, the TermCursorNC highlight group is no longer supported: since terminal windows now use the real cursor, when the window is not focused there is no cursor displayed in the window at all, so there is nothing to highlight. Users can still use the StatusLineTermNC highlight group to differentiate non-focused terminal windows. BREAKING CHANGE: The TermCursorNC highlight group is no longer supported.