This workarounds a bug likely in nvim__get_runtime, and fixes#35124
Though I'd argue it is more correct anyway as the point of
vim.SUBMODULE lazy loading is "only pay for what you use". If no one
has require'vim.diagnostic' yet in LSP or otherwise, there cannot
be any diagostics available and loading the lua module is wasteful.
Problem:
It's relatively easy to mispress key `a` to (a)llow arbitrary execution
of 'exrc' files. #35050
Solution:
- For exrc files (not directories), remove "allow" menu item.
Require the user to "view" and then explicitly `:trust` the file.
Problem:
diagnostic extmark used for positioning continues to exist after
deleting a range containing it, so it's possible to jump to a
next/previous diagnositc, which isn't visible in any way, including not
being shown via `open_float`.
Solution:
enable `invalidate` flag when setting an extmark to be able to filter
out diagnostics based on `invalid` flag when looking for next/previous
diagnostic to jump to.
When right_gravity is set to true for deactivating tabstop expansion we
have to set end_right_gravity to false to avoid expanding the tabstop
region on the right side. Vice versa for activating tabstop expansion
again.
Problem:
When setting extmark for a codelens after it's asynchronously resolved,
the line may have been removed, raising "invalid 'line': out of range"
error. This is a regression from #34888.
Solution:
Re-introduce the line count check.
Problem:
Diagnostic positions are not being updated after text changes, which
means `vim.diagnostic.open_float` and `vim.diagnostic.jump` will work
with outdated positions when text is changed until diagnostics are
updated again (if ever).
Solution:
Create extmarks in `vim.diagnostic.set` and use their positions for
`vim.diagnostic.open_float` and `next_diagnostic` (used by
`vim.diagnostic.jump`, `vim.diagnostic.get_next` and
`vim.diagnostic.get_prev`).
Problem: :term splits new window above in vim, but in nvim it change
the buffer for current window
Solution: :hor term to ensure consistent splitting for Vim and Neovim
closes: vim/vim#17822714671de35
Co-authored-by: phanium <91544758+phanen@users.noreply.github.com>
Problem:
":restart" always executes ":qall" to exit the server.
Solution:
Support ":restart +cmd" so the user can control the command
used to exit the server.
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Problem:
Vimscript functions return number to signal ok/error. Lua doesn't
convert these to be falsey.
Solution:
Explicitly check if the return value is 0.
Problem: After filtering out all elements, ArrayIter:last still returns a stale element.
Solution: Add check for self._head == self._tail and return nil early.
Fix#34696
Problem:
- There is reference to gVim in the usr_02.txt file, even though Nvim
has no built-in GUI.
- `:h help-summary` has a section about optional features (e.g.
`+conceal`) even though such thing does not exist in Nvim (`:h
+conceal` will give E149 error).
Solution:
- Remove reference to gVim.
- Replace the section about optional features with a section about Lua.
Problem: cannot easily trigger wildcard expansion
Solution: Introduce wildtrigger() function
(Girish Palya)
This PR introduces a new `wildtrigger()` function.
See `:h wildtrigger()`
`wildtrigger()` behaves like pressing the `wildchar,` but provides a
more refined and controlled completion experience:
- Suppresses beeps when no matches are found.
- Avoids displaying irrelevant completions (like full command lists)
when the prefix is insufficient or doesn't match.
- Skips completion if the typeahead buffer has pending input or if a
wildmenu is already active.
- Does not print "..." before completion.
This is an improvement on the `feedkeys()` based autocompletion script
given in vim/vim#16759.
closes: vim/vim#17806b486ed8266
While at it, also make Ctrl-Z trigger search completion.
Co-authored-by: Girish Palya <girishji@gmail.com>
Problem: Routing based on message kinds can be perceived as unpredictable.
Solution: Implement phase 1 of #34281, always showing the full message
in a window dismissed on any user input when it does not fit
in the 'cmdheight'. Also show spill "[+n]" indicator if needed.
**Problem:** For unchanged document diagnostic reports, the `resultId`
is ignored completely, even though it should still be saved for the
request (in fact, the spec marks it as mandatory for unchanged reports,
so it should be extra important).
**Solution:** Always store the `resultId`.
Problem: No numerical value for the patchlevel.
Solution: Add v:versionlong.
37df9a4401
Restore "highest_patch()" solely for "v:versionlong".
Copy/paste Test_vvar_scriptversion2() from patch 9.1.1540.
It works without ":scriptversion 2".
In general, if Vim's test works with ":scriptversion 1", just port it
for additional coverage.
---
vim-patch:8.1.1565: MS-Windows: no sound support
Problem: MS-Windows: no sound support.
Solution: Add sound support for MS-Windows. (Yasuhiro Matsumoto, Ken Takata,
closesvim/vim#4522)
9b283523f2
----
"sound" feature is N/A now but this updates "v:versionlong" docs.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
- Match :autocmd options and special buffer pattern.
- Normalise ellipsis (three dots) in Ex command argument lists.
closes: vim/vim#1779331ec66403d
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Problem:
`:EditQuery` command accepts a language argument, but it doesn't
highlight properly for injected languages.
Solution:
- Fully parse with the root language and then filter the query on the
child trees that are of the language requested.
- Also support completion (`EditQuery <tab>`).
Problem:
- Extmark breaks lesson 3.1 of vim-01-beginner.tutor because when users
delete the line and put it elsewhere, the extmark doesn't move to the
put location.
- This doesn't mean the extmark implementation is bad though (note that
thanks to extmark, for the first time, we can make lesson 2.6 really
interactive), it's just that the tutor format has never been made for
kinds of lessons like lesson 3.1, which is why all "expected" in that
lesson are -1, which also means that lesson is not interactive in the
first place. Also see lesson 2.1.3 in vim-02-beginner, where the mark
is just used to mark the first line of the exercise, which also prove
my point.
Solution:
- For a not-really-interactive lesson like lesson 3.1, just use legacy
syntax. I borrow the old vimtutor's `--->` to mark the exercises of
the lesson.
- Less redundant interactive marks also make the json files smaller and
more maintainable.