Problem:
assert_log() only matches single lines. This was never an intentional
decision, it was merely a result of using read_file_list().
Note: any tests that indiscriminately match `.*` should be rewritten to
avoid (unlikely) "false positives". I checked all existing tests.
Solution:
Change assert_log() to match the concatenated lines instead of matching
per-line.
problem: Error notifications from LSP responses were difficult to read due to
inconsistent formatting and missing critical information like client name and error codes.
solution: Implemented a more structured error notification format using pipe separators to
clearly display client name, error code (when available), and error message.
Problem:
enable() routine detaches clients even if they were manually started
and not managed by vim.lsp.config.
Solution:
Skip clients that aren't managed by vim.lsp.config.
Problem:
When searching for the next pattern via n/N/*/#, cursor
moves to cmdline, perceived as "flicker".
Solution:
Can ui_busy_start() and ui_busy_stop().
Problem: More-window is left visible after leaving it. Cursor may be
hidden behind it and it is hard to re-enter afterwards.
Solution: Close the more-window when another window is entered.
${CONFIG} is an empty string even when configuration is known at
configuration time. $<CONFIG> has to be used at "generation time"
Currently zig's reimplementation of cmake config headers does not
support $<CONFIG> so use a branch to pick the one which works.
Problem: [security]: Possible to open more windows into a closing
buffer without splitting, bypassing existing "b_locked_split"
checks and triggering use-after-free
Solution: Disallow switching to a closing buffer. Editing a closing
buffer (via ":edit", etc.) was fixed in v9.1.0764, but add an
error message and check just "b_locked_split", as "b_locked"
is necessary only when the buffer shouldn't be wiped, and may
be set for buffers that are in-use but not actually closing.
(Sean Dewar)
closes: vim/vim#172466cb1c82840
Problem: Spliced conceal_lines marks after changing the buffer text are
left valid, concealing lines that shouldn't be.
Solution: Set the `invalidate` extmark property.
Problem: Ruler is not cleared from the screen/ext_messages state when
it is no longer drawn after e.g. `set noruler` or when moving
from a floating to a regular window.
Solution: Remember if ruler was drawn and clear it.
Problem: `:copen` opens at the bottom by switching to `lastwin`,
needlessly changing the window it inherits context from.
Solution: Use the `WSP_BOT` flag to `win_split()` to open at the bottom.
Problem:
`input->in_fd = STDIN_FILENO;` was set twice during TUI initialization.
Solution:
Remove the duplicate assignment for clarity and better performance
Problem:
`any[]` means nothing, and the return value is not the same as what's
documented in the comment (eg, Lua returns `{ "row", { { "leaf", 1000 },
{ "leaf", 1001 } } }`, not `{ "row", { "leaf", 1000, "leaf", 1001 } }`)
Solution:
Create two classes (vim.fn.winlayout.leaf and vim.fn.winlayout.branch)
and one alias that links the two together.
Also: Due to LuaLS limitations, there is an empty class,
vim.fn.winlayout.empty
Signed-Off-By: VoxelPrismatic <voxelprismatic@pm.me>
Problem: Using `<C-W>w`, `<C-W>W` or the ":wincmd" variants with a count can
enter unfocusable or hidden floating windows. This is especially problematic
when using the new in-development extui, which creates many unfocusable floats
for various UI elements.
Solution: Skip unfocusable and hidden floating windows. Instead, skip to the
next focusable, non-hidden window in the current tabpage's window list. Reword
the documentation a bit (hopefully an improvement?)
Problem:
No way to check if a LSP config is enabled without causing it to
resolve. E.g. `vim.lsp.config['…'] ~= nil` will resolve the config,
which could be an unwanted and somewhat expensive side-effect.
Solution:
Introduce `vim.lsp.is_enabled()`.
- Add missing diagnostics virtual lines hl groups.
- Fix LSP dynamic registration example; curbuf may not actually be attached to
the client, and it may be attached to many such buffers.
Problem:
The check for concealing paths in TOCs in the qf syntax file fails
because the TOC tile has changed.
Solution:
Force the qf syntax file to be reloaded after the qf_toc variable
has been set, so that the it can apply the correct settings.
Using the explicit qf_toc key, already used in the syntax file, instead
of the title is less prone to breaking.
It was also already being set for man pages but it had no effect because
the syntax file had already been loaded when the variable was set.
Fixes#33733
**Problem:** For multiline diagnostics, the end column was improperly
calculated by checking the byte index of the character position on the
*start* line.
**Solution:** Calculate the byte index for end_col using the *end* line.
Problem: The TUI doesn't forward a key properly when it has unsupported
modifiers like NumLock.
Solution: Don't try to add modifiers when only unsupported modifiers are
present.
Related #33791
Problem: The cmdline popupmenu is hidden behind extui windows.
'showmode' message is drawn over the cmdline.
Changing the 'cmdheight' to accommodate space for the text in
the cmdline may change the current cursor position.
Solution: Ensure kZIndexMessages < zindex < kZIndexCmdlinePopupMenu.
Clear the 'showmode' message when the cmdline level is negative.
Temporarily set 'splitkeep' = "screen" when changing the 'cmdheight'.
Problem:
stderr messages from executing ":!cmd" show up with
highlight hl-ErrorMsg. But some shell utilites use stderr for debug
logging, progress updates, etc.
Solution:
Highlight shell command outputs hl-StderrMsg and hl-StdoutMsg.
Problem: Not picking up configured option values when enabling _extui after startup.
Solution: Check option values when enabing _extui.
Fix https://github.com/neovim/neovim/issues/33767
This fixes the problem that sending a raw C0 control code to trigger a
mapping for it does not work in Terminal mode.
Note: this isn't done for 00 or 7F, as that'll be backward-incompatible.
Problem: We have an unmaintained Vimscript parser and cmdline
highlighting mechanism, with which it is hard to leverage the
treesitter highlighter. Long messages result in a hit-enter-prompt.
Solution: Implement a vim.ui_attach() UI, that replaces the message
grid (orphaning some 3000+ LOC core C code). Introduce an experimental
vim._extui module, because removing the message grid at the same time is
too risky. The new UI leverages the bundled treesitter highlighter and
parser for Vimscript, as well as the matchparen plugin, to highlight the
cmdline. Messages are truncated in the cmdline area, or placed in a
floating message box in the bottom right corner. Special ("list_cmd")
messages and the message history are shown in a, "more prompt" (now a
fully interactive regular window). Various default UI elements ('showcmd',
'ruler') are also placed in the cmdline area, as virtual text.
`require('vim._extui').enable({})` enables the experimental UI.
`{ msg.pos = 'box' }` or `:set cmdheight=0` enables the message
box variant.
Followup:
- Come to a consensus for how best to represent messages (by default).
- Start removing message grid when this is deemed a successful replacement.
When that is finished, make this new UI the default and update a lot of tests.
NEW BUILD SYSTEM!
This is a MVP implementation which supports building the "nvim" binary,
including cross-compilation for some targets.
As an example, you can build a aarch64-macos binary from
an x86-64-linux-gnu host, or vice versa
Add CI target for build.zig currently for functionaltests on linux
x86_64 only
Follow up items:
- praxis for version and dependency bumping
- windows 💀
- full integration of libintl and gettext (or a desicion not to)
- update help and API metadata files
- installation into a $PREFIX
- more tests and linters
- :helptags is also a tags generating program, it deserves mentioning
- JTags seems too dead: its website has been sold, the source, binary
can't be found anywhere.
- update link of ptags
closes: vim/vim#1723383cb8174c8
Co-authored-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Problem: Vim incorrectly escapes tags containing "[" in a help buffer
Solution: check if the buffer has the "help" filetype set, instead of
already being a help buffer (Phạm Bình An)
fixes: vim/vim#17224closes: vim/vim#172326af20a9be3
Co-authored-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>