aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_defaults.lua
Commit message (Collapse)AuthorAge
...
* feat(tui): query extended underline support using DECRQSS (#28052)zeertzjq2024-03-28
|
* refactor(defaults): use getregion() for Visual mode gx (#27663)zeertzjq2024-02-29
| | | Also make it work better on a multiline selection.
* vim-patch:9.1.0142: getregion() can be improved (#27662)zeertzjq2024-02-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: getregion() can be improved (after v9.1.120) Solution: change getregion() implementation to use pos as lists and one optional {opt} dictionary (Shougo Matsushita) Note: The following is a breaking change! Currently, the getregion() function (included as of patch v9.1.120) takes 3 arguments: the first 2 arguments are strings, describing a position, arg3 is the type string. However, that is slightly inflexible, there is no way to specify additional arguments. So let's instead change the function signature to: getregion(pos1, pos2 [, {Dict}]) where both pos1 and pos2 are lists. This is slightly cleaner, and gives us the flexibility to specify additional arguments as key/value pairs to the optional Dict arg. Now it supports the "type" key to specify the selection type (characterwise, blockwise or linewise) and now in addition one can also define the selection type, independently of what the 'selection' option actually is. Technically, this is a breaking change, but since the getregion() Vimscript function is still quite new, this should be fine. closes: vim/vim#14090 https://github.com/vim/vim/commit/19b718828d8d5fab52d94c6cdba694641879ab38 Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
* fix(defaults): validate 'channel' before responding to OSC request (#27594)Gregory Anders2024-02-26
| | | | | Validate the channel number before responding to an OSC 10/11 request. When used with nvim_open_term, the channel number is unset (since there is no process on the other side of the PTY).
* refactor(defaults): use getregion() for default * and # mappingszeertzjq2024-02-23
|
* fix(defaults): make terminal autoclose not block other events (#27581)Evgeni Chasnovski2024-02-22
| | | | | | Problem: When terminal is autocloses, it blocks other events, like `BufEnter`. Solution: Use `nested = true`.
* fix(defaults): remove tmux background detection passthrough (#27571)zeertzjq2024-02-22
| | | | | | There is now a new tmux 3.4 release that queries background color from the parent terminal if background is not set in tmux, so removing the passthrough still works when background is not set in tmux, and fixes the incorrect detection when background is set in tmux.
* feat(terminal): respond to OSC background and foreground request (#17197)Daniel Steinberg2024-01-15
| | | | | | | | | | | | The motivation for this update is Issue #15365, where background=light is not properly set for Nvim running from an Nvim :terminal. This can be encountered when e.g., opening a terminal to make git commits, which opens EDITOR=nvim in the nested terminal. Under the implementation of this commit, the OSC response always indicates a black or white foreground/background. While this may not reflect the actual foreground/background color, it permits 'background' to be retained for a nested Nvim instance running in the terminal emulator. The behaviour matches Vim.
* fix(defaults): use augroup for default autocommands (#26933)Gregory Anders2024-01-06
|
* docs: small fixes (#26651)dundargoc2023-12-28
| | | | Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: WillLillis <wlillis@umass.edu>
* feat(defaults): map Q and @x to repeat in Visual mode (#26495)Nacho Nieva2023-12-27
|
* refactor(defaults): always set options, even if value hasn't changed (#26595)Gregory Anders2023-12-15
| | | | | | | | Comparing against the old value before setting matched the original C implementation, but there is no reason to use this restriction. In particular, this inhibits using OptionSet to determine when the option was set. If users need to handle a case where the option _changed_, it is easy to do so in an OptionSet autocommand using v:option_new and v:option_old (and friends).
* refactor(defaults): defer setting 'termguicolors' until after VimEnterGregory Anders2023-12-14
| | | | | This ensures that any OptionSet autocommands will fire when the value is changed.
* docs: add comment for OSC 11 tmux passthrough (#26566)Gregory Anders2023-12-14
|
* fix(defaults): background detection in tmux (#26557)Jaehwang Jung2023-12-14
| | | Wrap the query with passthrough sequence
* feat(defaults): enable 'termguicolors' by default when supported by terminalGregory Anders2023-12-06
| | | | | | | | | | | | Enable 'termguicolors' automatically when Nvim can detect that truecolor is supported by the host terminal. If $COLORTERM is set to "truecolor" or "24bit", or the terminal's terminfo entry contains capabilities for Tc, RGB, or setrgbf and setrgbb, then we assume that the terminal supports truecolor. Otherwise, the terminal is queried (using both XTGETTCAP and SGR + DECRQSS). If the terminal's response to these queries (if any) indicates that it supports truecolor, then 'termguicolors' is enabled.
* fix: use BEL to terminate OSC 11 request (#26335)Gregory Anders2023-11-30
|
* fix(defaults): wait until VimEnter to set background (#26284)Gregory Anders2023-11-29
| | | | | | | The OptionSet autocommand does not fire until Vim has finished starting, so setting 'background' before the VimEnter event would not fire the OptionSet event. The prior implementation also waited until VimEnter to set 'background', so this was a regression introduced when moving background detection into Lua.
* refactor: use optional base argument of tonumber (#26070)Gregory Anders2023-11-16
|
* fix: only attempt to close timer if not already closing (#26047)Gregory Anders2023-11-14
| | | | | | | | | | | This fixes an error that can occur in certain pathological cases when the autocommand fires at just the right time such that it attempts to close the timer after the timer has already exited, but before the scheduled callback has fired. We now let the timer continue to run even when the autocommand deletes itself to avoid having to repeat the cleanup code multiple times. There is no harm in letting the timer execute if the autocommand does not exist, as the pcall will catch the error.
* refactor: move background color detection into LuaGregory Anders2023-11-13
|
* refactor: move defaults into separate module (#25929)Gregory Anders2023-11-08
Move default mappings and autocommands into a separate module and add comments and docstrings to document each of the defaults.