Problem: tests: excessive wait in Test_matchfuzzy_initialized
Solution: Use term_wait() instead of the TermWait() wrapper
(Corey Hickey)
Test_matchfuzzy_initialized is a terminal test, which are specified to be
"flaky" and automatically retried. The TermWait wrapper multiplies the
specified wait time by higher values for later retries, maxing out at
10x the specified value. This makes tries vim/vim#3 to vim/vim#6 sleep for 20 seconds
each, which makes the test very slow to work with. The specified intent
of the test (as noted in a comment eight lines above here) is to
sleep for 2s.
closes: vim/vim#18822d4f9de889b
Co-authored-by: Corey Hickey <bugfood-c@fatooh.org>
Problem: tests: Test_matchfuzzy_initialized() fails
Solution: Send a dummy key (Corey Hickey)
Test_matchfuzzy_initialized seems to expect that the 'lvimgrep' will be
interrupted by sending a SIGINT. If the search finishes beforehand,
though, then the SIGINT triggers vim to tell the user how to quit.
Vim does not show this message immediately, though; instead, vim shows
the message next time it is active. When StopVimInTerminal() sends a key
sequence intended to cause vim to quit, this activates vim to show the
message instead of quitting.
I do not understand every detail of the problem fully--if I type the
characters from StopVimInTerminal() into a post-SIGTERM terminal
directly, that seems to work ok; there seems to be a timing issue due to
sending all the characters at once.
This fix does make the test work reliably for me, and the test still
works even if I limit my CPU frequency so that the search is interrupted
by the SIGINT.
fixes: vim/vim#18821
related: vim/vim#18822a3925d783a
Co-authored-by: Corey Hickey <bugfood-c@fatooh.org>
Problem:
The `flags` field calls its sub-fields "experimental".
But `exit_timeout` is now used for multiple purposes.
Solution:
Graduate `exit_timeout` to a top-level ClientConfig field.
Problem: filetype: Erlang lexical files are not recognized
Solution: Detect *.xrl files as leex filetype, include syntax and
filetype plugins (Jon Parise).
leex is the lexical analyzer generator for Erlang. Its input file format
follows a section-based structure and uses the `.xrl` file extension.
This initial work includes file detection, an ftplugin (which inherits
the Erlang configuration), and a syntax definition.
Reference:
- https://www.erlang.org/doc/apps/parsetools/leex.html
related: vim/vim#18819closes: vim/vim#18832b087c5452b
Co-authored-by: Jon Parise <jon@indelible.org>
Problem: filetype: not all Erlang files are recognized
Solution: Detect *.app.src and rebar.config files as erlang filetype
(John Parise).
*.app.src files contain Erlang application definitions. (There are also
*.app files, which are similar but more often build artifacts, and that
file extension is too ambiguous to be recognized by default.)
Reference:
- https://www.erlang.org/doc/system/applications.html
Rebar is the Erlang build tool. rebar.config uses Erlang syntax.
Reference:
- https://rebar3.org/docs/configuration/configuration/closes: vim/vim#188352b2580e61a
Co-authored-by: Jon Parise <jon@indelible.org>
Problem:
Nvim supports `textDocument/semanticTokens/full` and `…/full/delta`
already, but most servers don't support `…/full/delta` and Nvim will try
to request and process full semantic tokens response on every buffer
change. Even though the request is debounced, there is noticeable lag if
the token response is large (in a big file).
Solution:
Support `textDocument/semanticTokens/range`, which requests semantic
tokens for visible screen only.
Problem:
Remote UIs can't execute lua code when a blocking prompt is waiting for
input. This is needed when implementing IME pre-edit for example.
Solution:
Add an `nvim__exec_lua_fast` experimental API function, which is allowed
to run instead of being queued until after the message has been shown.
Problem:
Strikethrough was not enabled for vtpcon thus preventing strikethrough
text from being shown.
Solution:
Update `windows.ti`.
Co-authored-by: ymich9963 <gmichael834@gmail.com>
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Problem:
The rundll32 utility is a leftover from Windows 95, and it has
been deprecated since at least Windows Vista.
Solution:
Use the start command through Command Prompt instead.
Problem:
Currently we fetch a prebuilt xxd.exe from neovim/deps for Windows,
which is not ideal in terms of obviousness, misses updates, and is
clumsy to update.
Solution:
Similar to tee.c (#36363), vendor xxd.c from Vim and build it as part
of the Neovim build process. This makes the source obvious, enables
analyzer checks, and simplifies updates.
Fixes#36664
Problem: Returning 0 for has('patch-9.0.0') is inconsistent.
Solution: Make it return 1. (closesvim/vim#10640)
b0375d466e
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem:
LSP server may not exit even after the client was stopped/disabled via enable(false).
Solution:
Automatically force-stop after a timeout, unless `client.flags.exit_timeout = false`.
Problem: has() is not strict about parsing the patch version.
Solution: Check the version more strictly. (Ken Takata, closesvim/vim#10752)
d90f91fe30
Co-authored-by: K.Takata <kentkt@csc.jp>
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.
Problem:
Calling `:restart` twice erases the original args passed to `nvim`. This
is caused by interactions between the `:restart` command handler, the
`v:argv` parsing logic in the UI restart handler, and the options added
to `v:argv` by the server upon restart.
For example,
* Launch `nvim` as `nvim foo`:
* initial argv: `nvim foo`
* after nvim server launch: `nvim --embed foo`
* Run `:restart`
* after `ex_restart()`: `nvim -c '' --embed foo`
* after `remote_ui_restart()`: `nvim -c '' foo`
* after nvim server launch: `nvim --embed -c '' foo`
* Run `:restart` again
* after `ex_restart()`: `nvim -c '' --embed -c '' foo`
* after `remote_ui_restart()`: `nvim -c ''`
* after nvim server launch: `nvim --embed -c ''`
The intention of the argv parser in `remote_ui_restart()` is to only
take the first `-c cmd` and ignore any additional ones, but it actually
ignores the rest of argv when it encounters a second `-c` and there are
no `-` or `--` remaining.
Solution:
Fix the argv parser to reset the `skipping_minc` flag at the end of
every iteration that does not reach the `continue` statement.
Problem: Null pointer dereference when checking *wp->w_p_stl.
win_set_inner_size called twice in win_new_float.
Solution: Add null check for wp->w_p_stl. Remove redundant
win_set_inner_size call as win_config_float already calls it.
Problem: completion: complete_match() Vim script function and
'isexpand' option are not that useful and confusing
(after v9.1.1341)
Solution: Remove function and option and clean up code and documentation
(Girish Palya).
complete_match() and 'isexpand' add no real functionality to Vim. They
duplicate what `strridx()` already does, yet pretend to be part of the
completion system. They have nothing to do with the completion mechanism.
* `f_complete_match()` in `insexpand.c` does not call any completion code.
It’s just a `STRNCMP()` wrapper with fluff logic.
* `'isexpand'` exists only as a proxy argument to that function.
It does nothing on its own and amounts to misuse of a new option.
The following Vim script function can be used to implement the same
functionality:
```vim
func CompleteMatch(triggers, sep=',')
let line = getline('.')->strpart(0, col('.') - 1)
let result = []
for trig in split(a:triggers, a:sep)
let idx = strridx(line, trig)
if l:idx >= 0
call add(result, [idx + 1, trig])
endif
endfor
return result
endfunc
```
related: vim/vim#16716fixes: vim/vim#18563closes: vim/vim#18790cbcbff8712
Co-authored-by: Girish Palya <girishji@gmail.com>
Problem: completion: 'completefuzzycollect' option is too obscure
Solution: Deprecate the option, but don't error out for existing scripts,
behave like 'completefuzzycollect' is set when fuzzy
completion is enabled (Girish Palya).
fixes: vim/vim#18498closes: vim/vim#1878833fbfe003c
Remove this option completely, as it's introduced in Nvim v0.12 cycle.
Co-authored-by: Girish Palya <girishji@gmail.com>
Problem: When creating floating window from existing window, the
window-local 'statusline' option is inherited, causing unwanted
statusline display. Additionally, with laststatus=3 (global statusline),
the early return skipped clearing wp->w_redr_status flag.
Solution: Clear inherited window-local 'statusline' in win_new_float
for style="minimal". Restructure win_redr_status to always clear the
flag before any early returns, and only render floating window statusline
when window-local 'statusline' is explicitly set. And respect 'laststatus'
option.
Problem:
In scripts/genappimage.sh running on arm64 host, the $ARCH will be set to
'arm64' before calling linuxdeploy, which cause linuxdeploy to generate
an 32bit ELF executable instead 64bit. See the issue for more details.
Solution:
Keep $ARCH unchanged, use $ARCH_OUTPUT in the output file name. On arm64
host, $ARCH_OUTPUT will be converted to 'arm64'.
Don't handle cindent in insert_check(). Instead, do that just before
returning from insert_execute() if required.
This also makes the in_cinkeys() change from #12894 unnecessary.
- 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