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:
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:
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: 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>
- 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:
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>
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.
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:
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.
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.
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.
fix(ui2): hide search highlights in msg window.
Problem: Search highlighting is shown in the msg (and dialog) window.
Solution: Hide search highlighting in all but the pager window.
Problem: running ./build/bin/nvim without make install
- doesn't respect local changes in ./runtime,
- includes the path where Nvim would be installed,
- ignores changes in precompiled Lua modules (like .../vim/_editor.lua)
Solution:
- use VIMRUNTIME=./runtime,
- use --luamod-dev
Problem:
With the typescript LSes typescript-language-server and vtsls,
omnicompletion on partial tokens for certain types, such as array
methods, and functions that are attached as attributes to other
functions, either results in no entries populated in the completion menu
(typescript-language-server), or an unfiltered completion menu with all
array methods included, even if they don't share the same prefix as the
partial token being completed (vtsls).
Solution:
Enable insertReplaceSupport and uses the insert portion of the lsp
completion response in adjust_start_col if it's included in the
response.
Completion results are still filtered client side.
Problem: the opts table also is param of util.open_floating_preview,
vim.diagnostic.Opts.Float missing some fields of open_floating_preview.
Solution: diagnostic.Opts.Float extend util.open_floating_preview.Opts
Fix#29267