- Change "Prepended" (past tense) to "Prepend" (present tense,
imperative).
- Add short examples clarifying the behavior of prepending a count to
commands that jump to changes in diff mode.
closes: vim/vim#18810712b650332
Co-authored-by: Brent Pappas <pappasbrent@gmail.com>
Problem:
Creating a bug report is somewhat tedious for users.
Bug reports sometimes are missing useful info.
Solution:
Add a feature to :checkhealth which automatically gets
system info and includes it in a new bug report.
Problem:
nvim_get_commands does not return callbacks defined for
"preview", "complete", or the command itself.
Solution:
- Return Lua function as "callback" field in a Lua context.
- Return "preview" function in a Lua context.
- BREAKING: Return "complete" as a function instead of a boolean.
Problem:
`diagnostic.status()` is configured via `config.signs`, but users may
want diagnostics only in statusline, not in the gutter (signs).
Solution:
Add `config.status`.
Problem: apply_autocmds function can free both buf_T and win_T pointers
Solution: instead retain winids for WinResized and WinScrolled
autocmds and use curbuf pointer, which is consistent with other uses
of apply_autocmds function
Problem:
When `MANPAGER` is set to something like 'nvim +Man!',
`vim.system({ 'nvim' })` call waits forever for input and times out
after 10 seconds in `system()` and the assert on `stdout` being not
`nil` fails.
Solution:
Set `MANPAGER=cat` when calling `system()`
Problem:
LSP incremental selection provides default visual-mode keymaps for `an`
and `in`. Operator-pending mode is not supported, so `dan` and `can` do
not apply the operation.
Solution:
Modify selection_range() to be synchronous.
Add operator-pending mappings.
Add "Environment variables are expanded |:set_env|" documentation to
options that have the P_EXPAND flag but were missing this note.
Updated options:
- 'cdpath'
- 'dictionary'
- 'mkspellmem'
- 'packpath'
- 'runtimepath'
- 'spellfile'
- 'spellsuggest'
- 'thesaurus'
- 'ttytype'
- 'undodir'
- 'verbosefile'
- 'viewdir'
- 'viminfofile'
These options support environment variable expansion in their values
(e.g., $HOME, $USER) but the documentation didn't explicitly mention
this capability. This brings their documentation in line with other
options like backupdir, directory, and makeprg that already include
this note.
closes: vim/vim#187912190036c8c
Co-authored-by: Alex Plate <AlexPl292@gmail.com>
Initial support for compiling on haiku os. Some deps can be pulled from
haiku repos, some need to be compiled with nvim's dep build system:
cmake -DUSE_BUNDLED_LIBUV=OFF -DUSE_BUNDLED_UNIBILIUM=OFF -DUSE_BUNDLED_LUAJIT=OFF -B .deps ./cmake.deps
make -C .deps
Problem:
No way to detect at runtime if the build includes unibilium (or whatever
terminfo layer we swap it with later).
Solution:
Support `has('terminfo')`.
Problem:
We have too many build flags.
BUNDLED_CMAKE_FLAG is redundant with DEPS_CMAKE_FLAGS.
Solution:
In documentation, refer to DEPS_CMAKE_FLAGS instead of BUNDLED_CMAKE_FLAG.
Problem: `extmark_splice()` was being called before `ml_replace()`,
which caused the on_bytes callback to be invoked with the old buffer
text instead of the new text.
Solution: store metadata for each match in a growing array, call
`ml_replace()` once to update the buffer, then call `extmark_splice()`
once per match.
Closes https://github.com/neovim/neovim/issues/36370.
As a matter of caution it sets it to the default gcc errorformat:
```
errorformat=%*[^"]"%f"%*\D%l: %m,"%f"%*\D%l: %m,%-Gg%\?make[%*\d]: *** [%f:%l:%m,%-Gg%\?make: *** [%f:%l:%m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c\,,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\,,%-G%*[ ]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,"%f"\, line %l%*\D%c%*[^ ] %m,%D%*\a[%*\d]: Entering directory %*[`']%f',%X%*\a[%*\d]: Leaving directory %*[`']%f',%D%*\a: Entering directory %*[`']%f',%X%*\a: Leaving directory %*[`']%f',%DMaking %*\a in %f,%f|%l| %m
```
so that the compiler keeps working after switching to others.
While likely only a subset is needed; such a subset has been proposed in
a commented errorformat;
checked to work for yamllint but ran out of steam for other compilers;
closes: vim/vim#1875474b4f9242e
Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
This formatting (although rare) is actually accepted by GHC, but vim
does not highlight it. This patch adds the simplest possible regex to
support the behavior.
Inconveniently, this might trigger weird formatting on lines that
contain errors, e.g. if the first backtick is removed from:
a `b` c `d` e
then `c` is going to be marked as an operator, which seems weird but is
valid.
closes: vim/vim#18776ddb88ab796
Co-authored-by: Mirek Kratochvil <exa.exa@gmail.com>
Problem: 'commentstring' requires the +folding feature but is used in
contexts other than folding.
Solution: Remove the +folding feature guards from 'commentstring' and
make it available in all builds (Doug Kearns).
closes: vim/vim#18731a08030c9f7
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Problem: When assigning to @. in a :let command an incorrect "E15"
error is emitted.
Solution: Emit the correct "E354" error. (Doug Kearns).
An incorrect "E488" error was also emitted in Vim9 script assignments.
It appears that the code deleted in this commit was added to work around
a limitation in the returned value from find_name_end() that no longer
exists.
See commit 76b92b2830841fd4e05006cc3cad1d8f0bc8101b (tag: v7.0b).
closes: vim/vim#187572447131e00
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Problem: Wrong virtcol('$') with virtual text at EOL (rickhowe).
Solution: Also add 1 to end virtcol when there is virtual text.
(zeertzjq)
fixes: vim/vim#18761closes: vim/vim#18762d434f6c2a5
Problem: tests: not enough testing for wildtrigger() pum redrawing.
Solution: Also test redrawing when leaving cmdline mode (zeertzjq).
closes: vim/vim#18773eb33c2eb28
Problem:
If the buffer changes during iteration of the query matches,
`get_node_text()` may fail, showing an error to the user.
Solution:
Use `pcall` to not propogate the error to the user. Retry once if an
error occurred.
Problem:
Trying to match the search highlight groups to the Normal highlight for
the window can fail when the message highlighting contains a fg/bg that
the Normal highlight doesn't (like an error message in cmd will have
ErrorMsg highlight instead of MsgArea - which is Normal in cmd.)
Solution:
Link the search highlight groups to an empty group in 'winhighlight'
thus disabling them instead of overriding them with Normal/MsgArea/etc.
Limit the default truncation item to the current recursion range so
nested `nvim_eval_statusline()` calls don't reuse stale `stl_items`
pointers. Add a functional regression that evaluates a Lua statusline
helper which forces truncation to ensure the nested scenario stays
stable.
AI-Assist: OpenAI ChatGPT
Fixes#36616
Problem:
When running ":edit <url>", filetype detection is not triggered.
Solution:
Run the autocmds in the filetypedetect group after loading the content.
Problem:
After fetching remote content from a URL and adding it to the buffer,
the buffer is marked as modified. This is inconsistent with the original
netrw behavior, and it causes problems with `:e` to refresh or `:q` as
it prompts for saving the file even if the user hasn't touched the
content at all.
Solution:
Mark the buffer as unmodified right after adding the remote content to
the buffer.
Problem:
AUR does not want a web-scale implementation of "tee".
Solution:
- Only install "tee" on Windows.
- The build will still produce `./build/bin/tee` on all platforms, to
have more coverage and avoid special-cases in tests.
Technically the current behavior does match documentation. However, the
keys following <Cmd>/K_LUA aren't normally received by vim.on_key()
callbacks either, so it does makes sense to discard them along with the
preceding key.
One may also argue that vim.on_key() callbacks should instead receive
the following keys together with the <Cmd>/K_LUA, but doing that may
cause some performance problems, and even in that case the keys should
still be discarded together.