Commit Graph

9704 Commits

Author SHA1 Message Date
zeertzjq
34ddb8b1b8 vim-patch:14e7203: runtime(compiler): Fix escaping in Windows shell command for tombi
As observed by Doug Kearns

related: vim/vim#18590
closes: vim/vim#18661

14e7203713

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2025-10-30 06:47:52 +08:00
Justin M. Keyes
6dd6c5b523 docs: rename l10n help files #36377 2025-10-28 20:15:16 -07:00
zeertzjq
ae82636276 docs: regenerate lua.txt (#36376) 2025-10-29 10:17:30 +08:00
Jonny Kong
e2cb675705 fix(filetype): move fallback logic to vim.filetype.match() #30141
Problem:
Previously, the fallback logic to ".conf" was located outside of
`vim.filetype.match()` and directly within the AutoCmd definition. As a
result, `vim.filetype.match()` would return nil instead of ".conf" for
fallback cases (#30100).

Solution:
Added a boolean return value to `vim.filetype.match()` that indicates
whether the match was the result of fallback. If true, the filetype will
be set using `setf FALLBACK <ft>` instead of `setf <ft>`.
2025-10-28 18:45:50 -07:00
zeertzjq
30d1d26c14 vim-patch:469f870: runtime(compiler): Fix invalid expression in tombi compiler after d659fafcc
related: vim/vim#18590

469f870c5e

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-10-29 08:18:07 +08:00
zeertzjq
ea57dea91f vim-patch:d659faf: runtime(compiler): add tombi compiler to lint TOML files
closes: vim/vim#18590

d659fafccd

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2025-10-29 08:17:50 +08:00
zeertzjq
3c14646896 vim-patch:9.1.1886: filetype: Android aconfig files are not recognized (#36374)
Problem:  filetype: Android aconfig files are not recognized
Solution: Detect *.aconfig files as pbtxt filetype (Bruno Belanyi)

Reference:
https://source.android.com/docs/setup/build/feature-flagging/declare-flag

closes: vim/vim#18656

7adeb09bb2

Co-authored-by: Bruno Belanyi <bruno@belanyi.fr>
2025-10-29 00:16:15 +00:00
zeertzjq
fdcc4c6b66 vim-patch:9ad7067: runtime(doc): Highlight [expr] arg in :help :return description
closes: vim/vim#18654

9ad706735d

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-10-29 08:05:28 +08:00
zeertzjq
ee60bf6112 vim-patch:6be154f: runtime(doc): revert wrong 'incsearch' description
This reverts commit 3fc00c05fb464d3e806df53bdc1743faa337ddca.

related: vim/vim#18639

6be154f5e6

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-10-29 08:05:28 +08:00
Gregory Anders
bb6f5c3b31 fix(tui): reset cursor style on exit (#36261)
Fix the cursor style terminfo capability (should be Se, not se). Also
include foot in the list of terminals that supports setting and
resetting cursor style (see
https://codeberg.org/dnkl/foot/issues/797#issuecomment-280305)
2025-10-28 13:11:00 -05:00
Justin M. Keyes
3fb53abe2a fix(health): attempt to concatenate table value #36369 2025-10-28 07:52:22 -07:00
zeertzjq
7088441de4 vim-patch:58ab343: runtime(netrw): fix misaligned comment after vim/vim#18611 (#36362)
related" vim/vim#18611
closes: vim/vim#18644

58ab3438b7
2025-10-28 00:12:21 +00:00
zeertzjq
59a44caac6 vim-patch:eba5133: runtime(rust): Do not use rustfmt as 'formatprg' by default (#36361)
This reverts commit 4ac995bf9366c6624a0724d19b2226f4c95694b3.

This was added in vim/vim#16807, with no explanation for why it was necessary beyond
"it's an example of an idea". It completely breaks `gq` for me—rustfmt doesn't
reflow comments so is not an appropriate tool here! Beyond that, formatting a
selection with rustfmt treats that selection as if it were an entire file,
throwing away any indentation.

For example, the commit causes `gq` to turn this:

```rust
pub fn foo() {
    // blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
}
```

into this:

```rust
pub fn foo() {
// blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
}

```

which is totally wrong. In contrast, if I clear `formatprg` then `gq` does the
right thing again:

```rust
pub fn foo() {
    // blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
    // blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
    // blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
    // blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
    // blah blah blah blah blah blah
}
```

related: vim/vim#16967
related: vim/vim#17055
closes: vim/vim#18640

eba51337d4

Co-authored-by: Aaron Jacobs <jacobsa@google.com>
2025-10-27 23:45:14 +00:00
Justin M. Keyes
88b45614e9 fix(build): gen_help_html fails #36359
Problem:
fe4faaf81a added an invalid "redirect" item, which caused the
assert() to fail, which then caused the neovim/doc/ CI to fail:
https://github.com/neovim/doc/actions/runs/18830779387/job/53721736276 :

The previous commit e69beb9b1a tried to fix a different issue, which
has gone hidden because the "invalid tags" failure has been present on
the neovim/doc/ but was silently failing.

    invalid tags: {
      ["g:netrw_keepdir"] = "usr_22.txt",
      netrw = "vi_diff.txt",
      ...
      plugins = "editorconfig"
    }

Solution:
- Fix the invalid redirect.
- Improve the redirects assertion.
2025-10-27 15:36:59 -07:00
Eduardo Cruz Guedes
5e039c8e97 fix(tutor): remove hyperlinks, simplify non-interactive examples #36307
1. Every hyperlink-like element was replaced by `"$1"` (where $1 is the original string showed in the hyperlink);
2. Arrows `--->` were used in lines containing practice examples when no editing text is involved;
3. Context on interactivity was minimally adapted when strictly needed, not to disrupt the original tutor's intent;
4. Tests regarding the tutor file refactored to ensure the new syntax is not flagged as an error.
2025-10-27 10:24:00 -07:00
yilisharcs
b9451dfd4c fix(ui2): emit FileType event after setting default pager options #36315
Problem: Setting a filetype before configuring default options for ui2
buffers (pager, cmd, ...) prevents users from setting their own options.

Solution: Call nvim_set_option_value after defaults are set.

Closes #36314

Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
2025-10-27 10:19:16 -07:00
tao
a768d0a95b fix(lsp): stop repeatedly resuming dead coroutine #35743
Problem:
Error extracting content-length causes all future coroutine resumes to
fail.

Solution:
Replace coroutine.wrap with coroutine.create in create_read_loop
so that we can check its status and catch any errors, allowing us to
stop the lsp client and avoid repeatedly resuming the dead coroutine.
2025-10-27 10:03:45 -07:00
zeertzjq
87ede4ab4f vim-patch:842c778: runtime(vim): Update base syntax, improve :@ highlighting
- Highlight :@ as a normal Ex command rather than something special.
- Fix erroneous matching of the Ex command as a register variable.

closes: vim/vim#18624

842c7788a5

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-10-27 16:52:49 +08:00
zeertzjq
b21a9d5b22 vim-patch:7dba04f: runtime(doc,vim): Update base syntax, match full :syntime command
- Use the optional tail command-name spec at :help :syntime.
- Match full :syntime command and highlight args.

7dba04f15c

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-10-27 16:52:09 +08:00
zeertzjq
e61880957f vim-patch:da5b600: runtime(vim): Update base syntax, match :terminal command
Match the full :terminal command syntax.

closes: vim/vim#18367

da5b6007fb

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-10-27 16:51:19 +08:00
zeertzjq
070f4d3da0 vim-patch:9.1.1875: username parsing bug in netrw plugin (#36348)
Problem:  username parsing bug in netrw plugin when using remote adding
          feature
Solution: Allow any characters except for "@" (Václav Kobera), add a
          test for the netrw plugin

closes: vim/vim#18611

f17f78c557

Co-authored-by: Václav Kobera <vasekobera@gmail.com>
2025-10-27 03:20:34 +00:00
zeertzjq
3bbab42a8d vim-patch:d535e58: runtime(debversions): Add resolute (26.04) as Ubuntu release name (#36345)
closes: vim/vim#18637

d535e5852b

Co-authored-by: James McCoy <jamessan@jamessan.com>
2025-10-27 03:05:57 +00:00
zeertzjq
35d04394aa vim-patch:9.1.1878: filetype: Soy files are not recognized (#36346)
Problem:  filetype: Soy files are not recognized
Solution: Detect *.soy files as soy filetype,
          include a soy filetype plugin (Riley Bruins)

closes: vim/vim#18640

9fff99c3c2

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2025-10-27 02:52:56 +00:00
zeertzjq
155efabb15 vim-patch:9.1.1876: pre-inserted text not exposed in complete_info() (#36342)
Problem:  pre-inserted text not exposed in complete_info()
Solution: Add the pre-inserted text to the complete_info() Vim script
          function (Girish Palya)

closes: vim/vim#18571

Feat: expose preinserted text in complete_info()

ef5bf58d8c

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-10-27 01:34:52 +00:00
zeertzjq
fb6fd17f26 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>
2025-10-27 01:21:52 +00:00
zeertzjq
5737c02482 vim-patch:6a8ab8f: runtime(doc): update the :split help tags.
closes: vim/vim#18640

6a8ab8f5d4

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-10-27 08:26:07 +08:00
zeertzjq
d8326ed15d vim-patch:3fc00c0: runtime(doc): mention that 'incsearch' ignores addresses and offset
closes: vim/vim#18639

3fc00c05fb

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-10-27 08:22:12 +08:00
zeertzjq
046c9b678c vim-patch:8e600ad: runtime(doc): Normalise heredoc end marker label at :help const
Match the name used at :help :let-heredoc, {endmarker}.

closes: vim/vim#18638

8e600aded2

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-10-27 08:20:14 +08:00
zeertzjq
2407833ba1 vim-patch:9.1.1872: Cmdline history not updated when mapping <Up> and <CR> (#36334)
Problem:  Cmdline history not updated when mapping both <Up> and <CR>.
Solution: Consider the command typed when in Cmdline mode and there is
          no pending input (zeertzjq).

Although the existing behavior technically does match documentation, the
"completely come from mappings" part is a bit ambiguous, because one may
argue that the command doesn't completely come from mappings as long as
the user has typed a key in Cmdline mode.  I'm not entirely sure if this
change will cause problems, but it seems unlikely.

fixes: vim/vim#2771
related: neovim/neovim#36256
closes: vim/vim#18607

97b6e8b424
2025-10-26 22:19:32 +08:00
Justin M. Keyes
07461bac27 Merge #34940 refactor(spell): migrate to Lua, drop netrw dep 2025-10-25 20:08:02 -04:00
Justin M. Keyes
4d501c93bb refactor(spell): cleanup
- prefer `stdpath(data)/site/spell` instead of looking for random dirs in 'runtimepath'.
- drop unused functions `choose_directory`, `setup`, etc.
2025-10-26 01:28:37 +02:00
zeertzjq
a121ede1bf vim-patch:7193cab: runtime(make): Prevent makeTargetinDefine matching extra line
This fixes a bug introduced in 2a33b499a3d7f46dc307234847a6562cef6cf1d8:
When makeTargetinDefine ends with makeIdent, makeSpecTarget or
makeComment, the following line is also matched as makeTargetinDefine.

So, add keepend to prevent that just as makeTarget does.

related: vim/vim#18403
closes: vim/vim#18570

7193cab6c8

Co-authored-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
2025-10-26 07:22:59 +08:00
zeertzjq
4a2b9ec3c7 vim-patch:bbf4a10: runtime(unison): update syntax from upstream repository
closes: vim/vim#18623

bbf4a10fe4

Co-authored-by: Anton Parkhomenko <mailbox@chuwy.me>
2025-10-26 07:22:59 +08:00
Tom Ampuero
7c5ff99e8a refactor(spell): migrate to Lua, drop netrw dependency
Problem:
Spell file downloads relied on Vimscript and netrw (:Nread). If netrw is
disabled, downloads fail.

Solution:
Port the logic to Lua as `nvim.spellfile` and wire it via a Lua plugin that
handles `SpellFileMissing`. Use `vim.net.request()` with a timeout for HTTP,
prompt via `vim.fn.input` and report via `vim.notify`.

Closes #7189
2025-10-26 00:33:41 +02:00
skewb1k
e239179871 fix(lsp): ensure bufnr is passed for buffer-local requests (#36325)
Problem:
Some LSP method handlers were making requests without specifying a
bufnr, defaulting to 0 (current). This works in most cases but
fails when client attaches to background buffers, causing
assertions in handlers to fail.

Solution:
Ensure bufnr is passed to Client.request for buffer-local methods.
2025-10-25 14:51:13 -07:00
Justin M. Keyes
fe4faaf81a docs: dev-quickstart, dev-test #36304 2025-10-24 17:24:51 -07:00
zeertzjq
520568f40f 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 06:48:04 +08:00
xvzc
095b9f98f3 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()`.
2025-10-23 17:34:12 -07:00
Justin M. Keyes
a983e69708 docs: dev_tools, dev_arch 2025-10-24 02:14:29 +02:00
Justin M. Keyes
1f2883e879 fix(outline): use 2-space indent instead of 1-space
2 spaces is more visually distinct at very little cost.
2025-10-24 02:07:37 +02:00
Justin M. Keyes
6f8ef3bdb4 docs(faq): h3 => h2 2025-10-24 02:07:37 +02:00
Justin M. Keyes
7838c242e9 docs: types, news, lua-plugin
- mention "lua_ls", not "luals". https://github.com/neovim/neovim/discussions/36182

Co-authored-by: Maria Solano <majosolano99@gmail.com>
2025-10-24 02:07:37 +02:00
Justin M. Keyes
4129fa5bac Merge #36299 improve PackChanged event 2025-10-23 18:29:24 -04:00
zeertzjq
67832710a5 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.
2025-10-24 06:01:13 +08:00
Evgeni Chasnovski
83f7d98518 docs(pack): add plugin hooks example
Problem: No examples of how to use `PackChanged[Pre]` for plugin hooks.

Solution: Add examples of creating plugin hooks.
2025-10-23 20:28:13 +03:00
Evgeni Chasnovski
16a6559ec6 fix(pack)!: do not trigger PackChanged[Pre] kind=update during install
Problem: `PackChanged[Pre]` events with `kind=update` are triggered both
  during plugin's initial installation and after already installed
  plugin was updated.

  It was a deliberate decision to allow writing only a single update
  hook to act as a dedicated "build" entry point (like execute `make` or
  `cargo build —release`). This mimics how other plugin managers have a
  single "build" command.

  This was a result of 'mini.deps' experience with the different
  approach: "update" hooks are not run during install. This proved to be
  confusing as it requires to write two hooks. But also the reason might
  be that 'mini.deps' names it "checkout" hook instead of "update".

  However, the `vim.pack` event approach makes it lower cost to handle
  separate "update" and "install" events. Something like
  `if ev.data.kind == 'install' or ev.data.kind == 'update' then`
  instead of two autocommands.
  Plus this makes clearer separation of events.

Solution: do not trigger `PackChanged[Pre] kind=update` event during
  install.
2025-10-23 20:28:09 +03:00
Evgeni Chasnovski
a9db6ec6fa feat(pack): add active field to PackChanged event data
Problem: Inside `PackChanged[Pre]` callbacks it might be useful to tell
  if the affected plugin is active or not. It is already possible via
    extra `vim.pack.get({ 'plug-name' })[1].active`, but it is not quite
    user-friendly for something that might be needed frequently in real
    world use cases.

Solution: Supply extra `active` event data field.
2025-10-23 17:50:03 +03:00
Fredrik Lanker
323d5527ee fix(lsp): set 'linebreak' in floating windows (#36275)
Set linebreak to avoid splitting words.

Fix #36268
2025-10-22 13:38:47 -04:00
luukvbaal
c94b7b93c0 fix(ui2): start treesitter after deleting cmdline buffer (#36274)
Problem:  Treesitter is not started in new cmdline buffer after deletion.
Solution: Start treesitter when highlighter buffer no longer matches.
2025-10-22 16:16:36 +02:00
Robert
cf48741227 docs(vimfn): getcwd() behavior #36222 2025-10-21 10:40:02 -07:00