aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
* vim-patch:9.1.0485: Matched text shouldn't be highlighted in "kind" and "menu"zeertzjq2024-06-15
| | | | | | | | | | Problem: Matched text shouldn't be highlighted in "kind" and "menu". Solution: Pass hlf_T instead of the attribute. Fix indent. (zeertzjq) closes: vim/vim#14996 https://github.com/vim/vim/commit/afbe5359e981e5d19ad23c394aefe60395c3648e
* vim-patch:9.1.0476: Cannot see matched text in popup menuzeertzjq2024-06-15
| | | | | | | | | | | | Problem: Cannot see matched text in popup menu Solution: Introduce 2 new highlighting groups: PmenuMatch and PmenuMatchSel (glepnir) closes: vim/vim#14694 https://github.com/vim/vim/commit/40c1c3317d92f8c2adadf744fab72e4458e2a9fa Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.1.0484: Sorting of completeopt+=fuzzy is not stable (#29338)zeertzjq2024-06-15
| | | | | | | | | Problem: Sorting of completeopt+=fuzzy is not stable. Solution: Compare original indexes when scores are the same. (zeertzjq) closes: vim/vim#14988 https://github.com/vim/vim/commit/8e56747fd26b3b040b6fcbfb6be41b7d5922c6b5
* fix(lsp): tune completion word extraction for decorated labels (#29331)Mathias Fußenegger2024-06-14
| | | | | | | | | | | | | | Problem: For snippets lsp.completion prefers the label if it is shorter than the insertText or textEdit to support postfix completion cases but clangd adds decoration characters to labels. E.g.: `•INT16_C(c)` Solution: Use parse_snippet on insertText/textEdit before checking if it is shorter than the label. Fixes https://github.com/neovim/neovim/issues/29301
* fix(highlight): add `StatusLineTerm`/`StatusLineTermNC` to `:color vim` (#29313)Evgeni Chasnovski2024-06-14
| | | | | | | | | | | | | | | Problem: both `StatusLineTerm`/`StatusLineTermNC` are now explicitly used, but `:color vim` does not set them to the values used in Vim. This might be fine if `:color vim` is treated as "the state of default color scheme prior the big update", but it seems to be better treated as "Vim's default color scheme" (how it is documented in its header). Solution: add `StatusLineTerm`/`StatusLineTermNC` definitions to 'runtime/colors/vim.lua'. Use explicit foreground colors ('Whte'/'Black') instead of `guifg=bg` used in source, as the latter caused some problems in the past (if `Normal` is not defined, `nvim_set_hl()` can't recognize `'bg'` as the foreground value). Also realign the rest of the background conditional highlight groups.
* refactor(lsp): use metatable for buf_versions (#29304)Ilia Choly2024-06-14
| | | | | | This reduces the number of nil checks around buf_versions usage Test changes were lifted from 5c33815 Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
* vim-patch:partial:9.1.0482: termdebug plugin needs more love (#29329)Yinzuo Jiang2024-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: termdebug plugin needs more love Solution: start with some more Vim9 refactoring to improve maintenance and readability (Ubaldo Tiberi) List of Changes and the Reasoning Behind Them: 1) Introduction of InitScriptVariables() Function: Reasoning: This function has been introduced to ensure that when you open and close Termdebug, and then open it again, there are no leftover script variable values from the previous session. Leftover values could potentially cause issues. The goal is for each Termdebug session to be independent of previous sessions. At startup, all script variables are initialized. The only exception is g:termdebug_loaded located at the very beginning of the script to prevent sourcing the script twice. The variables are declared at script level and defined in InitScriptVariables(). 2) More Descriptive Variable Names: Reasoning: The names of variables have been made more comprehensive. Almost every Termdebug buffer now has a variable to indicate its name and another variable to indicate its number, improving code readability and maintainability. Due to the latest discussion around the &mousemodel option save/restore mechanism, perhaps some other variables shall be prepended with saved_. 3) Consistent Naming for GDB Terminal Buffers: Reasoning: The name of the GDB terminal buffer now matches the name of the GDB program being used, e.g., 'gdb', 'mygdb', 'arm-eabi-none-gdb', etc. This ensures clarity and consistency in identifying buffers. 4) Other minor improvements: Moved EchoErr() on top, added another test, some refactoring, mainly changed several 0 and 1 to true and false closes: vim/vim#14980 https://github.com/vim/vim/commit/ef8eab86e29091eaff0d3fb0bc3f7c90f468f6aa Co-authored-by: Ubaldo Tiberi <ubaldo.tiberi@volvo.com>
* fix(terminal): set local values of window options (#29326)zeertzjq2024-06-14
|
* vim-patch:9.1.0483: glob() not sufficiently tested (#29323)zeertzjq2024-06-14
| | | | | | | | | | Problem: glob() not sufficiently tested Solution: Add more tests for directory containing [] chars related: vim/vim#14991 https://github.com/vim/vim/commit/8b34aea1b0431082a062ecfb5de0f244f3f23418 Co-authored-by: Christian Brabandt <cb@256bit.org>
* Merge pull request #29103 from gpanders/test-no-tgcGregory Anders2024-06-12
|\ | | | | test: do not set termguicolors in test runner
| * test: remove checks for failed tests on WindowsGregory Anders2024-05-31
| |
| * test: do not set termguicolors in test runnerGregory Anders2024-05-31
| | | | | | | | | | It's not clear why this is needed and it has adverse side effects on other tests.
* | Merge pull request #29303 from lewis6991/fix/wobufLewis Russell2024-06-12
|\ \ | | | | | | fix(vim.wo): never allow non-zero bufnr
| * | test: fix vim.deprecate testsLewis Russell2024-06-12
| | |
| * | fix(vim.wo): never allow non-zero bufnrLewis Russell2024-06-12
| | |
* | | refactor(terminal): move :terminal defaults to _defaults.luaGregory Anders2024-06-12
| | |
* | | feat(highlight): add StatusLineTerm and StatusLineTermNC groupsGregory Anders2024-06-12
|/ / | | | | | | | | | | | | These highlight groups are used for the statusline in :terminal windows. By default they link to StatusLine and StatusLineNC (respectively), so there is no visual difference unless a colorscheme defines these groups separately.
* | vim-patch:9.1.0477: block_editing errors out when using <enter> (#29294)zeertzjq2024-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: block_editing errors out when using <enter> (Ali Rizvi-Santiago, after v9.1.0274) Solution: Change ins_len from size_t to int so that the test if ins_len is negative actually works properly Add a test, so that this doesn't regress. fixes: vim/vim#14960 https://github.com/vim/vim/commit/1fb9eae5794c3f808468fbc2935c5144f9e0b5b1 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | feat(terminal): add support for copying with OSC 52 in embedded terminal ↵Gregory Anders2024-06-11
| | | | | | | | | | | | | | | | | | (#29117) When libvterm receives the OSC 52 escape sequence it ignores it because Nvim does not set any selection callbacks. Install selection callbacks that forward to the clipboard provider, so that setting the clipboard with OSC 52 in the embedded terminal writes to the system clipboard using the configured clipboard provider.
* | fix(column): clamp line number for legacy signsLuuk van Baal2024-06-10
| | | | | | | | | | | | | | | | Problem: Legacy :sign API still allows placing signs beyond the end of the buffer. This is unaccounted for by the signcolumn tracking logic and is disallowed in general for the extmark API which implements it now. Solution: Clamp legacy sign line number to the length of the buffer.
* | fix(glob): handle overlapping `{}` condition elements #29236Jon Huhn2024-06-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes an issue where glob patterns like `{a,ab}` would not match `ab` because the first option `a` matches, then the end of the string is expected but `b` is found, and LPeg does not backtrack to try the next option `ab` which would match. The fix here is to also append the rest of the pattern to the generated LPeg pattern for each option. This changes a glob `{a,ab}` from being parsed as ("a" or "ab") "end of string" to ("a" "end of string" or "ab" "end of string") Here, matching against `ab` would try the first option, fail to match, then proceed to the next option, and match. The sacrifice this change makes is dropping support for nested `{}` conditions, which VSCode doesn't seem to support or test AFAICT. Fixes #28931 Co-authored-by: Sergey Slipchenko <faergeek@gmail.com>
* | feat(lsp): include end_col, end_lnum in vim.lsp.buf.locations_to_items #29164Tom Praschan2024-06-09
| |
* | Merge pull request #29141 from bfredl/rstream2bfredl2024-06-09
|\ \ | | | | | | refactor(io): make rstream use a linear buffer
| * | refactor(io): make rstream use a linear bufferbfredl2024-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | If you like it you shouldn't put a ring on it. This is what _every_ consumer of RStream used anyway, either by calling rbuffer_reset, or rbuffer_consumed_compact (same as rbuffer_reset without needing a scratch buffer), or by consuming everything in each stream_read_cb call directly.
* | | feat(lua): add `vim._with`dundargoc2024-06-08
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a function to perform operations in their own sealed context, similar to pythons `with`. This helps ease operations where you need to perform an operation in a specific context, and then restore the context. Marked as private for now as it's not ready for public use. The current plan is to start using this internally so we can discover and fix any problems. Once this is ready to be exposed it will be renamed to `vim.with`. Usage: ```lua local ret = vim._with({context = val}, function() return "hello" end) ``` , where `context` is any combination of: - `buf` - `emsg_silent` - `hide` - `horizontal` - `keepalt` - `keepjumps` - `keepmarks` - `keeppatterns` - `lockmarks` - `noautocmd` - `options` - `sandbox` - `silent` - `unsilent` - `win` (except for `win` and `buf` which can't be used at the same time). This list will most likely be expanded in the future. Work on https://github.com/neovim/neovim/issues/19832. Co-authored-by: Lewis Russell <lewis6991@gmail.com>
* | fix(man): filter OSC 8 hyperlink markup #29171Lennard Hofmann2024-06-07
| | | | | | | | | | Problem: `man cmake` shows "8;;https://cmake.orghttps://cmake.org8;;" Solution: Remove noise so that it shows as "https://cmake.org". See also: https://en.wikipedia.org/wiki/ANSI_escape_code#OSC
* | feat: get/set namespace properties #28728altermo2024-06-07
| | | | | | | | ref https://github.com/neovim/neovim/pull/28432 ref https://github.com/neovim/neovim/issues/28469
* | fix(lsp): fix reverse sorting of same position text edits (#29212)Al Colmenar2024-06-07
| | | | | | | | | | | | | | | | Problem: Text edits with the same position (both line and character) were being reverse sorted prior to being applied which differs from the lsp spec Solution: Change the sort order for just the same position edits
* | fix(lsp): revert buf_versions deprecation/replacement (#29217)Mathias Fußenegger2024-06-07
| | | | | | | | | | | | | | | | | | * Revert "fix(lsp): account for changedtick version gap on modified reset (#29170)" This reverts commit 2e6d295f799c27372e5c0c44727fa613c81717fd. * Revert "refactor(lsp): replace util.buf_versions with changedtick (#28943)" This reverts commit 5c33815448e11b514678f39cecc74e68131d4628.
* | feat(editorconfig): add support for spelling_language (#28638)sus-domesticus2024-06-06
| |
* | vim-patch:9.1.0469: Cannot have buffer-local value for 'completeopt'zeertzjq2024-06-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot have buffer-local value for 'completeopt' (Nick Jensen). Solution: Make 'completeopt' global-local (zeertzjq). Also for some reason test Test_ColonEight_MultiByte seems to be failing sporadically now. Let's mark it as flaky. fixes: vim/vim#5487 closes: vim/vim#14922 https://github.com/vim/vim/commit/529b9ad62a0e843ee56ef609aef7e51b7dc8a4c8
* | vim-patch:9.1.0467: typos in some commentszeertzjq2024-06-06
| | | | | | | | | | | | | | | | | | | | | | Problem: typos in some comments (after v9.1.0466) Solution: fix comments (zeertzjq) closes: vim/vim#14919 https://github.com/vim/vim/commit/551d8c372e49ed630fd95c6422a0ee62d00902c5
* | fix(tui): move $COLORTERM check to _defaults.lua (#29197)Gregory Anders2024-06-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently check $COLORTERM in the TUI process to determine if the terminal supports 24 bit color (truecolor). If $COLORTERM is "truecolor" or "24bit" then we automatically assume that the terminal supports truecolor, but if $COLORTERM is set to any other value we still query the terminal. The `rgb` flag of the UI struct is a boolean which only indicates whether the UI supports truecolor, but does not have a 3rd state that we can use to represent "we don't know if the UI supports truecolor". We currently use `rgb=false` to represent this "we don't know" state, and we use XTGETTCAP and DECRQSS queries to determine at runtime if the terminal supports truecolor. However, if $COLORTERM is set to a value besides "truecolor" or "24bit" (e.g. "256" or "16) that is a clear indication that the terminal _does not_ support truecolor, so it is incorrect to treat `rgb=false` as "we don't know" in that case. Instead, in the TUI process we only check for the terminfo capabilities. This must be done in the TUI process because we do not have access to this information in the core Neovim process when `_defaults.lua` runs. If the TUI cannot determine truecolor support from terminfo alone, we set `rgb=false` to indicate "we don't know if the terminal supports truecolor yet, keep checking". When we get to `_defaults.lua`, we can then check $COLORTERM and only query the terminal if it is unset. This means that users can explicitly opt out of truecolor determination by setting `COLORTERM=256` (or similar) in their environment.
* | fix(lua): don't clamp -1 or v:maxcol in vim.highlight.range() (#29203)zeertzjq2024-06-05
| |
* | vim-patch:9.1.0463: no fuzzy-matching support for insert-completionzeertzjq2024-06-05
| | | | | | | | | | | | | | | | | | | | | | | | Problem: no fuzzy-matching support for insert-completion Solution: enable insert-mode completion with fuzzy-matching using :set completopt+=fuzzy (glepnir). closes: vim/vim#14878 https://github.com/vim/vim/commit/a218cc6cdabae1113647b817c4eefc2b60a6902f Co-authored-by: glepnir <glephunter@gmail.com>
* | fix(diagnostic): fix float scope filtering (#29134)Andre Toerien2024-06-04
| |
* | fix(lsp): account for changedtick version gap on modified reset (#29170)Mathias Fußenegger2024-06-04
| | | | | | | | Follow up to https://github.com/neovim/neovim/pull/28943 Fixes https://github.com/neovim/neovim/issues/29163
* | fix(ui): superfluous showmode / excessive grid_cursor_goto #29089luukvbaal2024-06-04
| | | | | | | | | | | | | | | | | | Problem: Unsetting global variables earlier in #28578 to avoid recursiveness, caused superfluous or even unlimited showmode(). Solution: Partly revert #28578 so that the globals are unset at the end of showmode(), and avoid recursiveness for ext UI by adding a recursive function guard to each generated UI call that may call a Lua callback.
* | refactor(lua): use tuple syntax everywhere #29111Ilia Choly2024-06-04
| |
* | vim-patch:9.1.0464: no whitespace padding in commentstring option in ftpluginsChristian Clason2024-06-04
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: no whitespace padding in commentstring option in ftplugins Solution: Change default to include whitespace padding, update existing filetype plugins with the new default value (Riley Bruins) closes: vim/vim#14843 https://github.com/vim/vim/commit/0a0830624a260660c7fa692ecb7e6e5de09114ba Co-authored-by: Riley Bruins <ribru17@hotmail.com>
* | vim-patch:partial:8.2.3637: typos in test files (#29172)zeertzjq2024-06-04
| | | | | | | | | | | | | | | | Problem: Typos in test files. Solution: Correct the typos. (Dominique Pellé, closes vim/vim#9175) https://github.com/vim/vim/commit/923dce2b07ff185c0ef661f3eca47bc17655f01b Co-authored-by: Dominique Pelle <dominique.pelle@gmail.com>
* | feat(ftplugin): change 'commentstring' to `// %s` for C/C++ (#29085)Soham Shanbhag2024-06-03
| | | | | | | | | | | | | | | | | | Problem: The default commentstring for C/C++ can lead to invalid code when commenting and does not match the Nvim codebase. Solution: Change commentstring to `// %s` as used by Neovim. Also set all commentstrings that derive from the default C string explicitly (and correctly).
* | vim-patch:9.1.0460: filetype: lintstagedrc files are not recognizedChristian Clason2024-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: lintstagedrc files are not recognized Solution: recognize '.lintstagedrc' files as json filetype (İlyas Akın) see: https://github.com/lint-staged/lint-staged closes: vim/vim#14897 https://github.com/vim/vim/commit/7577afd5efd0f7ebf0dbbca09713185024263ed7 Co-authored-by: İlyas Akın <ilyas.akin@kuika.com>
* | fix(lsp): trim trailing whitespace from completion words (#29122)Mathias Fußenegger2024-06-02
| | | | | | | | | | the `complete()` mechanism doesn't play nicely with trailing newlines or tabs. A newline causes it to insert a null character, showing up as `^@`.
* | test: add a test for #29119zeertzjq2024-06-02
| |
* | vim-patch:9.1.0456: Left shift is incorrect with vartabstop and shiftwidth=0zeertzjq2024-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Left shift is incorrect with vartabstop and shiftwidth=0 Solution: make tabstop_at() function aware of shift direction (Gary Johnson) The problem was that with 'vartabstop' set and 'shiftwidth' equal 0, left shifts using << were shifting the line to the wrong column. The tabstop to the right of the first character in the line was being used as the shift amount instead of the tabstop to the left of that first character. The reason was that the tabstop_at() function always returned the value of the tabstop to the right of the given column and was not accounting for the direction of the shift. The solution was to make tabstop_at() aware of the direction of the shift and to choose the tabtop accordingly. A test was added to check this behavior and make sure it doesn't regress. While at it, also fix a few indentation/alignment issues. fixes: vim/vim#14864 closes: vim/vim#14887 https://github.com/vim/vim/commit/88d4f255b7b7a19bb4f6489e0ad0956e47d51fed Co-authored-by: Gary Johnson <garyjohn@spocom.com>
* | vim-patch:8.2.4452: test for what 8.2.4436 fixes does not check for regressionzeertzjq2024-06-02
| | | | | | | | | | | | | | | | | | Problem: Test for what 8.2.4436 fixes does not check for regression. Solution: Set several options. (Ken Takata, closes vim/vim#9830) https://github.com/vim/vim/commit/2dada73a4ebffe2582af472ce362abd3116b58c9 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | vim-patch:8.2.4437: vartabs test fails on MS-Windowszeertzjq2024-06-02
| | | | | | | | | | | | | | | | | | Problem: Vartabs test fails on MS-Windows. Solution: Use iso8859-1 'encoding'. (Ken Takata, closes vim/vim#9818) https://github.com/vim/vim/commit/0f113e4f7b698fc94c1a8377afdb7249329beaee Co-authored-by: K.Takata <kentkt@csc.jp>
* | vim-patch:8.2.4436: crash with weird 'vartabstop' valuezeertzjq2024-06-02
| | | | | | | | | | | | | | | | | | | | | | Problem: Crash with weird 'vartabstop' value. Solution: Check for running into the end of the line. https://github.com/vim/vim/commit/4e889f98e95ac05d7c8bd3ee933ab4d47820fdfa Code change is N/A as it's superseded by virtual text changes. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | fix(luacats): allow all types inside tuplesIlia Choly2024-06-01
| |