34872 Commits

Author SHA1 Message Date
Christian Clason
067b5743f5 vim-patch:9.1.2043: filetype: kos files are not reconized
Problem:  filetype: kos files are not reconized
Solution: Detect *.kos files as kos filetype
          (Chris Dragan)

Reference:
- https://github.com/kos-lang/kos

closes: vim/vim#19056

96a1caac6b

Co-authored-by: Chris Dragan <chris@dragan.dev>
2026-01-02 16:31:32 +01:00
Francisco Giordano
612cd99a00 fix(api): buffer overflow in nvim_buf_get_extmarks overlap #37184
With `overlap=true`, more extmarks than the requested limit may be
collected in `extmark_get`. This then leads to an out of bounds write of
`rv` in `nvim_buf_get_extmarks`.
2026-01-02 02:17:57 -05:00
Olivia Kinnear
a03ab03a10 fix(lsp): :lsp restart restarts on client exit #37125
Problem:
`:lsp restart` detects when a client has exited by using the `LspDetach`
autocommand. This works correctly in common cases, but breaks when
restarting a client which is not attached to any buffer. It also breaks
if a client is detached in between `:lsp restart` and the actual
stopping of the client.

Solution:
Move restart logic into `vim/lsp/client.lua`, so it can hook in to
`_on_exit()`. The public `on_exit` callback cannot be used for this, as
`:lsp restart` needs to ensure the restart only happens once, even if
the command is run multiple times on the same client.
2026-01-02 01:58:10 -05:00
Kira Kawai
3ac76977bc fix(diagnostic): check for extmark in get_logical_pos #37127
Problem: The function get_logical_pos did not account for the possibility that a diagnostic might not have an associated extmark, leading to potential errors or incorrect behavior.

Solution: Add a check for diagnostic._extmark_id and return the logical positions directly if it does not exist.
2026-01-02 01:49:28 -05:00
Tristan Knight
ed562c296a fix(lsp): improve dynamic registration handling #37161
Work on #37166 

- Dynamic Registration Tracking via Provider
- Supports_Method
    - Multiple Registrations
    - RegistrationOptions may dictate support for a method
2026-01-02 01:46:13 -05:00
github-actions[bot]
a3c56d1002 docs: update version.c #37169
vim-patch:9.0.0993: display errors when adding or removing text property type
vim-patch:7a6d9454c README.md: remove the warp ad again
vim-patch:9.1.2032: Vim9: error when using class member in Lambda
vim-patch:9.1.2036: if_ruby: build error with ruby 4.0
2026-01-02 00:27:35 -05:00
zeertzjq
acc3554439 vim-patch:9.1.2037: undo: cursor position not correctly restored (#37195)
Problem:  undo: cursor position not correctly restored
Solution: Do not override the saved cursor position (altermo)

closes: vim/vim#19052

a722da29c1

Co-authored-by: altermo <107814000+altermo@users.noreply.github.com>
nightly
2026-01-02 08:21:55 +08:00
zeertzjq
94f7302e66 vim-patch:9.1.0893: No test that undofile format does not regress (#37193)
Problem:  No test that undofile format does not regress
Solution: include a sample undofile to make sure we are always able to
          read it

This is so, that we don't unintentionally change the undofile format and
make sure we can load an undo file that has been created by an older
Vim.

closes: vim/vim#16127

14382c8bc9

Convert the undo file in samples/ using method from #13973.

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-01 23:05:48 +00:00
zeertzjq
ab20681c52 vim-patch:62d8f3d: runtime: Revert several "mark invalid contact addresses" commits (#37192)
This reverts commits:
- 6b652a785033fd4164e049492a7327c1ed7c3e5f
- 2f689d5abde0ccddca9e20d8c93a0299bd054e32
- a025a46d4169587145fb54f04af349cd05cb6122

Several email addresses that are known to be valid caused bounces
due to an issue with my email setup. The previous commits incorrectly
marked these addresses as invalid. So revert the whole thing again.

62d8f3dab5

N/A patch:
vim-patch:2f689d5: runtime: mark more invalid email addresses

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-02 06:53:44 +08:00
zeertzjq
1c96140b1a Merge pull request #37164 from janlazo/vim-8.2.2198
vim-patch:8.2.{2198,3159}
2026-01-01 15:19:12 +08:00
Jan Edmund Lazo
b480b0cd5d vim-patch:8.2.3159: cursor displayed in wrong position after deleting line
Problem:    Cursor displayed in wrong position after deleting line.
Solution:   When deleting lines do not approximate botline. (fixes vim/vim#8559)

5bea41dea3

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-01-01 01:58:02 -05:00
Jan Edmund Lazo
ff8edbaa6c vim-patch:8.2.2198: ml_get error when resizing window and using text property
Problem:    ml_get error when resizing window and using text property.
Solution:   Validate botline of the right window. (closes vim/vim#7528)

23999d799c

Migrate to Vim's (in)validate_botline_win() API.
Nvim wants to pass "curwin" instead of hiding them
behind alias/macro/inline-function.

https://github.com/neovim/neovim/pull/37164#discussion_r2655006908

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-01-01 01:48:49 -05:00
zeertzjq
0f9aae20ec Merge pull request #37188 from zeertzjq/vim-6b652a7
vim-patch: runtime file updates
2026-01-01 08:42:32 +08:00
zeertzjq
cabefb52ff vim-patch:a025a46: runtime: mark more invalid email addresses
a025a46d41

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-01 08:23:03 +08:00
zeertzjq
65e7aa9255 vim-patch:partial:2f689d5: runtime: mark more invalid email addresses
2f689d5abd

Skip colors/ and syntax/help_ru.vim: missing previous changes.

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-01 08:17:57 +08:00
zeertzjq
5fb1ac8cb6 vim-patch:6b652a7: runtime: mark invalid contact addresses
6b652a7850

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-01 08:01:52 +08:00
altermo
170992c8d2 test(tohtml): test syntax, not just treesitter #37181 2025-12-31 18:00:05 -05:00
Christian Clason
f3ee2440c7 build(deps): bump tree-sitter-lua to v0.4.1 2025-12-31 16:49:24 +01:00
zeertzjq
bd10f781b8 vim-patch:9.1.2035: filetype: filetype: Fennel fnlm files are not recognized (#37178)
Problem:  filetype: Fennel fnlm files are not recognized
          (Alexei Mozaidze, after v9.1.2034)
Solution: Detect *.fnlm files as fennel filetype, revert detecting
          *.fnml files

related: vim/vim#19047

ea189a6f4d

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-31 20:25:19 +08:00
zeertzjq
dddb125b0b vim-patch:5c2b594: runtime(rust): Update indentation after nested array literal (#37177)
fixes:  vim/vim#18974
closes: vim/vim#19042

5c2b594d0e

Co-authored-by: Brian Carbone <brian@briancarbone.com>
2025-12-31 10:53:06 +00:00
zeertzjq
8e80e54478 vim-patch:9.1.2034: filetype: Fennel fnml files are not recognized (#37176)
Problem:  filetype: Fennel fnml files are not recognized
          (Alexei Mozaidze)
Solution: Detect *.fnml files as fennel filetype

Reference:
- https://fennel-lang.org/changelog#160--2025-10-13

fixes: vim/vim#19047

9c87af5c3c

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-31 10:39:50 +00:00
Christian Clason
f4f60f6a19 build(deps): bump utf8proc to v2.11.3 2025-12-30 18:28:31 +01:00
Peter Cardenas
f8ac713448 fix(treesitter): use metadata in :EditQuery captures #37116
Problem:
When the `#offset!` directive is used with `:EditQuery`, the query does not take the offset into consideration when creating the extmark to preview the capture.

Solution:
Use the capture metadata to modify the node range before creating the extmark.
2025-12-30 10:44:18 -05:00
Justin M. Keyes
b24522e77b Merge #37113 from echasnovski/pack-better-revert 2025-12-30 10:40:19 -05:00
glepnir
9833f0da5f fix(diagnostic): unstable sorting by severity #37154
Problem: random order for same-severity diagnostics, severity_sort reversed.

Solution: add stable comparison with _extmark_id tiebreaker.
2025-12-30 04:28:32 -05:00
Justin M. Keyes
ea3562d739 Merge #37142 from echasnovski/pack-safer-del 2025-12-30 04:20:33 -05:00
Phạm Bình An
f8d0190491 docs(prompt): Lua example, adjust for multiline input #37121 2025-12-30 03:57:35 -05:00
Justin M. Keyes
10b610bbd9 Merge #36870 from justinmk/luacore 2025-12-30 02:11:00 -05:00
github-actions[bot]
b97db3f8b7 docs: update version.c #37105
vim-patch:9.1.2018: proto: ops.pro outdated
vim-patch:08aaa7ae1 runtime(doc): remove some fixed items from todo.txt
vim-patch:ea2b98b9e runtime(indent-tests): Include a simple Rust indent test
vim-patch:9.1.2031: Makefile: cannot run make installinks twice

vim-patch:8.2.0827: Vim9: crash in :defcompile
vim-patch:8.2.1643: Vim9: :defcompile compiles dead functions
vim-patch:8.2.1750: popup_setoptions() setting firstline fails if cursorline set
vim-patch:8.2.4947: text properties not adjusted when accepting spell suggestion
vim-patch:8.2.4989: cannot specify a function name for :defcompile
vim-patch:8.2.4990: memory leak when :defcompile fails

vim-patch:9.0.0147: cursor positioned wrong after two "below" text properties
vim-patch:9.0.0168: cursor positioned wrong with two virtual text properties
vim-patch:9.0.0233: removing multiple text properties takes many calls
vim-patch:9.0.0243: text properties "below" sort differently on MS-Windows
vim-patch:9.0.0464: with virtual text "above" indenting doesn't work well
vim-patch:9.0.0466: virtual text wrong after adding line break after line

vim-patch:9.1.0020: Vim9: cannot compile all methods in a class
vim-patch:9.1.0189: Memory leak with "above" virttext and 'relativenumber'
vim-patch:9.1.1654: build failure when FEAT_DIFF is not defined
vim-patch:9.1.1925: make depend does not include osdef.h
2025-12-30 02:07:11 -05:00
Jason Shipman
825e182139 fix(vim.fs): avoid fn.fnamemodify in fs.root #37162
Problem: vim.fs.root uses vim.fn.fnamemodify. vim.fn table isn't
available from nvim -ll or thread contexts.

Solution: Swap out vim.fn.fnamemodify for vim.fs.abspath.

This is a temporary workaround and may be reverted since the
long-term plan is to use more fast=true "fn" functions from vim.fs
where possible.
2025-12-30 01:57:06 -05:00
Justin M. Keyes
1d70c96e5b build: move shared.lua to _core/ 2025-12-30 01:44:52 -05:00
Justin M. Keyes
20e77c5d88 build: ship "_core/*" as bytecode (built-into Nvim binary)
Problem:
We want to encourage implementing core features in Lua instead of C, but
it's clumsy because:
- Core Lua code (built into `nvim` so it is available even if VIMRUNTIME
  is missing/invalid) requires manually updating CMakeLists.txt, or
  stuffing it into `_editor.lua`.
- Core Lua modules are not organized similar to C modules, `_editor.lua`
  is getting too big.

Solution:
- Introduce `_core/` where core Lua code can live. All Lua modules added
  there will automatically be included as bytecode in the `nvim` binary.
- Move these core modules into `_core/*`:
  ```
  _defaults.lua
  _editor.lua
  _options.lua
  _system.lua
  shared.lua
  ```

TODO:
- Move `_extui/ => _core/ui2/`
2025-12-30 01:44:24 -05:00
Kyle
03377b9552 feat(terminal): include sequence terminator in TermRequest event (#37152)
Problem:
Terminals should respond with the terminator (either BEL or ST) used in
the query so that clients can reliably parse the responses. The
`TermRequest` autocmd used to handle background color requests in the
terminal does not have access to the original sequence terminator, so it
always uses BEL. #37018

Solution:
Update vterm parsing to include the terminator type, then forward this
data into the emitted `TermRequest` events for OSC/DCS/APC sequences.
Update the foreground/background `TermRequest` callback to use the same
terminator as the original request.

Details:
I didn't add the terminator to the `TermResponse` event. However, I
assume the `TermResponse` event doesn't care about the terminator
because the sequence is already parsed. I also didn't update any of the
functions in `src/nvim/vterm/state.c` that write out responses. It
looked like those all pretty much used ST, and it would be a much larger
set of changes. In that same file, there's also logic for 8 bit ST
sequences, but from what I can tell, 8 bit doesn't really work (see `:h
xterm-8bit`), so I didn't use the 8 bit ST at all.
2025-12-29 16:30:23 -06:00
zeertzjq
ddd6ac5083 vim-patch:1bc3610: runtime(rust): partly revert e426245b, it causes more issues than it solves (#37156)
related: vim/vim#18974

1bc3610b0a

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-29 17:07:26 +08:00
zeertzjq
e916f03277 vim-patch:9.1.2030: inefficient use of ga_concat() (#37151)
Problem:  inefficient use of ga_concat()
Solution: Use ga_concat_len() when length is known.
          (John Marriott)

closes: vim/vim#19027

32b801abc3

Co-authored-by: John Marriott <basilisk@internode.on.net>
2025-12-29 07:56:45 +08:00
Evgeni Chasnovski
28ba99e026 feat(pack)!: suggest "delete" code action only for not active plugins
Problem: Deleting active plugins can lead to a situation when it is
  reinstalled after restart.

Solution: Suggest "delete" code action only for not active plugins.
  Whether a plugin is not active is visible by a hint in its header.
2025-12-28 18:39:26 +02:00
Evgeni Chasnovski
c339b83a4a feat(pack): hint in confirmation buffer that plugin is not active
Problem: After `vim.pack.update()` it is not clear if plugin is active
  or not. This can be useful to detect cases when plugin was removed
  from 'init.lua' but there was no `vim.pack.del()`.

Solution: Add ` (not active)` suffix with distinctive highlighting to
  header of plugins that are not active.
  It will also be shown in in-process LSP document symbols to have quick
  reference about which plugins are not active.
2025-12-28 18:39:26 +02:00
Evgeni Chasnovski
f5707a9c42 feat(pack)!: make del() only remove non-active plugins by default
Problem: Using `vim.pack.del()` to delete active plugin can lead to
  a situation when this plugin is reinstalled after restart. Removing
  plugin from 'init.lua' is documented, but can be missed.

Solution: Make `del()` only remove non-active plugins by default and
  throw an informative error if there is an active plugin.

  Add a way to force delete any plugin by adding `opts.force`. This also
  makes `del()` signature be the same as other functions, which is nice.
2025-12-28 18:39:26 +02:00
zeertzjq
c53fb58c15 vim-patch:e426245: runtime(rust): clean-up indent script, handle opening empty line correctly (#37139)
fixes: vim/vim#18974

e426245bb3

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-28 22:39:44 +08:00
Jan Edmund Lazo
c81f7aeee2 vim-patch:8.2.0098: exe stack length can be wrong without being detected (#37136)
Problem:    Exe stack length can be wrong without being detected.
Solution:   Add a check when ABORT_ON_INTERNAL_ERROR is defined.

e31ee86859

vim-patch:8.2.3262: build failure when ABORT_ON_INTERNAL_ERROR is defined

Port patch 9.0.1454 for "make formatc".

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-12-28 14:26:29 +08:00
zeertzjq
444e1ffe3e vim-patch:9.1.2028: [security]: Buffer-overflow with incomplete multi-byte chars (#37133)
Problem:  Buffer overflow in buf_write() when converting incomplete
          multi-byte characters (Kevin Goodsell)
Solution: Make the buffer slightly larger

closes: vim/vim#19007

f99de42a9f

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-28 00:37:55 +00:00
zeertzjq
80a8c3d23b vim-patch:ee3f10a: runtime(bpftrace): add indention plugin (#37132)
Problem:  No indention support when editing bpftrace files.
Solution: Add indention settings based on cindent with custom options.

closes: vim/vim#19030

ee3f10af87

Co-authored-by: Stanislaw Gruszka <stf_xl@wp.pl>
2025-12-28 00:20:42 +00:00
zeertzjq
5670dde1af vim-patch:a7f703c: runtime(doc): improve :catch documentation (#37131)
related: vim/vim#18984
closes:  vim/vim#19029

a7f703c215

Co-authored-by: Mao-Yining <101858210+mao-yining@users.noreply.github.com>
2025-12-28 08:18:48 +08:00
zeertzjq
7f1d7271d5 vim-patch:9.1.2027: filetype: bicep filetype used for 2 bicep file types (#37130)
Problem:  filetype: bicep filetype used for 2 bicep file types
Solution: Detect *.bicepparam files as bicep-param filetype, include
          new bicep-params and bicep filetype plugin
          (Scott McKendry)

The bicep language server handles parameter files differently than
regular bicep files. Treating them the same at the editor level leads to
false positive diagnostics in the editor.

References:

Bicep Language Constants:
- 51392d32ca/src/Bicep.Core/LanguageConstants.cs (L23)
VS Code Extension definition:
- 51392d32ca/src/vscode-bicep/package.json (L47)

closes: vim/vim#19026

4e722fdfdd

Co-authored-by: Scott McKendry <me@scottmckendry.tech>
2025-12-28 00:16:20 +00:00
zeertzjq
1e44a001ec vim-patch:9.1.2024: 'fsync' option cannot be set per buffer (#37129)
Problem:  'fsync' option cannot be set per buffer
Solution: Make 'fsync' option global-local
          (glepnir)

closes: vim/vim#19019

4d5b303726

Co-authored-by: glepnir <glephunter@gmail.com>
2025-12-28 08:14:45 +08:00
zeertzjq
ab5a92bff6 Merge pull request #37128 from zeertzjq/vim-9.1.2019
vim-patch:9.1.{2019,2026}
2025-12-28 07:20:15 +08:00
zeertzjq
f4eabcca4f vim-patch:9.1.2026: tests: patch 9.1.2019 not tested properly
Problem:  tests: patch 9.1.2019 not tested properly.
Solution: Add missing :exe (zeertzjq).

closes: vim/vim#19028

78046cc539
2025-12-28 07:02:03 +08:00
zeertzjq
e53accf8ec vim-patch:9.1.2019: inconsistent cursor encoding past EOL with ve=all
Problem:  When virtualedit is set to all, the cursor is supposed to be
          permitted to reside anywhere, including on the virtual space
          beyond the end of the buffer's text. Switching modes triggered
          a routine that "fixed" a cursor that was past the end of the
          line by shifting it back to the last actual character in the
          line and compensating with a virtual column offset. While
          visually identical, this re-encoding changed the underlying
          byte index, causing position-reporting functions to return
          inconsistent values after a mode change.
Solution: Skip this coordinate adjustment when virtual editing is fully
          enabled. By treating the line terminator as a valid, stable
          position, the cursor’s internal representation remains
          unchanged when entering or exiting Visual mode, ensuring
          consistent coordinate reporting. Add a regression test to
          check this functionality.
          (McAuley Penney)

fixes:  vim/vim#16276
closes: vim/vim#19009

491f0fa457

Co-authored-by: McAuley Penney <jacobmpenney@gmail.com>
2025-12-28 07:01:45 +08:00
glepnir
922816877f fix(pum): hide info floating window when insufficient space (#37107)
fix(pum): hide info window when insufficient space

Problem:
1. Info window was displayed even with insufficient space.
2. Tab characters counted as single cells.

Solution:
1. Hide window when space < 10 columns. Will be configurable
   via completepopup width option in the future.
2. Use win_linetabsize over mb_string2cells.
2025-12-27 13:56:34 +00:00
zeertzjq
47aef025a7 vim-patch:ffd5c52: runtime(compiler): ignore 'Found' messages in ruff and ty compiler (#37119)
while at it, also update the ty command line

closes: vim/vim#19012

ffd5c52d23

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2025-12-27 01:46:13 +00:00