summaryrefslogtreecommitdiffstatshomepage
path: root/test/functional/editor/defaults_spec.lua
AgeCommit message (Collapse)AuthorFiles
2025-11-29fix(colorscheme): adjust `StatusLine[NC]` for diagnostics #36719Evgeni Chasnovski1
Problem: It is desirable for the default statusline to contain colored diagnostics information. However, current `StatusLine` group is purposefully defined as almost inverted `Normal` to "make current window obvious". This makes diagnostic information from `vim.diagnostic.status()` barely visible: it uses established `DiagnosticSignXxx` groups which have colored foreground with lightness close to `StatusLine` background. Also the `StatusLineNC` group is fairly different from `Normal` in order to both "makes window separators clear" and "be different from `CursorLine`". But not as mush different as `StatusLine` because "`StatusLine` and `StatusLineNC` should be clearly different". Solution: Make both `StatusLine` and `StatusLineNC` be slightly closer in lightness to `Normal`. This makes `StatusLine` and `StatusLineNC` groups satisfy their conditions in the following way: - `vim.diagnostic.count()` is readable on `StatusLine` - yes. - `vim.diagnostic.count()` is readable on `StatusLineNC` - yes. - `StatusLine` makes current window obvious - I'd say yes. - `StatusLine` and `StatusLineNC` are clearly different - it depends on the eyes and monitor. The current is clearly better, but the new ones I'd say are still visibly different. - `StatusLineNC` makes window separators clear - I'd say yes, but depends on the eyes and monitor. - `StatuslineNC` is different from `CursorLine` - NO, they are same. Another approach to solve this would be to introduce dedicated `DiagnosticStatuslineXxx` groups to use in `vim.diagnostics.status()`. They can be defined using foreground colors from the same lightness as `Normal`. This would make them readable in `StatusLine`. But not `StatusLineNC`, though.
2025-07-04test(editor/defaults_spec): fix flakiness (#34752)zeertzjq1
2025-03-05feat(terminal)!: include cursor position in TermRequest event data (#31609)Gregory Anders1
When a plugin registers a TermRequest handler there is currently no way for the handler to know where the terminal's cursor position was when the sequence was received. This is often useful information, e.g. for OSC 133 sequences which are used to annotate shell prompts. Modify the event data for the TermRequest autocommand to be a table instead of just a string. The "sequence" field of the table contains the sequence string and the "cursor" field contains the cursor position when the sequence was received. To maintain consistency between TermRequest and TermResponse (and to future proof the latter), TermResponse's event data is also updated to be a table with a "sequence" field. BREAKING CHANGE: event data for TermRequest and TermResponse is now a table
2025-02-17docs: misc (#32258)dundargoc1
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com> Co-authored-by: Julian Visser <12615757+justmejulian@users.noreply.github.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2025-02-09fix(defaults): improve visual search mappings #32378neeshy1
Problem: The behavior of the visual search mappings aren't consistent with their normal mode counterparts. - The count isn't considered - Searching with an empty selection will match every character in the buffer - Searching backwards only jumps back when the cursor is positioned at the start of the selection. Solution: - Issue `n` `v:count1` times - Error out and exit visual mode when the selection is empty - Detect when the cursor is not at the start of the selection, and adjust the count accordingly Also, use the search register instead of the more error-prone approach of feeding the entire search string as an expression
2025-01-14refactor: use nvim.foo.bar format for autocommand groupsMaria José Solano1
2024-12-05fix(defaults): don't replace keycodes in Visual search mappings (#31460)zeertzjq1
Also remove "silent" to be more consistent with Normal mode search.
2024-11-25fix(defaults): omit empty line from unimpaired mapping messages (#31347)Marcus Caisey1
Problem: The default unimpaired mappings display an empty line after the command's output. This results (with default configuration) in the `Press ENTER or type command to continue` prompt to be displayed, like so: ``` (2 of 16): item2 Press ENTER or type command to continue ``` Solution: The cause is that we're checking the second return value from `pcall(vim.api.nvim_cmd, opts, {})` to determine whether the call was successful. `nvim_cmd` returns an empty string on success, so this value is an empty string in the successful path which we then display. The fix is simple: check the first return value instead which is the "status code" of the call.
2024-11-17feat(defaults): dot-repeat [<Space> #31186Peter Aronoff1
Problem: `[<Space>` and `]<Space>` do not support repetition. Solution: use `operatorfunc` and `g@l` to make these mappings dot repeatable.
2024-11-14fix(tests): needing two calls to setup a screen is cringebfredl1
Before calling "attach" a screen object is just a dummy container for (row, col) values whose purpose is to be sent as part of the "attach" function call anyway. Just create the screen in an attached state directly. Keep the complete (row, col, options) config together. It is still completely valid to later detach and re-attach as needed, including to another session.
2024-11-04feat(defaults): unimpaired empty line below/above cursor #30984Yochem van Rosmalen1
2024-10-29fix(defaults): omit extraneous info from unimpaired mapping errors (#30983)Gregory Anders1
2024-09-05feat(defaults): popupmenu "Open in browser", "Go to definition" #30261Justin M. Keyes1
- Use the popup to expose more features such as LSP and gx. - Move the copy/paste items lower in the menu, they are lower priority.