Commit Graph

8713 Commits

Author SHA1 Message Date
Justin M. Keyes
9fa7c0a046 NVIM v0.11.5
Following is a list of commits (fixes/features only) in this release.
See `:help news` in Nvim for release notes.

FEATURES
--------------------------------------------------------------------------------
- 693772100e help: gx opens help tag in web browser (#35784)
- f9cad88d5a vimscript: log function name in "fast" message #32616

PERFORMANCE
--------------------------------------------------------------------------------
- 4c8486e1f2 scheduler priority clamping on macOS #35488
- 0f6a180bcc api: reduce redundant `win_find_tabpage` calls (#35643)

FIXES
--------------------------------------------------------------------------------
- 4e4428dee8 vim.lsp.omnifunc should not throw away other items #35346
- f2fb46ef9e api: nvim_open_win default to half-size for splits (#36088)
- 479bb9cbab api: nvim_open_win respects requested split window size (#35601)
- 5aa6257e8c api: win_set_config error message for splitting from a float #35650
- 66b8018b06 channel: closing socket with pending writes leaks memory (#36400)
- 3237f634fa cjson: fix `strbuf_set_length` incorrectness #35565
- 95cc67538b clipboard: avoid using stale register width (#36178)
- d31953d532 diagnostics: extend conversion support from/to quickfix format (#34006)
- 7304fc275e excmd: :trust executed even when inside false condition (#36032)
- 0e1c83fae2 filetype: handle invalid `bufnr` in _getlines(), _getline() #36272
- 86b2c0f201 float: crash from nasty :fclose autocmds (#36137)
- d8a7c86e73 health: errors in :checkhealth with pyenv-virtualenv #35865
- 8e00534b1e health: hard fail on invalid "python-*" bin #35382
- 2668a46902 lsp: "attempt to index nil config" #36189
- 21540d21ca lsp: _get_workspace_folders does not handle root_dir() function (#36141)
- 14e74d98fd lsp: misleading logs in non-applicable filetypes #35749
- a7eb110098 lsp: noisy log message when enabling server without config #36264
- eb4837206a lsp: restore Client:stop() force-stopping behavior (#35800)
- 556d8d0002 lsp: treat 2-triggers-at-once as "last char wins" #35435
- 7b1ac2080d lua: don't leak handle when vim._watch.watch() fails (#35768)
- c84ba83cf1 options: increase t_Co buffer size (#35859)
- 7aea000343 paste: don't use :echo immediately before :redraw (#35773)
- 47f6f21998 plines: count 'showbreak' in EOL inline virt_text in line size (#35921)
- 4338eea269 rpc: handle more cases when identifying loopback #36100
- d399ed310e socket: avoid stack-use-after-return after timeout (#36405)
- 4cc060bf44 statusline: redraw if Visual selection other end changes (#36281)
- 7f5427b857 terminal: add various missing redraws
- d78d5cf1aa terminal: adjust marks when deleting scrollback lines (#36294)
- f3f6705075 terminal: avoid events messing up topline of focused terminal
- 8c5bc4920a terminal: avoid tailed cursor in focused terminal in events
- 934d28558d terminal: check size when creating new tabpage
- e67fec1541 terminal: deleting from wrong buffer (#36289)
- e4db5edb8a terminal: don't trigger TextChangedT for unrelated redraws
- 854b319060 terminal: handle OSC 8 split into multiple fragments
- a6d8f40b64 terminal: keep last cursor if it's on the last row
- 46d68e5290 terminal: patch various autocommand-related holes
- 5ee9e3f258 terminal: possibly wrong wrow/wcol in active terminal
- b21ec366b9 terminal: remove condition that buf is curbuf (#33721)
- 2eea65fe68 terminal: update winopts and focus when switching terminals
- 169dc60a44 terminal: wrong row in TermRequest with full scrollback (#36298)
- 8f05fdbfb3 tests: ignore vector math types
- 924a8e4238 tui: don't wait for DA1 response when stdin is closed (#35745)
- 07184aa973 tui: handle sequence larger than entire buffer
- 1c8805e3b2 vim.json: fix truncation of decoded numbers outside lua_Integer's range #35702
- 8c311386c3 window: don't add a hsep when out of room if global stl is off

VIM PATCHES
--------------------------------------------------------------------------------
- dd79bc8360 014c731: runtime(doc): make :h virtcol() more accurate (#35976)
- c2a3838ab2 8.1.0636: line2byte() gives wrong values with text properties
- a0dac399d0 8.1.1681: insert stray "{" when listener gets buffer line
- d573ffcfc7 8.1.1700: listener callback called for the wrong buffer
- 7159a0192b 8.1.1711: listener callback called at the wrong moment
- b6dd8bbca0 8.1.2008: error for invalid range when using listener and undo
- 03f9df8117 8.2.0115: byte2line() does not work correctly with text properties
- d1a0d0889b 8.2.0844: text properties crossing lines not handled correctly
- 9b5545103e 8.2.0853: ml_delete() often called with FALSE argument
- c8912d7329 8.2.3348: line2byte() returns wrong value after adding textprop
- b0ed4a3cb8 8.2.3795: too many #ifdefs
- e4bbe09dcc 8.2.4379: an empty change is reported to a listener
- 5c6ea43da8 80981e1: runtime(doc): mention 'findfunc' at :h :find (#35697)
- 8634a46165 9.1.0689: [security]: buffer-overflow in do_search() with 'rightleft'
- a839200c0a 9.1.0695: tests: test_crash leaves Untitled file around
- 61aab4cfe0 9.1.0698: tests: "Untitled" file not removed when running Test_crash1_3 alone
- 85e4503f18 9.1.1754: :helptags doesn't skip examples with syntax
- 77fe01f200 9.1.1773: Crash in BufLeave after BufUnload closes other windows (#35830)
- 7e724dfa2f 9.1.1780: mbyte contains overlapping list of utf_classes table (#35869)
- 4db62d96bc 9.1.1798: Wrong display with 'sms' and long wrapped virt text at EOL (#35930)
- 9c09983068 9.1.1802: 'nowrap' in a modeline may hide malicious code (#35946)
- 67688ab616 9.1.1807: :set doesn't clear local insecure flag like :setlocal does
- 6dda8e9572 9.1.1808: Option insecure flags not copied when splitting window
- ac48d9c3c9 9.1.1823: diff: w_topline may be invalidated (#36018)
- e1fe0ed2df 9.1.1831: stray vseps in right-most 'winfixwidth' window
- d21c23b8c9 9.1.1836: 'culopt' "screenline" not redrawn with line("w0") and :retab
- aab8134f87 9.1.1839: Window may have wrong height if resized from another tabpage (#36093)
- ad172eb762 9.1.1858: v:register not reset after Visual mode command (#36215)
- a4319015ee 9.1.1868: v:register is wrong in v_: command (#36238)
- 8928ede8af 9.1.1870: :Tutor may not work as expected (#36343)
- 1b27d8f428 9.1.1871: Wrong 'showcmd' in the cmdwin (#36320)
- a2d4a0fda9 9.1.1885: Wrong restored cursor pos when re-entering buffer after changes
- 7790dca2eb 9.1.1891: g<End> does not move to last non-blank in visual mode (#36354)
- 88ff561dcc 9.1.1893: ICCF charity will dissolve (#36427)
- 19d58cb2cc a0f37db: runtime(doc): use a single pattern in :h 'incsearch' example (#35721)
- 8ed1ef1377 partial:9.0.0323: using common name in tests leads to flaky tests

CI
--------------------------------------------------------------------------------
- e415fae42e Windows arm64 packages #35345
2025-11-02 11:14:24 -05:00
zeertzjq
88ff561dcc vim-patch:9.1.1893: ICCF charity will dissolve (#36427)
Problem:  ICCF charity will dissolve
Solution: Update references to Kuwasha

Since the ICCF[1] will be dissolved and handing over to the Kuwasha charity
to continue supporting the Kibaale Children Center in Uganda, update the
uganda.txt help file.

[1]: https://groups.google.com/g/vim_announce/c/pUNbNXBLbKw/m/-zFUd4JjAQAJ

fixes: vim/vim#18584
closes: vim/vim#18667

0405665638

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-11-02 08:30:42 +08:00
varsidry
7790dca2eb vim-patch:9.1.1891: g<End> does not move to last non-blank in visual mode (#36354)
Problem:  In visual mode, g<End> does not move to the last non-blank
          character when the end of a line is on the same line as the
          cursor (after v9.0.1753)
Solution: Move the cursor back by one position if it lands after the
          line (varsidry)

fixes: vim/vim#18657
closes: vim/vim#18658

adc85151f3
(cherry picked from commit b92b95e2c2)
2025-11-01 02:08:42 +00:00
zeertzjq
8928ede8af vim-patch:9.1.1870: :Tutor may not work as expected (#36343)
Problem:  :Tutor may not work as expected
Solution: set buftype=nowrite instead of nofile
          (Phạm Bình An)

closes: vim/vim#18613

9978bb77c6

Co-authored-by: Phạm Bình An <phambinhanctb2004@gmail.com>
(cherry picked from commit fb6fd17f26)
2025-10-27 01:52:29 +00:00
zeertzjq
d78d5cf1aa fix(terminal): adjust marks when deleting scrollback lines (#36294)
This also fixes inconsistent scrolling behavior on terminal output when
cursor is in the middle of the buffer and the scrollback is full.
2025-10-25 07:09:10 +08:00
xvzc
0e1c83fae2 fix(filetype): handle invalid bufnr in _getlines(), _getline() #36272
**Problem:**
`vim.filetype.match({ filename = 'a.sh' })` returns `nil` because
an invalid buffer ID is passed to `vim.api.nvim_buf_get_lines()`.
For filetypes like `csh`, `txt`, or any other extensions that call
`_getlines()` or `_getline()` to detect their filetypes, the same
issue occurs.

When only the `filename` argument is passed, an error is raised
inside a `pcall()` that wraps the filetype detection function,
causing it to return no value without showing any error message.

**Solution:**
Validate the `bufnr` value in `_getlines()` and `_getline()`.

(cherry picked from commit 095b9f98f3)
2025-10-24 01:14:30 +00:00
zeertzjq
169dc60a44 fix(terminal): wrong row in TermRequest with full scrollback (#36298)
Problem:  Wrong row in TermRequest with full scrollback.
Solution: Subtract by the number of lines deleted from scrollback.
(cherry picked from commit 67832710a5)
2025-10-23 22:33:16 +00:00
Robert
a215da823f docs(vimfn): getcwd() behavior #36222
(cherry picked from commit cf48741227)
2025-10-21 22:29:34 +00:00
Riley Bruins
a7eb110098 fix(lsp): noisy log message when enabling server without config #36264
This warning doesn't really make sense, since the `enable()` call is
meant to be run before the `lsp.config` calls. It will be logged many
times (once for each enabled LSP) at startup.

This is especially annoying because calling `enable()` after
configuration causes the first opened buffer not to have its filetype
set in some situations. This is a separate bug which really needs to be
fixed, and makes this superfluous logging more likely.

(cherry picked from commit 3c4acc0f1a)
2025-10-21 14:49:44 +00:00
Justin M. Keyes
f93747ee3a revert "fix(lsp): _get_workspace_folders does not handle root_dir() function"
This reverts commit 21540d21ca.
2025-10-14 22:31:49 -04:00
Justin M. Keyes
2668a46902 fix(lsp): "attempt to index nil config" #36189
Problem:
If a client doesn't have a config then an error may be thrown.
Probably caused by: 2f78ff816b

    Lua callback: …/lsp.lua:442: attempt to index local 'config' (a nil value)
    stack traceback:
            …/lsp.lua:442: in function 'can_start'
            …/lsp.lua:479: in function 'lsp_enable_callback'
            …/lsp.lua:566: in function <…/lsp.lua:565>

Solution:
Not all clients necessarily have configs.
- Handle `config=nil` in `can_start`.
- If user "enables" an invalid name that happens to match a *client*
  name, don't auto-detach the client.

(cherry picked from commit bf4710d8c3)
2025-10-15 01:15:13 +00:00
Justin M. Keyes
21540d21ca fix(lsp): _get_workspace_folders does not handle root_dir() function (#36141)
backport #36071

* fix(lsp): type of root_dir should be annotated with string|fun|nil
* feat(lsp): support root_dir as function in _get_workspace_folders
* feat(lsp): let checkhealth support root_dir() function

Examples:

    vim.lsp: Active Clients ~
    - lua_ls (id: 1)
      - Version: <Unknown>
      - Root directories:
          ~/foo/bar
          ~/dev/neovim

Co-authored-by: atusy <30277794+atusy@users.noreply.github.com>
2025-10-12 01:25:54 +00:00
Till Bungert
4e4428dee8 fix: vim.lsp.omnifunc should not throw away other items #35346
(cherry picked from commit 28157738e3)
2025-10-11 20:03:40 +00:00
zeertzjq
7304fc275e fix(excmd): :trust executed even when inside false condition (#36032)
Problem:  :trust is executed even when inside false condition.
Solution: Make skip_cmd() return true for CMD_trust, as ex_trust() does
          not handle eap->skip itself.
(cherry picked from commit 2f35221774)
2025-10-05 03:00:48 +00:00
zeertzjq
dd79bc8360 vim-patch:014c731: runtime(doc): make :h virtcol() more accurate (#35976)
The current description (especially the "unlimited width" part) is
inaccurate in several ways:
- The size of virtual text can depend on window width. In particular,
  the size of "above" virtual text can be equal to window width.
- A double-width character that doesn't fit adds 1 to the virtual column
  of the following characters.
- The size of 'showbreak' and 'breakindent' is counted.

related: vim/vim#5713
closes: vim/vim#18447

014c731fa5
(cherry picked from commit 43f7434bd5)
2025-10-02 00:07:28 +00:00
zeertzjq
9c09983068 vim-patch:9.1.1802: 'nowrap' in a modeline may hide malicious code (#35946)
Problem:  'nowrap' in a modeline may hide malicious code.
Solution: Forcibly use '>' as 'listchars' "extends" if 'nowrap' was set
          from a modeline (zeertzjq).

Manual `:setlocal nowrap` disables this behavior.  There is a separate
problem with `:set nowrap` that also applies to some other options.

related: vim/vim#18214
related: vim/vim#18399
closes: vim/vim#18425

9d5208a931

Cherry-pick some test_modeline.vim changes from patches 9.0.{0363,0626}.

(cherry picked from commit 0fa0717d4e)
2025-09-30 00:22:52 +00:00
SkrrtBacharach
d8a7c86e73 fix(health): errors in :checkhealth with pyenv-virtualenv #35865
Problem:
pyenv-virtualenv sets a different path for VIRTUAL_ENV than the path to the
python binary it provides, but these paths both symlink to the same file, so
there should be no disparity. The python health-check reports an error, since it
only checks if these paths are equal, not where they point to (resolve to).

Solution:
- Resolve the python symlinks before checking if they are equal.
- Deduplicate some code.

(cherry picked from commit cfe10b4014)
2025-09-21 22:06:55 +00:00
Judit Novak
8e00534b1e fix(health): hard fail on invalid "python-*" bin #35382
Problem:
Scripts named with 'python-…' prefix may not be valid python bins. If
such a script is found in a venv, the Python healthcheck fails hard.

    .venv/python-argcomplete-check-easy-install-script
    .venv/bin/python3.13
    .venv/bin/python

Solution:
- Discard known false-positives such as `python-argcomplete*`.
- Call `health.warn()` instead of `assert()` in `python_exepath()`.

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
(cherry picked from commit 6152bcf42e)
2025-09-19 03:50:52 +00:00
Tomasz N
556d8d0002 fix(lsp): treat 2-triggers-at-once as "last char wins" #35435
Problem:
If there are 2 language servers with different trigger chars (`-` and
`>`), and a keymap inputs both simultaneously (`->`), then `>` doesn't
trigger. We get completion items from server1 only.

This happens because the `completion_timer` for the `-` trigger is still
pending.

Solution:
If the next character arrived enough quickly (< 25 ms), replace the
existing deferred autotrigger with a new one that matches this later
character.

(cherry picked from commit e69b81ad94)
2025-09-17 23:52:30 +00:00
zeertzjq
eb4837206a fix(lsp): restore Client:stop() force-stopping behavior (#35800)
This fixes a regression from #33796.

I tried for several hours and cannot write a working test for this, but
this does fix the following warning in tests run with ASAN or TSAN:

    -------- Running tests from test/functional/plugin/lsp_spec.lua
    RUN      T4667 LSP server_name specified start_client(), stop_client(): 114.00 ms OK
    RUN      T4668 LSP server_name specified stop_client() also works on client objects: 97.00 ms OK
    RUN      T4669 LSP server_name specified does not reuse an already-stopping client #33616: 31.00 ms OK
    nvim took 2022 milliseconds to exit after last test
    This indicates a likely problem with the test even if it passed!

(cherry picked from commit 4ef5624729)
2025-09-17 02:02:44 +00:00
Justin M. Keyes
693772100e feat(help): gx opens help tag in web browser (#35784)
Problem:
`gx` does not work on tags in help buffers to open the documentation of that tag in the browser.

Solution:
Get the `optionlink`, `taglink` and `tag` TS nodes and set extmark "url" property.
`gx` then discovers the extmark "url" and opens it.

Co-authored-by: Yochem van Rosmalen <git@yochem.nl>
2025-09-15 23:30:31 +00:00
zeertzjq
7aea000343 fix(paste): don't use :echo immediately before :redraw (#35773)
- If tick == 0 at the last chunk, the first :echo will print an empty
  string, which isn't really helpful, and may cause :redraw to move
  cursor to the message area for 'showmode'.
- If tick > 0 at the last chunk, there'll be another :echo that prints
  an empty string immediately after the :redraw.

(cherry picked from commit a5d6932686)
2025-09-15 22:42:43 +00:00
zeertzjq
7b1ac2080d fix(lua): don't leak handle when vim._watch.watch() fails (#35768)
This fixes the following warning in tests with ASAN or TSAN:

    -------- Running tests from test/functional/lua/watch_spec.lua
    RUN      T4253 vim._watch watch() ignores nonexistent paths: 29.00 ms OK
    nvim took 2006 milliseconds to exit after last test
    This indicates a likely problem with the test even if it passed!
2025-09-15 11:26:27 +08:00
Justin M. Keyes
14e74d98fd fix(lsp): misleading logs in non-applicable filetypes #35749
Problem:
LSP logs show misleading "cannot start" messages when editing a filetype
NOT listed in the `config.filetypes` field.

    [ERROR][2025-09-13 18:55:56] …/runtime//lua/vim/lsp/log.lua:151
    "cannot start cssls due to config error: …/runtime//lua/vim/lsp.lua:423:
    cmd: expected expected function or table with executable command,
    got table: 0x0104701b18. Info: vscode-css-language-server is not executable"

Solution:
- `can_start`: check `config.filetypes` before checking the rest of the
  config.

(cherry picked from commit 2f78ff816b)
2025-09-14 02:25:43 +00:00
zeertzjq
19d58cb2cc vim-patch:a0f37db: runtime(doc): use a single pattern in :h 'incsearch' example (#35721)
related: https://github.com/vim/vim/pull/18262#issuecomment-3277008408
closes: vim/vim#18270

a0f37dbbf4
(cherry picked from commit c06f0970b0)
2025-09-11 23:51:45 +00:00
zeertzjq
5c6ea43da8 vim-patch:80981e1: runtime(doc): mention 'findfunc' at :h :find (#35697)
fixes: vim/vim#18250
related: vim/vim#18253

80981e1db9

Co-authored-by: Girish Palya <girishji@gmail.com>
(cherry picked from commit 739fc26d77)
2025-09-09 23:51:42 +00:00
Justin M. Keyes
3d13807b8d docs: backport (#35675)
docs: lsp, misc
2025-09-08 02:49:21 +00:00
Evgeni Chasnovski
7875a39ba0 docs: adjust *lua-plugin-init* wording #35600
Problem: Unnecessarily anecdotal wording.

Solution: Adjust wording while delivering the same message.
(cherry picked from commit 0c49167490)
2025-09-08 01:33:56 +00:00
Mike
d31953d532 fix(diagnostics): extend conversion support from/to quickfix format (#34006)
Use uppercase to check severity
Mark quickfix items as valid when converting from diagnostics
Support nr/code attribute between formats

(cherry picked from commit e4a100a1e1)
2025-09-02 15:47:15 +00:00
Justin M. Keyes
dd8e3d7aa5 docs: Lua plugin development guide
(cherry picked from commit a5e7ccc329)
2025-09-01 21:56:58 -04:00
Marc Jakobi
a7491e1457 docs: Lua plugin development guide
(cherry picked from commit 28ab656122)
2025-09-01 23:53:57 +00:00
Justin M. Keyes
cec0ecabd8 NVIM v0.11.4
See runtime/doc/news.txt (or `:help news` in Nvim).

Following is a list of fix/feature commits in this release.

FEATURES
--------------------------------------------------------------------------------
- 5551da79c1 lsp: improve signature help display #35190
- abfbd155da provider: detect venv python via "pynvim-python" tool #35273

BUILD
--------------------------------------------------------------------------------
- 3343ee971b deps: CMake generation fails when path contains spaces #35332

FIXES
--------------------------------------------------------------------------------
- 27282696fe api: fix not capturing output in cmdline mode (#35322)
- 09b0003d38 api: nvim_create_user_command addr option should allow ranges #35077
- 3ab06d5188 api: on_detach consistently before buf_freeall autocmds (#35369)
- 53db7fc3ef api,lsp: call on_detach before wiping out the buffer #35367
- 30b801eff2 checkhealth: wrong ABI version for treesitter parsers #35327
- a05b70baa6 clipboard: correct blockwise register width computation (#35038)
- 990b320592 cmdline: :checkhealth completion with multiple args (#35060)
- a3590afba5 diff: set default diff flags properly (#35450)
- f4b4c27a35 float: cursor visible in "hidden" floating window (#35219)
- 3cf9dac2ba folds: error when deleting lines at end of buffer #35396
- d70d469c04 health: accept TERM=tmux-direct #35511
- edfb447ff8 health: update advice for Python #35564
- 359d65c902 iter: ArrayIter:last returns nil when filtered to empty #34697
- 44b8255fa2 lsp: close floating preview window correctly #34946
- 6b820258cd lsp: don't override `config.title` in `vim.lsp.buf.signature_help()` #35075
- 8f2d6f7ce2 lsp: show title when global winborder is set (#35181)
- 1bea812953 lsp: update window title when cycling through signatures #35407
- 9261aef2f3 lsp/health: always use vim.inspect to show root_markers (#34667)
- d185057bc7 lsp/health: ensure valid table before concatenating (#34930)
- 09f702bc13 lua: report error in Lua Funcref callback properly (#35555)
- 7f1e112a32 pum: check for cmdline mode properly
- 41fa343484 snippet: jumping backwards to choice node (#35062)
- 2e4baa3679 snippet: setting end_right_gravity (#35061)
- 4b957a4d18 treesitter: inconsistent highlight of multiline combined injection #35307
- fa64f2d09b treesitter: run FileType autocmds in the context of `<abuf>`
- e841d653af treesitter: show capture-level priorities in :Inspect #35443
- e299430ff5 tui: do not remove SIGWINCH handler when resize events are enabled (#35221) (#35238)
- 64afa93187 tutor: use `invalidate` field in `nvim_buf_set_extmark()`
- 2124146164 tutor: use legacy syntax for lesson 3.1 of vim-01-beginner.tutor
- 6fd842a4fd ui: check for cmdline mode properly

VIM PATCHES
--------------------------------------------------------------------------------
- e68d3ef886 5ddcecf: runtime(help): Add better support for language annotation highlighting
- 35a66f74c7 6fea0a5: runtime(help): Add Vim lang annotation support for codeblocks
- 819e545c28 714671d: runtime(misc): use :hor :term to ensure new term window is split horizontally (#35064)
- a65c4be2de 8.1.0425: ml_get error and crash with appendbufline()
- 8dd88056f1 8.2.1672: v_lock is used when it is not initialized (#35416)
- 6c2f06b537 9.1.0748: :keep* commmands are sometimes misidentified as :k
- 54c2ea142a 9.1.1599: :bnext doesn't go to unlisted help buffers (#35216)
- 53a0d99702 9.1.1601: Patch v8.1.0425 was wrong
- ced4eed733 9.1.1607: :apple command detected as :append (#35237)
- bd4b45dd1b 9.1.1608: No command-line completion for :unsilent {command}
- d21db345ef 9.1.1611: possible undefined behaviour in mb_decompose() (#35275)
- 744d96bd76 9.1.1612: Ctrl-G/Ctrl-T do not ignore the end search delimiter
- 5ec7d98857 9.1.1613: tests: test_search leaves a few swapfiles behind
- 39ae9a9971 9.1.1633: Search pattern shown incorrectly with negative offset (#35337)
- e6ea97a691 9.1.1665: Outdated comment in eval.c (#35436)
- 6fd8ba05a6 9.1.1667: Another outdated comment in eval.c (#35438)
- 4c5cb950c6 9.1.1688: potential buffer overrun in bufwrite.c (#35497)
- 99817471d7 9.1.1700: Multiline ignorecase specific pattern does not match with 'ignorecase' (#35520)
- fb6c677d57 b9ea0a8: runtime(doc): tweak documentation style in helphelp.txt
2025-08-31 15:25:45 -04:00
Michael Henry
edfb447ff8 fix(health): update advice for Python #35564
Problem: `:checkhealth` advice for Python is out-of-date.

Solution: Update the advice to point to `:help provider-python`.
(cherry picked from commit f311c96973)
2025-08-31 18:51:33 +00:00
glepnir
c4845f3a12 docs(lsp): mention lsp/after/ in faq #35534
(cherry picked from commit 1b3abfa688)
2025-08-30 22:56:57 +00:00
zeertzjq
a2603016ce Merge pull request #35546 from zeertzjq/vim-a07a2f4
vim-patch:a07a2f4: runtime(astro): catch json_decode() error when parsing tsconfig.json
(cherry picked from commit 8a2587be23)
2025-08-30 00:55:38 +00:00
Meriel Luna Mittelbach
d70d469c04 fix(health): accept TERM=tmux-direct #35511
tmux-direct is functionally the same as tmux-256color, except it
directly reports 24-bit color and how to set them (setaf/setab)
via ncurses 6.x's extended terminfo format.

(cherry picked from commit a33284c2c0)
2025-08-28 04:25:15 +00:00
Riley Bruins
e841d653af fix(treesitter): show capture-level priorities in :Inspect #35443
(cherry picked from commit 29c5559ce1)
2025-08-23 23:18:41 +00:00
Tiago Inaba
1bea812953 fix(lsp): update window title when cycling through signatures #35407
(cherry picked from commit 848c7a7894)
2025-08-21 00:51:35 +00:00
Sean Dewar
fa64f2d09b fix(treesitter): run FileType autocmds in the context of <abuf>
Problem: many FileType autocommands assume curbuf is the same as the target
buffer; this can cause &syntax to be restored for the wrong buffer in some cases
when TSHighlighter:destroy is called.

Solution: run nvim_exec_autocmds in the context of the target buffer via
nvim_buf_call.

(cherry picked from commit 3ec63cdab8)
2025-08-19 19:52:41 +00:00
Michael Henry
abfbd155da feat(provider): detect venv python via "pynvim-python" tool #35273
Problem:
Detection of the pynvim module is currently done by finding the first
Python interpreter in the `PATH` and checking if it can import pynvim.
This has several problems:
- Activation of an unrelated Python virtual environment will break
  automatic detection, unless pynvim is also installed in that
  environment.
- Installing pynvim to the expected location is difficult. User
  installation into the system-wide or user-wide Python site area is now
  deprecated.  On Ubuntu 24.04 with Python 3.12, for example, the
  command `pip install --user pynvim` now fails with the error message
  `error: externally-managed-environment`.
- Users may create a dedicated virtual environment in which to install
  pynvim, but Nvim won't detect it; instead, they must either activate
  it before launching Nvim (which interferes with the user of other
  virtual environments) or else hard-code the variable
  `g:python3_host_prog` in their `init.vim` to the path of the correct
  Python interpreter.  Neither option is desirable.

Solution:
Expose pynvim's Python interpreter on the `PATH` under the
name `pynvim-python`.  Typical user-flow:

1. User installs either uv or pipx.
2. User installs pynvim via:
   ```
   uv tool install --upgrade pynvim
   # Or:
   pipx install --upgrade pynvim
   ```

With corresponding changes in pynvim https://github.com/neovim/pynvim/issues/593
the above user-flow is all that's needed for Nvim to detect the
installed location of pynvim, even if an unrelated Python virtual
environments is activated.  It uses standard Python tooling to automate
the necessary creation of a Python virtual environment for pyenv and the
publication of `pynvim-python` to a directory on `PATH`.

(cherry picked from commit 5f8d4a248a)
2025-08-16 22:32:55 +00:00
Jalil David Salamé Messina
30b801eff2 fix(checkhealth): wrong ABI version for treesitter parsers #35327
Don't print ABI version of duplicated parsers that are later in the
runtime path (see [#35326]).

Change the sorting from `name > path` to `name > rtpath_index`, this
ensures the first (loaded) parser is first in the list and any
subsequent parsers can be considered "not loaded".

This is fuzzy at best since `vim.treesitter.language.add` can take a
path to a parser and change the load order.

The correct solution is for `vim.treesitter.language.inspect` to return
the parser path so we can compare against it and/or for it to also be
able to take a path to a parser so we can inspect it without loading it
first.

(cherry picked from commit bd45e2be63)
2025-08-14 19:19:01 +00:00
Steven Xu
4b957a4d18 fix(treesitter): inconsistent highlight of multiline combined injection #35307
Problem:
Combined injections not entirely highlighted.

Solution:
Reapply layer highlights on each line.

Co-authored-by: Artem <vanaigranov@gmail.com>
2025-08-12 14:14:29 -07:00
zeertzjq
819e545c28 vim-patch:714671d: runtime(misc): use :hor :term to ensure new term window is split horizontally (#35064)
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#17822

714671de35

Co-authored-by: phanium <91544758+phanen@users.noreply.github.com>
(cherry picked from commit 1f7432a272)
2025-08-10 23:17:58 +00:00
brianhuster
fb6c677d57 vim-patch:b9ea0a8: runtime(doc): tweak documentation style in helphelp.txt
closes: vim/vim#16302

b9ea0a89fa

Co-authored-by: h-east <h.east.727@gmail.com>

I removed some parts that are not applicable to Nvim, like HelpTOC

(cherry picked from commit 7082367b3a)
2025-08-08 23:37:28 +00:00
brianhuster
e68d3ef886 vim-patch:5ddcecf: runtime(help): Add better support for language annotation highlighting
closes: vim/vim#16238

5ddcecf05f

Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: h_east <h.east.727@gmail.com>
(cherry picked from commit 60b866049c)
2025-08-08 23:37:28 +00:00
brianhuster
35a66f74c7 vim-patch:6fea0a5: runtime(help): Add Vim lang annotation support for codeblocks
closes: vim/vim#16215

6fea0a5480

Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
(cherry picked from commit 11ae879ebd)
2025-08-08 23:37:28 +00:00
neovim-backports[bot]
f4b4c27a35 fix(float): cursor visible in "hidden" floating window (#35219)
Problem:
Cursor is visible in "hidden" floating window.

Solution:
Hide cursor when curwin is a hidden floating window.
Show cursor after returning to a normal (non-hidden) window.

(cherry picked from commit d4f2b9050d)

Co-authored-by: glepnir <glephunter@gmail.com>
2025-08-07 16:18:32 +00:00
skewb1k
5551da79c1 feat(lsp): improve signature help display #35190
- Add delimiter between function signature and documentation, matching hover formatting
- Show title only if there are multiple clients or multiple signatures
- Avoid duplicating the title inside the window if it's already shown in the border

(cherry picked from commit d26db4bfbf)
2025-08-07 03:29:04 +00:00
glepnir
8f2d6f7ce2 fix(lsp): show title when global winborder is set (#35181)
Problem: make_floating_popup_options only shows when opts.border is explicitly set, ignoring global winborder setting

Solution: check both opts.border and vim.o.winborder when determining whether to show title
(cherry picked from commit 5b1b46ea5a)
2025-08-07 03:01:03 +00:00
TheBlob42
41fa343484 fix(snippet): jumping backwards to choice node (#35062)
Avoid duplicate text when jumping back to a choice node. Set cursor to
end of tabstop range and prioritize current choice in completion items.

(cherry picked from commit 628d569a59)
2025-07-28 00:35:42 +00:00