**Problem:** When enabling document_color multiple times for the same
buffer (or when toggling it on and off), duplicate autocmds are created
since the previous ones are not cleared.
**Solution:** Clear the appropriate buffer-local autocmds when
enabling/disabling document color functionality.
Problem: filetype: bright(er)script files are not recognized
Solution: detect *.bs files as brighterscript filetype and *.brs as
brightscript filetype, include filetype plugins (Riley Bruins)
closes: vim/vim#1756603e5ee25fd
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
Problem: too many strlen() calls
Solution: Change expand_env() to return string length
(John Marriott)
This commit does the following changes:
- In expand_env_esc():
- return the length of the returned dst string.
- refactor to remove some calls to STRLEN() and STRCAT()
- add check for out-of-memory condition.
- Change call sites in various source files to use the return value
closes: vim/vim#17561fff0132399
Co-authored-by: John Marriott <basilisk@internode.on.net>
Problem:
- Missing some important Vim features
- Since Nvim 0.5, package.path and package.cpath don't include
`'runtimepath'` (thought `require()` can still find modules in
`runtimepath`)
Closes#33938
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Problem: filetype: not all lex files are recognized
Solution: detect *.ll as lex, llvm or lifelines filetype, depending on
the content (Eisuke Kawashima)
closes: vim/vim#1756048295111e5
Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Problem:
In LSP configs, the function form of `cmd()` cannot easily get the
resolved root dir (workspace). One of the main use-cases of a dynamic
`cmd()` is to be able to start a new server whose binary may be located
*in the workspace* ([example](https://github.com/neovim/nvim-lspconfig/pull/3912)).
Compare `reuse_client()`, which also receives the resolved config.
Solution:
Pass the resolved config to `cmd()`.
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Problem: No ext_messages kind for the :command, :version commands.
:version is emitted as multiple events.
Solution: Assign them the "list_cmd" kind. Use `msg_put*` to properly
format the message as a single event.
Problem:
Cannot enter multiline prompts in a buftype=prompt buffer.
Solution:
- Support shift+enter (`<s-enter>`) to start a new line in the prompt.
- Pasting multiline text via OS paste, clipboard, "xp, etc.
- A/I in editable region works as usual.
- i/a/A/I outside of editable region moves cursor to end of current
prompt.
- Support undo/redo in prompt buffer.
- Support o/O in prompt buffer.
- Expose prompt location as `':` mark.
Problem: Buffer events (specifically on_bytes callbacks) weren't triggered when the
quickfix list was modified, preventing buffer change notifications.
Solution: Add code to send both bytes and lines change notifications after
quickfix buffer updates to properly trigger all attached callbacks.
Problem: The new cert-arr39-c and bugprone-tagged-union-member-count
checks introduced in clang-tidy 20 fail on Neovim's codebase, even
though the code is correct.
Solution: Disable these two checks by modifying the .clang-tidy
configuration file.
Problem: Currently, vim.notify is only used to display messages when the
message type is Error.
Solution: Use vim.notify to display messages for all message types.
Workaround (not a fix) for #27196 and for #33067
Asserts are meant to apply to debug builds but not release
builds for users. However the intermediate RelWithDebInfo
build type is quite often used by end users, so we might
want to disable certain problematic asserts there, while
still preserving them in Debug mode for CI.
Problem: Screen may be updated by a msg_showcmd event before '"' is
cleared from the screen with register insertion.
Solution: Emit the msg_showcmd event before clearing the '"'.
Problem: The "append" parameter added in abb40ece is missing from
history entries, resulting in different message formatting
for "g<".
Solution: Add "append" field to message history entries.
Co-authored-by: phanium <91544758+phanen@users.noreply.github.com>
Problem: Cmdline buffer is not cleared for a new message (since c973c7ae),
resulting in an incorrect spill indicator. When the cmdline
buffer is cleared, "msg_row" is not invalidated, resulting in
an error. The extui module is untested.
Return value of `vim.ui_attach()->callback` is undocumented.
Solution: Clear the cmdline buffer for the first message in an event
loop iteration. Ensure msg_row passed as end_row does not
exceed buffer length.
Add `messages_spec2.lua` to test the extui module, keeping in
mind that test coverage will greatly increase if this UI is made
the default. As such, only tests for specific extui functionality
unlikely to be covered by tests leveraging the current message grid.
Document the return value of `vim.ui_attach()->callback`, it seems
to make sense, and is also used to suppress remote UI events in
`messages_spec2.lua`.
Problem: When closing a floating window, the next window to be entered
may be unfocusable or hidden.
Solution: Don't enter prevwin when it is unfocusable or hidden. Enter
firstwin instead (like for when prevwin is no longer valid).
Problem: nvim_parse_cmd() incorrectly splits mapping commands like
into three arguments instead of preserving whitespace in the RHS.
Solution: Add special handling for mapping commands to parse them as exactly
two arguments - the LHS and the RHS with all whitespace preserved.