aboutsummaryrefslogtreecommitdiff
path: root/test/functional
Commit message (Collapse)AuthorAge
* Merge pull request #31118 from bfredl/merehlbfredl2024-11-09
|\ | | | | refactor(tests): continue the global highlight definition work
| * refactor(tests): continue the global highlight definition workbfredl2024-11-08
| |
* | fix(vim.system): resolve executable paths on windowsLewis Russell2024-11-08
| | | | | | | | Fixes #31107
* | fix(cmdline): simplify and correct grapheme cluster adjustmentbfredl2024-11-08
|/
* Merge pull request #31040 from luukvbaal/cmdpreviewcursbfredl2024-11-08
|\ | | | | fix(inccommand): ensure cursor is where it belongs
| * fix(inccommand): ensure cursor is where it belongsLuuk van Baal2024-11-07
| | | | | | | | | | Problem: Inccommand preview callback may flush inaccurate cmdline cursor position. Solution: Ensure cursor is where it belongs when doing command preview.
* | test: add test for key following ignored mouse move (#31104)zeertzjq2024-11-07
| |
* | perf(mouse): only generate <MouseMove> for a new cell positon (#31103)errael2024-11-07
| | | | | | | | Problem: Can receive dozens of <MouseMove> events for same cell position. #30965 Solution: Leverage check_multiclick() to detect if cell position is unchanged.
* | fix(test): better management of tmpfilesLewis Russell2024-11-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When tmpdir is local. The returned values from tmpname may already exist. This can cause problems for tests which pass `create=false` as they may require the file to not exist yet. Solution: When creating tmp names, always remove it to ensure it doesn't exist, and optionally open it if `create~=false` Additionally refactor the tmpname code and flattrn some functions into constants. Also while debugging this issue. It was discovered that `exec_lua()` doesn't report error messages properly. This has been fixed.
* | feat(defaults): unimpaired empty line below/above cursor #30984Yochem van Rosmalen2024-11-04
| |
* | feat(options)!: disallow setting hidden options #28400Famiu Haque2024-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: There are three different ways of marking an option as hidden, `enable_if = false`, `hidden = true` and `immutable = true`. These also have different behaviors. Options hidden with `enable_if = false` can't have their value fetched using Vim script or the API, but options hidden with `hidden = true` or `immutable = true` can. On the other hand, options with `hidden = true` do not error when trying to set their value, but options with `immutable = true` do. Solution: Remove `enable_if = false`, remove the `hidden` property for options, and use `immutable = true` to mark an option as hidden instead. Also make hidden option variable pointers always point to the default value, which allows fetching the value of every hidden option using Vim script and the API. This does also mean that trying to set a hidden option will now give an error instead of just being ignored.
* | feat(editor): handle new multibyte sequences in normal mode replacementbfredl2024-11-04
| | | | | | | | | | | | | | while the implementation is not tied to screen chars, it is a reasonable expectation to support the same size. If nvim is able to display a multibyte character, it will accept the same character as input, including in normal mode commands like r{char}
* | vim-patch:9.1.0830: using wrong highlight group for spaces for popupmenu ↵zeertzjq2024-11-03
|/ | | | | | | | | | | | | (#31054) Problem: using wrong highlight group for spaces for popupmenu Solution: use original attribute instead of combined attributed (glepnir) closes: vim/vim#15978 https://github.com/vim/vim/commit/bc10be7a4060748ed1876ab91cf53a2a8701ac13 Co-authored-by: glepnir <glephunter@gmail.com>
* fix(lua): show stacktrace for error in vim.on_key() callback (#31021)zeertzjq2024-11-02
|
* feat(lsp)!: remove client-server handlers from vim.lsp.handlersLewis Russell2024-11-01
| | | | | | | | | | - Partition the handlers in vim.lsp.handlers as: - client to server response handlers (RCS) - server to client request handlers (RSC) - server to client notification handlers (NSC) Note use string indexes instead of protocol.methods for improved typing in LuaLS (tip: use hover on RCS, RSC or NSC).
* feat(lua): allow vim.on_key() callback to consume the key (#30939)errael2024-11-01
|
* test: fix files being left behind (#31004)zeertzjq2024-10-31
|
* vim-patch:9.1.0822: topline might be changed in diff mode unexpectedly (#30988)zeertzjq2024-10-30
| | | | | | | | | | | | | Problem: topline might be changed in diff mode unexpectedly (Jaehwang Jung) Solution: do not re-calculate topline, when using line() func in diff mode. fixes: vim/vim#15812 closes: vim/vim#15950 https://github.com/vim/vim/commit/05a40e07c2f0e41b708c4c75a6aa7d0e7f6201a3 Co-authored-by: Christian Brabandt <cb@256bit.org>
* fix(defaults): omit extraneous info from unimpaired mapping errors (#30983)Gregory Anders2024-10-29
|
* test(pum): add test for item selection with 'rightleft' (#30968)zeertzjq2024-10-28
|
* fix(pum): don't select item when clicking to the left/right (#30967)zeertzjq2024-10-28
| | | | | | | Problem: Selecting an item in the right-click menu when clicking to the left/right of it is confusing, especially in a UI that doesn't support 'mousemoveevent'. Solution: Don't select an item when clicking to the left/right of the right-click menu.
* feat(diagnostics)!: sort underline severity_sort (#30898)Donatas2024-10-27
| | | | | feat(diagnostics)!: sort underline with severity_sort BREAKING CHANGE: underline will be applied with a higher value than `vim.hl.priorities.diagnostics`
* refactor(lsp): drop str_byteindex/str_utfindex wrappers #30915Tristan Knight2024-10-26
| | | | | * deprecate old signatures * move to new str_byteindex/str_utfindex signature * use single-underscore name (double-underscore is reserved for Lua itself)
* fix(lsp): set tagstack on jump via goto methodsMathias Fussenegger2024-10-24
| | | | | Follow up to https://github.com/neovim/neovim/pull/30877 Fixes https://github.com/neovim/neovim/issues/30926
* test(012_directory_spec): fix flakiness on Windows (#30920)zeertzjq2024-10-24
| | | | Problem: 012_directory_spec is flaky on Windows. Solution: Use :%bwipe! instead :qall!.
* feat(stdlib): overload vim.str_byteindex, vim.str_utfindex #30735Tristan Knight2024-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PROBLEM: There are several limitations to vim.str_byteindex, vim.str_utfindex: 1. They throw given out-of-range indexes. An invalid (often user/lsp-provided) index doesn't feel exceptional and should be handled by the caller. `:help dev-error-patterns` suggests that `retval, errmsg` is the preferred way to handle this kind of failure. 2. They cannot accept an encoding. So LSP needs wrapper functions. #25272 3. The current signatures are not extensible. * Calling: The function currently uses a fairly opaque boolean value to indicate to identify the encoding. * Returns: The fact it can throw requires wrapping in pcall. 4. The current name doesn't follow suggestions in `:h dev-naming` and I think `get` would be suitable. SOLUTION: - Because these are performance-sensitive, don't introduce `opts`. - Introduce an "overload" that accepts `encoding:string` and `strict_indexing:bool` params. ```lua local col = vim.str_utfindex(line, encoding, [index, [no_out_of_range]]) ``` Support the old versions by dispatching on the type of argument 2, and deprecate that form. ```lua vim.str_utfindex(line) -- (utf-32 length, utf-16 length), deprecated vim.str_utfindex(line, index) -- (utf-32 index, utf-16 index), deprecated vim.str_utfindex(line, 'utf-16') -- utf-16 length vim.str_utfindex(line, 'utf-16', index) -- utf-16 index vim.str_utfindex(line, 'utf-16', math.huge) -- error: index out of range vim.str_utfindex(line, 'utf-16', math.huge, false) -- utf-16 length ```
* fix(options): fix 'winhl' still accepting invalid value (#30896)zeertzjq2024-10-22
|
* fix(options): fix :setglobal not working for 'spelloptions' (#30894)zeertzjq2024-10-22
|
* feat(vim.validate): improve fast form and deprecate spec formLewis Russell2024-10-21
| | | | | | | | | | | | | | Problem: `vim.validate()` takes two forms when it only needs one. Solution: - Teach the fast form all the features of the spec form. - Deprecate the spec form. - General optimizations for both forms. - Add a `message` argument which can be used alongside or in place of the `optional` argument.
* test(rpc): retry flaky 'vim.rpcrequest and vim.rpcnotify' testChristian Clason2024-10-21
| | | | | | Problem: 'vim.rpcrequest and vim.rpcnotify' is flaky on Windows. Solution: retry it.
* refactor: rename vim.highlight => vim.hlJustin M. Keyes2024-10-21
| | | | | | | | | | | | Problem: - `vim.highlight` module does not follow `:help dev-name-common`, which documents the name for "highlight" as "hl". - Shorter names are usually preferred. Solution: Rename `vim.highlight` to `vim.hl`. This is not a breaking change until 2.0 (or maybe never).
* fix(lua): vim.deprecate does not support major>0Justin M. Keyes2024-10-21
|
* feat(lsp)!: support multiple clients in goto methods (#30877)Mathias Fußenegger2024-10-20
| | | | | | | | | | | | | | | Relates to: - https://github.com/neovim/neovim/issues/30034 - https://github.com/neovim/neovim/issues/17712 - https://github.com/neovim/neovim/issues/16363 Closes: - https://github.com/neovim/neovim/issues/26936 (but only provides bufnr and method) - https://github.com/neovim/neovim/issues/22318 Might fix: https://github.com/neovim/neovim/issues/30737
* feat(float): allow enabling mouse for non-focusable window (#30844)zeertzjq2024-10-20
| | | | Problem: Cannot allow mouse interaction for non-focusable float window. Solution: Add a "mouse" field to float window config.
* feat(terminal)!: make 'belloff' and 'visualbell' apply to terminal bell (#30859)zeertzjq2024-10-20
| | | | | | | vim-patch:8.2.4744: a terminal window can't use the bell vim-patch:8.2.4745: using wrong flag for using bell in the terminal BREAKING CHANGE: Bells from :terminal are now silent by default, unless 'belloff' option doesn't contain "term" or "all".
* fix(options): fix some 'belloff' flags not working properly (#30856)zeertzjq2024-10-18
| | | | Problem: Some 'belloff' flags don't work properly. Solution: Keep BO_ flags and p_bo_values[] in sync.
* feat(vim.ui.open): support lemonade #30845Uthman Mohamed2024-10-18
|
* fix(lsp.util): inconsistent handling of offset_encodingLewis Russell2024-10-17
|
* feat(lsp.util): refactor symbols_to_items()Lewis Russell2024-10-17
| | | | | - Remove the trivial function vim.lsp.util._get_symbol_kind_name() and its tests.
* fix(lsp): handle multiline signature help labels #30460Maria José Solano2024-10-15
|
* fix(tui): avoid flushing buffer halfway an OSC 2 sequence (#30793)zeertzjq2024-10-15
| | | | | | Problem: Setting title while TUI buffer is almost full may cause the end of a flush to be treated as a part of an OSC 2 or OSC 0 sequence, leading to problems like invisible cursor. Solution: Make the whole sequence to set title a unibi_ext string.
* test(tui_spec): use Unicode in cursor_address test (#30807)zeertzjq2024-10-14
| | | | | | Now that #16425 is fixed, use Unicode again to reduce screen height. Unfortunately composing chars still can't be used, as it turns out that composing chars may be missing when sent separately from the base char at the last char a screen line.
* test(autocmd/termxx_spec): properly setup TextChangedT tests (#30787)zeertzjq2024-10-13
|
* feat(ui): statusline text inherits highlights #29976Riley Bruins2024-10-12
| | | Changes apply to the winbar, statusline, and tabline text.
* fix(treesitter): mark supertype nodes as namedRiley Bruins2024-10-12
| | | | | | | | | | | **Problem:** Tree-sitter 0.24.0 introduced a new symbol type to denote supertype nodes (`TSSymbolTypeSupertype`). Now, `language.inspect()` (and the query `omnifunc`) return supertype symbols, but with double quotes around them. **Solution:** Mark a symbol as "named" based on it *not* being an anonymous node, rather than checking that it is a regular node (which a supertype also is not).
* fix(lua): avoid recursive vim.on_key() callback (#30753)zeertzjq2024-10-12
|
* fix(treesitter): remove duplicate symbol names in language.inspect()Riley Bruins2024-10-11
| | | | | | | | | | | | | | | | | **Problems:** - `vim.treesitter.language.inspect()` returns duplicate symbol names, sometimes up to 6 of one kind in the case of `markdown` - The list-like `symbols` table can have holes and is thus not even a valid msgpack table anyway, mentioned in a test **Solution:** Return symbols as a map, rather than a list, where field names are the names of the symbol. The boolean value associated with the field encodes whether or not the symbol is named. Note that anonymous nodes are surrounded with double quotes (`"`) to prevent potential collisions with named counterparts that have the same identifier.
* feat(treesitter): introduce child_with_descendant()Riley Bruins2024-10-11
| | | | | | This commit also marks `child_containing_descendant()` as deprecated (per upstream's documentation), and uses `child_with_descendant()` in its place. Minimum required tree-sitter version will now be `0.24`.
* test(tui_spec): use child_exec_lua() more (#30757)zeertzjq2024-10-11
| | | It is more readable.
* feat(ui): cascading style inheritance for Pmenu* highlights #29980Riley Bruins2024-10-10
| | | | - `PmenuSel` and `PmenuMatch` inherit from `Pmenu` - `PmenuMatchSel` inherits from both `PmenuSel` and `PmenuMatch`