Problem: Invalidated regions that are flushed during startup are
cleared with unitialized "clear_attrs", which is perceived as
flickering.
Solution: Initialize "clear_attrs" with current terminal background color.
This most likely doesn't matter as all windows are redrawn when
switching tabpages and w_valid is reset is entering window, but still
check all tabpages for consistency with changed_common().
runtime(cpp): Fix digit separator in syntax script for octals and floats
Also fix the incorrect rendering of floats that start with ".".
closes: vim/vim#14724c5def6561d
Co-authored-by: Wu Yongwei <wuyongwei@gmail.com>
Rename the field `result` to `params` in the `data` table for
`LspProgress` autocmds. This aligns with LspNotify.
The previous name was chosen because the initial handler implementation
mistakenly had a parameter name `result` instead of `params` for the
`$/progress` LSP "notification" handler. However, `params` would be a
more appropriate name that is more consistent with the underlying LSP
type (`ProgressParams`).
See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#progress
Problem:
While LuaCATS's generics system are still considered WIP by luals, they
currently support type captured generics.
See "Capture with Backtick" example:
https://luals.github.io/wiki/annotations/#generic
Solution:
Add support for it in the LuaCATS grammar
Problem:
inlay_hint `enable(<no args>)` does not activate inlay hints on open
buffers. If a buffer does not have a corresponding `bufstate` in
`bufstates`, then `enable` all buffers will not take effect on it.
Solution:
Make the effective range determined by the loaded buffers.
Fix#28624
runtime(sh,zsh): clear $MANPAGER in ftplugin before shelling out
Say you use Vim and set MANPAGER='vim -M +MANPAGER --not-a-term -'; then
:{Zs,S}hKeywordPrg (or K) will crap out and spew terminal garbage into
less when bash's "help" fails. This was introduced by 2f25e40b1
(runtime: configure keywordpg for some file types (vim/vim#5566), 2023-08-23)
and may be present in other files touched by that commit.
Make the "man" invocation sensible by unsetting MANPAGER in the
environment.
Note that changing MANPAGER for `:terminal` is not needed; Vim within
Vim is perfectly fine.
closes: vim/vim#146798d8cb45756
Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Revert the default LSP mappings before the 0.10 release as these might
need some further consideration. In particular, it's not clear if "c"
prefixed maps in Normal mode are acceptable as defaults since they
interfere with text objects or operator ranges.
We will re-introduce default mappings at the beginning of the 0.11
release cycle, this reversion is only for the imminent 0.10 release.
runtime(doc): Fix typos in help documents
closes: vim/vim#1472053753f6a49
Co-authored-by: h-east <h.east.727@gmail.com>
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Some parsers for, e.g., LaTeX or PHP have anonymous nodes like `"\"` or `"\text"` that behave wonkily (especially the first example) in the `InspectTree` window, so this PR escapes them by adding another backslash in front of them
reverts e0d92b9cc2#28502
Problem:
`vim.ui.open()` has a `pcall()` like signature, under the assumption
that this is the Lua idiom for returning result-or-error. However, the
`result|nil, errmsg|nil` pattern:
- has precedent in:
- `io.open`
- `vim.uv` (`:help luv-error-handling`)
- has these advantages:
- Can be used with `assert()`:
```
local result, err = assert(foobar())
```
- Allows LuaLS to infer the type of `result`:
```
local result, err = foobar()
if err then
...
elseif result then
...
end
```
Solution:
- Revert to the `result|nil, errmsg|nil` pattern.
- Document the pattern in our guidelines.
This avoids redraw when adding/removing an empty namespace for a window.
This also avoids marktree traversal when clearing a namespace that has
already been cleared, which is added as a benchmark.
- Sort sections according to custom preference instead of
alphabetically. It is ordered according to "most relevant" to "least
relevant" to users.
- Sort commits alphabetically
- Don't uppercase the first letter of the commit message
Experimental and subject to future changes.
Add a way to redraw certain elements that are not redrawn while Nvim is waiting
for input, or currently have no API to do so. This API covers all that can be
done with the :redraw* commands, in addition to the following new features:
- Immediately move the cursor to a (non-current) window.
- Target a specific window or buffer to mark for redraw.
- Mark a buffer range for redraw (replaces nvim__buf_redraw_range()).
- Redraw the 'statuscolumn'.
Problem:
Inlay hints `enable()` does not fully implement the `:help dev-lua` guidelines:
Interface conventions ~
- When accepting a buffer id, etc., 0 means "current buffer", nil means "all
buffers". Likewise for window id, tabpage id, etc.
- Examples: |vim.lsp.codelens.clear()| |vim.diagnostic.enable()|
Solution:
Implement globally enabling inlay hints.
* refactor(lsp): do not rely on `enable` to create autocmds
* refactor(lsp): make `bufstates` a defaulttable
* refactor(lsp): make `bufstate` inherit values from `globalstate`
* feat(lsp): `vim.lsp.inlay_hints` now take effect on all buffers by default
* test(lsp): add basic tests for enable inlay hints for all buffers
* test(lsp): add test cases cover more than one buffer
Problem: cursor() and getregion() don't handle v:maxcol well.
Solution: Add special handling for v:maxcol like setpos() does.
(zeertzjq)
closes: vim/vim#146982ffdae7948