- Add section `VIM.LPEG` and `VIM.RE` to docs/lua.txt.
- Add `_meta/re.lua` which adds luadoc and type annotations, for the
vendored `vim.re` package.
- Fix minor style issues on `_meta/lpeg.lua` luadoc for better vimdocs
generation.
- Fix a bug on `gen_vimdoc` where non-helptags in verbatim code blocks
were parsed as helptags, affecting code examples on `vim.lpeg.Cf`,
etc.
- Also move the `vim.regex` section below so that it can be located
closer to `vim.lpeg` and `vim.re`.
Typings introduced in #26032 and #26552 have a few conflicts, so we
merge and clean them up. We also fix some incorrect type annotation in
the `vim.lsp.rpc` package. See the associated PR for more details.
Summary:
- vim.rpc.Dispatchers -> vim.lsp.rpc.Dispatchers
- vim.lsp.rpc.Error -> lsp.ResponseError
- Revise docs
Problem: Current values of `StatusLine` and `StatusLineNC` are currently
designed to be visually distinctive while being not intrusive.
However, the compromise was more shifted towards "not intrusive".
After the feedback, statusline highlight groups should be designed to:
- Make current window clearly noticeable. Meaning `StatusLine` and
`StatusLineNC` should obviously differ.
- Make non-current windows clearly separable. Meaning `StatusLineNC`
and `Normal`/`NormalNC` should obviously differ.
Solution:
- Update `StatusLineNC` to have more visible background.
- Update `StatusLine` to be inverted variant of `StatusLineNC`.
- Update `WinBar` and `WinBarNC` to not link to `StatusLine` and
`StatusLineNC` because it makes two goals harder to achieve.
- Update `TabLine` to link to `StatusLineNC` instead of `StatusLine`
to not be very visually intrusive.
Problem: Decor range is being redrawn unconditionally, negating the
more conservative line redrawing that follows.
Solution: Get rid of unconditional redraw_buf_range_later() call.
Problem: Coverity complains about improper use of negative value
Solution: Add a condition to validate that keytyped is larger or equal
to 0
Apparently patch 9.1.0006 made it more explicit for Coverity, that the
TOLOWER_LOC() macros do not handle negative values properly. However,
that condition has always been there even before that, so add a
condition to verify that keytyped is indeed at least 0
closes: vim/vim#1382449471963fe
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: i_CTRL-R- doesn't work for multibyte chars in Replace mode,
Coverity complains missing return value for u_save_cursor()
Solution: Use mb_charlen() and del_chars() instead, handle failure mode
for u_save_cursor() correctly (@zeertzjq)
closes: vim/vim#13846424ec1f235
Problem: i_CTRL-R- no longer works in replace mode
Solution: delete characters in replace mode before putting, add a test,
add a bit warning into the documentation, that i_CTRL-R-P/O
is not supported in Replace mode for now
fixes: vim/vim#13792closes: vim/vim#138165d5cbb2b9a
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: Deleted lines go to wrong yank register.
Solution: Reset y_append when not calling get_yank_register(). (Christian
Brabandt, closesvim/vim#8872)
78eb9cce91
Nvim has removed y_append static variable and already works as expected.
Co-authored-by: Christian Brabandt <cb@256bit.org>
* fix(flake): clang-tools moved to nativeBuildInputs
Buildtime binaries should go in `nativeBuildInputs`
Before `clang-tools` version was overwriten breaking the Lsp.
Relevant issues:
https://github.com/NixOS/nixpkgs/issues/76486
* remove cmake, available in the nixpkgs derivation
runtime(netrw): Decode multibyte percent-encoding filename correctly (vim/vim#13842)
Use `printf("%c")` instead of `nr2char()` to handle '%xx' as a byte.
Closevim/vim#137872357765304
Co-authored-by: K.Takata <kentkt@csc.jp>
runtime(colorschemes): Add initial support for Added/Removed/Changed highlight groups (vim/vim#13830)
For some of the colorschemes where diffAdded and diffRemoved were explicitly set up.
5f4cc8ea65
Co-authored-by: Maxim Kim <habamax@gmail.com>
Problem: default diff highlighting is too noisy
Solution: Link diff highlighting groups to new
Added/Removed/Changed, revert previous change
(Romain Lafourcade)
Remove diff* links added in vim/vim#13776 and doc added in commit b1392be
The links added in vim/vim#13776 are way too noisy for the contexts in which
the `diff` syntax is applied (git commits, patches, etc.).
This commit:
- removes those links
- adds new default highlighting groups Added, Changed and
Removed
- links the diff highlighting groups to those new defaults
- removes the doc changes
- adjusts the syntax_completion test for those newly added group
names
Note: Changes to the default color schemes will be handled separately,
by adding links to those newly created Added/Removed/Changed
highlighting groups.
related: vim/vim#13776closesvim/vim#13825124371c5a1
Co-authored-by: Romain Lafourcade <romain.lafourcade@razorfish.fr>
Problem: regexp cannot match combining chars in collection
Solution: Check for combining characters in regex collections for the
NFA and BT Regex Engine
Also, while at it, make debug mode work again.
fixesvim/vim#10286closes: vim/vim#12871d2cc51f9a1
Co-authored-by: Christian Brabandt <cb@256bit.org>
Remove `export` pramgas from defs headers as it causes IWYU to believe
that the definitions from the defs headers comes from main header, which
is not what we really want.
grid_put_linebuf() used grid_clear() internally to handle clearing the
left part of a rightleft line. By reimplementing that internally, we
can instead use grid_put_linebuf() as the implementation of
grid_clear(), which in the end is a net reduction of code as grid_fill()
is used for nothing else.
win_draw_end: Implement "draw_margin" on a per-row basis which closer reflects how
terminals work. Also use the magic mirror for 'rightleft'
runtime(tar): fix a few problems with the tar plugin
From: vim/vim#138331:
- Updating .tar.zst files was broken. Fixesvim/vim#12639.
- Extracting files from .tar.zst / .tzs files was also broken and
works now.
From: vim/vim#12637:
- Fixes variable assignment and typo
From: vim/vim#8109:
- Rename .tzs to the more standard .tzst
fixes: vim/vim#12639fixes: vim/vim#8105closes: vim/vim#8109closes: vim/vim#12637closes: vim/vim#138313a5b3df776
Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Martin Rys <martin@rys.pw>
Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Co-authored-by: Carlo Teubner <carlo@cteubner.net>
This commit implements a new TermRequest autocommand event and has Neovim
emit this event when children of terminal buffers emit an OSC or DCS sequence
libvterm does not handle.
The TermRequest autocommand event has additional data in the
v:termrequest variable.
Co-authored-by: Gregory Anders <greg@gpanders.com>
Problem: Some lines in the generated vim doc are overflowing, not
correctly wrapped at 78 characters. This happens when docs body contains
several consecutive 'inline' elements generated by doxygen.
Solution: Take into account the current column offset of the last line,
and prepend some padding before doc_wrap().
A bit big, but practically it was a lot simpler to change over all
fillchars and all listchars at once, to not need to maintain two
parallel implementations.
This is mostly an internal refactor, but it also removes an arbitrary
limitation: that 'fillchars' and 'listchars' values can only be
single-codepoint characters. Now any character which fits into a single
screen cell can be used.
Improve error messages for `:InspectTree`, when no parsers are available
for the current buffer and filetype. We can show more informative and
helpful error message for users (e.g., which lang was searched for):
```
... No parser available for the given buffer:
+... no parser for 'custom_ft' language, see :help treesitter-parsers
```
Also improve the relevant docs for *treesitter-parsers*.
buf is a pointer argument, not a local char array, so sizeof(buf) is just the size of a pointer type on the platform. This is always an incorrect value, but on 32-bit platforms it actually has an impact, since sizeof(buf) is just 4 and causes the buffer to get truncated.