- Change syntax file maintainer.
- Add Guile and Python command highlighting.
- Update command list to version 12.
- Add foldable regions for the commands 'define', 'if' and 'while'
multiline commands.
- Support documented partial command names.
- Add matchit, browsefilter, and comment formatting support.
- Support embedded C in compiler {code|print} commands.
- Add largely complete settings highlighting and folding.
- Add syntax tests (incomplete).
Thanks to Claudio Fleiner for many years of maintenance.
closes: vim/vim#10649b422a33ac2
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Problem: Code lenses currently display as virtual text on the same line
and after the relevant item. While the spec does not say how lenses
should be rendered, above the line is most typical. For longer lines,
lenses rendered as virtual text can run off the side of the screen.
Solution: Display lenses as virtual lines above the text.
Closes https://github.com/neovim/neovim/issues/33923
Co-authored-by: Yi Ming <ofseed@foxmail.com>
Problem: The following strchar functions have incorrect types:
strcharlen() - Currently any. Always returns an integer, including on
error
strcharpart() - The skipcc annotation does not specify that 0 and 1 are
valid. These inputs are required for vimscript usage. The current
return type is any, even though the function returns an empty string
on error
strchars() - The skipcc annotation does not specify that 0 and 1 are
valid
Solution: Update the problem types.
Problem: In eval.lua, setcharsearch() has an incorrect param type,
causing Lua_Ls to display an error when a valid table is passed.
While getcharsearch correctly states that it returns a table, the type
is non-specific about the contents.
Solution: Update eval.lua with the correct types.
The auto-refresh has a bit of a delay so it can happen that when a user
runs `codelens.run` it operates on an outdated state and either
does nothing, or fails.
This changes the logic for `.run` to always fetch the current lenses
before (optional) prompt and execution.
See discussion in https://github.com/neovim/neovim/pull/37689#discussion_r2764235931
This could potentially be optimized to first check if there's local
state with a version that matches the current buf-version, but in my
testing re-fetching them always was quickly enough that `run` still
feels instant and doing it this way simplifies the logic.
Side effect of the change is that `.run` also works if codelens aren't
enabled - for power users who know what the codelens would show that can
be useful.
Problem: Unlike `nvim_keymap_set`, `vim.keymap.set` uses the non-negated
`remap` instead of `:set`'s `noremap`, but the documentation for this
got lost sometime before Nvim 0.10.
Solution: Restore the lost documentation and make it more explicit.
Problem:
Users may be unaware that setting `g:clipboard` after providers are
initialized has no effect, and that `has('clipboard')` initializes
providers, as in #13062.
Solution:
Note the restriction and link to workarounds in FAQ for discoverability.
From the LSP Spec:
> There are two uses cases where it can be beneficial to only compute
> semantic tokens for a visible range:
>
> - for faster rendering of the tokens in the user interface when a user
> opens a file. In this use case, servers should also implement the
> textDocument/semanticTokens/full request as well to allow for flicker
> free scrolling and semantic coloring of a minimap.
> - if computing semantic tokens for a full document is too expensive,
> servers can only provide a range call. In this case, the client might
> not render a minimap correctly or might even decide to not show any
> semantic tokens at all.
This commit unifies the usage of range and full/delta requests as
recommended by the LSP spec and aligns neovim with the way other LSP
clients use these request types for semantic tokens.
When a server supports range requests, neovim will simultaneously send a
range request and a full/delta request when first opening a file, and
will continue to issue range requests until a full response is
processed. At that point, range requests cease and full (or delta)
requests are used going forward. The range request should allow servers
to return a result faster for quicker highlighting of the file while it
works on the potentially more expensive full result. If a server decides
the full result is too expensive, it can just error out that request,
and neovim will continue to use range requests.
This commit also fixes and cleans up some other things:
- gen_lsp: registrationMethod or registrationOptions imply dynamic
registration support
- move autocmd creation/deletion to on_attach/on_detach
- debounce requests due to server refresh notifications
- fix off by one issue in tokens_to_ranges() iteration
Problem:
Temporary files from /tmp/ and /private/ paths clutter :oldfiles list.
Additionally, the documented Windows default (rA:,rB:) was never applied
due to a missing platform condition.
Solution:
Drop platform-specific shada differences and default to excluding
/tmp/ and /private/ paths.
Problem:
Using vim.defer_fn() just before Nvim exit leaks luv handles.
Solution:
Make vim.schedule() return an error message if scheduling failed.
Make vim.defer_fn() close timer if vim.schedule() failed.
Problem: The behavior of vim.eval() with Vim special variables is not
clearly documented. It is (partly) the reason why Nvim
Python's vim.eval gives different output when evaluating
v:true and v:false
Solution: Document it (Phạm Bình An)
closes: vim/vim#191571e54023673
Problem:
- According to [pipx
documentation](https://pipx.pypa.io/stable/docs/#pipx-install), `pipx
install` doesn't have --upgrade argument. Running `pipx install
--upgrade pynvim` results in an error "unrecognized arguments:
--upgrade"
- In file if_pyth.txt:317, it says "Implementation is ... written in C".
This is not true for Nvim, since find_module logic of Nvim's Python
interface is implemented in Python.
(fdaae821a9/pynvim/plugin/script_host.py (L217))
- $NVIM_LISTEN_ADDRESS has been deprecated.
- `:Next` is a core command, not termdebug plugin command. Termdebug
uses `:Over` to send command `next` to gdb
Solution:
- Just use `pipx install pynvim`
Problem:
If `vim.lsp.enable()` fails with an error, either because `'*'` is one
of the provided names or because there is an error in a config,
`vim.lsp.enable()` will still have side-effects:
- All names before the one that encountered an error will still be added
to `lsp._enabled_configs`, but the autocommand will not get added or
run.
- Any name which makes `vim.lsp.config[name]` error will be added to
`lsp._enabled_configs`, causing all future calls to `vim.lsp.enable()`
to fail. This will also break `:che vim.lsp`.
Solution:
- Check all names for errors before modifying `lsp._enabled_configs`.
- Check `vim.lsp.config[name]` does not raise an error before enabling
the name.
* cache all tokens from various range requests for a given document
version
- all new token highlights are merged with previous highlights to
maintain order and the "marked" property
- this allows the tokens to stop flickering once they've loaded once
per document version
* abandon the processing coroutine if the request_id has changed instead
of relying only on the document version
- this will improve efficiency if a new range request is made while a
previous one was processing its result
* apply new highlights from processing coroutine directly to the current
result when the version hasn't changed
- this allows new highlights to be immediately drawable once they've
processed instead of waiting for the whole response to be processed
at once
* rpc layer was changed to provide the request ID back in success
callbacks, which is then provided as a request_id field on the handler
context to lsp handlers
Problem:
`:checkhealth` does not report when no `vim.ui.open()` handler is
available.
Solution:
Factor command resolution into `_get_open_cmd()` and reuse it from
`:checkhealth` to detect missing handlers.
Problem: Fast context for msg_show event inhibits vim.ui_attach from
displaying a stream of messages from a single command.
Solution: Remove fast context from msg_show events emitted as a result
of explicit API/command calls. The fast context was originally
introduced to prevent issues with internal messages.
Problem: `vim.pack.update()` doesn't update source's default branch if
it has changed on the remote. It can be done by executing
`git remote set-head origin --auto` for every plugin on every update,
but it feels like too much extra work (which requires Internet
connection) for a very rare use case.
This matters since `version = nil` will keep pointing to previous
default branch even after `vim.pack.update()`.
Solution: Document that in order for `version = nil` to point to the
source's new default branch, perform clean re-install.
Problem: terminal OSC52 support to access the clipboard can be improved
Solution: Include and package the optional osc52 package, note: this
requires a Vim with clipboard provider feature (Foxe Chen).
related: vim/vim#14995closes: vim/vim#1857502b8ec7da5
----
Nvim has incompatible implementation for OSC52 clipboard provider.
Vim9 is N/A.
Co-authored-by: Foxe Chen <chen.foxe@gmail.com>