Commit Graph

9852 Commits

Author SHA1 Message Date
zeertzjq
c81ff490dc vim-patch:ffc7f8c: runtime(hog): set undo_ftplugin correctly, delete trailing whitespace
closes: vim/vim#18727

ffc7f8c9da

Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
2025-12-04 08:51:25 +08:00
Olivia Kinnear
e62dd13f83 fix(lsp): default ClientConfig.exit_timeout to false #36811 2025-12-03 00:58:46 -05:00
zeertzjq
a702534c50 fix(lsp): close timer when client exits (#36795)
Also, don't start the timer at all when a previous shutdown failed, as
in this case a forced shutdown is used and no timer is needed.

This fixes most of the delays caused by #36750.
The delays caused by #36378 still seem to remain.
2025-12-03 07:44:27 +08:00
Justin M. Keyes
672f6e60c1 fix(health): bug-report formatting, version check #36809
Problem:
Version check failed because of "equality" comparison, so a version
string of "123abc" would not match "123abcdef".

Solution:
- Adjust verison check.
- Improve bug-report formatting.
2025-12-02 17:36:27 +00:00
Chris Grieser
4e2ed1d03c fix(treesitter): missing nowait for :InspectTree keymaps #36804 2025-12-02 10:49:58 -05:00
Elias Assaf
310d01d8fa fix(clipboard): tmux clipboard data may be stale #36787
Problem:
When Nvim wants to paste from tmux, it doesn't tell tmux to read the OS
clipboard first, so it may have stale clipboard state.

Solution:
Tickle `tmux refresh-client -l`, before requesting paste, as recommended
in the tmux manpage. https://man7.org/linux/man-pages/man1/tmux.1.html

Fixes https://github.com/neovim/neovim/issues/36786

Signed-off-by: Elias Assaf <elyas51000@gmail.com>
2025-12-01 21:52:40 -05:00
zeertzjq
832ce0ac4b vim-patch:c3cfdef: runtime(doc): clarify the use of v:errormsg (#36789)
fixes: vim/vim#18825

c3cfdefdee

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-02 00:38:18 +00:00
zeertzjq
ade9eac8ca vim-patch:cce452f: runtime(lf): update syntax to support lf version r39 (#36790)
closes: vim/vim#18846

cce452f52d

Co-authored-by: CatsDeservePets <145048791+CatsDeservePets@users.noreply.github.com>
2025-12-02 00:36:39 +00:00
Tristan Knight
1de77c608f fix(lsp): handle nil request in semantic tokens #36780
Allow the `request` parameter in `tokens_to_ranges` to be `nil` and
update version checking logic accordingly. This prevents errors when
the request is not present and improves robustness of semantic token
handling.
2025-12-01 12:51:04 -05:00
Olivia Kinnear
acfb9bc614 feat(lsp): graduate ClientConfig exit_timeout #36750
Problem:
The `flags` field calls its sub-fields "experimental".
But `exit_timeout` is now used for multiple purposes.

Solution:
Graduate `exit_timeout` to a top-level ClientConfig field.
2025-11-30 21:41:43 -05:00
zeertzjq
3f8e51cee7 vim-patch:9.1.1936: filetype: Erlang lexical files are not recognized
Problem:  filetype: Erlang lexical files are not recognized
Solution: Detect *.xrl files as leex filetype, include syntax and
          filetype plugins (Jon Parise).

leex is the lexical analyzer generator for Erlang. Its input file format
follows a section-based structure and uses the `.xrl` file extension.

This initial work includes file detection, an ftplugin (which inherits
the Erlang configuration), and a syntax definition.

Reference:
-  https://www.erlang.org/doc/apps/parsetools/leex.html

related: vim/vim#18819
closes: vim/vim#18832

b087c5452b

Co-authored-by: Jon Parise <jon@indelible.org>
2025-12-01 10:11:34 +08:00
zeertzjq
8310f20526 vim-patch:9.1.1935: filetype: not all Erlang files are recognized
Problem:  filetype: not all Erlang files are recognized
Solution: Detect *.app.src and rebar.config files as erlang filetype
          (John Parise).

*.app.src files contain Erlang application definitions. (There are also
*.app files, which are similar but more often build artifacts, and that
file extension is too ambiguous to be recognized by default.)

Reference:
- https://www.erlang.org/doc/system/applications.html

Rebar is the Erlang build tool. rebar.config uses Erlang syntax.

Reference:
- https://rebar3.org/docs/configuration/configuration/

closes: vim/vim#18835

2b2580e61a

Co-authored-by: Jon Parise <jon@indelible.org>
2025-12-01 10:11:34 +08:00
Tristan Knight
23ddb2028b feat(lsp): semanticTokens/range #36705
Problem:
Nvim supports `textDocument/semanticTokens/full` and `…/full/delta`
already, but most servers don't support `…/full/delta` and Nvim will try
to request and process full semantic tokens response on every buffer
change. Even though the request is debounced, there is noticeable lag if
the token response is large (in a big file).

Solution:
Support `textDocument/semanticTokens/range`, which requests semantic
tokens for visible screen only.
2025-11-30 21:06:56 -05:00
zeertzjq
cdc6f85111 vim-patch:a4c43a6: runtime(vim): Update base syntax, match full :language command (#36766)
closes: vim/vim#18808

a4c43a6cf5

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-12-01 09:24:33 +08:00
fredizzimo
6ebeb07c56 feat(api): experimental nvim__exec_lua_fast #35758
Problem:
Remote UIs can't execute lua code when a blocking prompt is waiting for
input. This is needed when implementing IME pre-edit for example.

Solution:
Add an `nvim__exec_lua_fast` experimental API function, which is allowed
to run instead of being queued until after the message has been shown.
2025-11-30 19:27:02 -05:00
zeertzjq
8c1327a622 vim-patch:49f731d: runtime(doc): Improve :help :catch command specification (#36758)
The pattern argument is optional.  See :help :sort for another example.

closes: vim/vim#18834

49f731d243

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-11-30 18:55:38 +08:00
Olivia Kinnear
12d4c624bb feat(ex_cmds): consistent :restart behavior (#36723) 2025-11-30 02:14:28 -08:00
ymich9963
c87d92c3b4 fix(ui.open): use "start" instead of deprecated "rundll32" #36731
Problem:
The rundll32 utility is a leftover from Windows 95, and it has
been deprecated since at least Windows Vista.

Solution:
Use the start command through Command Prompt instead.
2025-11-30 00:11:43 -05:00
Riley Bruins
03d6cf7aae feat(lsp): support version in textDocument/publishDiagnostics #36754
This commit makes it so that push diagnostics received for an outdated
document version are ignored.
2025-11-29 23:38:11 -05:00
Olivia Kinnear
a4b2192690 feat(lsp): lsp.enable() auto-escalates forced shutdown #36458
Problem:
LSP server may not exit even after the client was stopped/disabled via enable(false).

Solution:
Automatically force-stop after a timeout, unless `client.flags.exit_timeout = false`.
2025-11-29 14:36:29 -05:00
zeertzjq
a950e8ea9d vim-patch:ab09099: runtime(netrw): fix undefined variable curwin in s:NetrwMenu() (#36744)
fixes: vim/vim#18829

ab090993ad

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-11-29 00:35:34 +00:00
zeertzjq
da6edcb91b vim-patch:9.1.1934: filetype: not all starlark files are recognized (#36743)
Problem:  filetype: not all starlark files are recognized
Solution: Detect *.sky files as starlark filetype (Bruno Belanyi)

References:
- https://docs.bazel.build/versions/0.17.1/skylark/spec.html

closes: vim/vim#18807

3ba6a97fea

Co-authored-by: Bruno Belanyi <bruno@belanyi.fr>
2025-11-29 00:31:52 +00:00
zeertzjq
8c4e675983 vim-patch:afd46fd: runtime(doc): Correct typo in usr_30.txt regarding softtabstop (#36742)
Fix typo in explanation of softtabstop and shiftwidth.

closes: vim/vim#18823

afd46fd9c9

Co-authored-by: Shin Rag <62047911+aquanjsw@users.noreply.github.com>
2025-11-29 00:22:24 +00:00
glepnir
eb3201c772 fix(float): null pointer dereference, redundant call #36727
Problem: Null pointer dereference when checking *wp->w_p_stl.
win_set_inner_size called twice in win_new_float.

Solution: Add null check for wp->w_p_stl. Remove redundant
win_set_inner_size call as win_config_float already calls it.
2025-11-28 11:27:19 -08:00
zeertzjq
2c6469aca4 vim-patch:9.1.1933: completion: complete_match() is not useful (#36726)
Problem:  completion: complete_match() Vim script function and
          'isexpand' option are not that useful and confusing
          (after v9.1.1341)
Solution: Remove function and option and clean up code and documentation
          (Girish Palya).

complete_match() and 'isexpand' add no real functionality to Vim. They
duplicate what `strridx()` already does, yet pretend to be part of the
completion system. They have nothing to do with the completion mechanism.

* `f_complete_match()` in `insexpand.c` does not call any completion code.
   It’s just a `STRNCMP()` wrapper with fluff logic.
* `'isexpand'` exists only as a proxy argument to that function.
   It does nothing on its own and amounts to misuse of a new option.

The following Vim script function can be used to implement the same
functionality:

```vim
  func CompleteMatch(triggers, sep=',')
    let line = getline('.')->strpart(0, col('.') - 1)
    let result = []
    for trig in split(a:triggers, a:sep)
      let idx = strridx(line, trig)
      if l:idx >= 0
        call add(result, [idx + 1, trig])
      endif
    endfor
    return result
  endfunc
```

related: vim/vim#16716
fixes: vim/vim#18563
closes: vim/vim#18790

cbcbff8712

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-11-28 10:10:31 +08:00
zeertzjq
0b888ea039 vim-patch:b217ffb: runtime(doc): remove outdated help about 'completeopt' "fuzzy"
closes: vim/vim#18815

b217ffbef2
2025-11-28 07:53:49 +08:00
zeertzjq
812186e2dc vim-patch:9.1.1930: completion: 'completefuzzycollect' is too obscure
Problem:  completion: 'completefuzzycollect' option is too obscure
Solution: Deprecate the option, but don't error out for existing scripts,
          behave like 'completefuzzycollect' is set when fuzzy
          completion is enabled (Girish Palya).

fixes: vim/vim#18498
closes: vim/vim#18788

33fbfe003c

Remove this option completely, as it's introduced in Nvim v0.12 cycle.

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-11-28 07:53:49 +08:00
glepnir
e4ce0c7270 fix(health): git check and autocmd clean #36713
Problem: Incorrect Git check and improper autocmd cleanup

Solution: Add once to the autocmd and fix the Git check condition
2025-11-26 20:12:50 -08:00
zeertzjq
2c97ea3f04 vim-patch:25a736e: runtime(i3config/swayconfig): add all option for i3config only (#36710)
Since i3 version 4.24, popup_during_fullscreen has new
option `all`. So add the `all` option for popup_during_fullscreen to
prevent `all` option highlighted as error.

However, sway won't implement `all` option for popup_during_fullscreen,
so let's remove the extra options from the syntax cluster in swayconfig
syntax script after sourcing the i3config.

Reference:
- https://i3wm.org/docs/userguide.html#_popups_during_fullscreen_mode
- https://github.com/swaywm/sway/issues/8746

closes: vim/vim#18760

25a736e323

Co-authored-by: Robertus Chris <robertusdchris@gmail.com>
2025-11-27 01:46:05 +00:00
zeertzjq
933df98270 vim-patch:712b650: runtime(doc): Fix typo in "Jumping to Changes", usr_08.txt (#36707)
- Change "Prepended" (past tense) to "Prepend" (present tense,
  imperative).
- Add short examples clarifying the behavior of prepending a count to
  commands that jump to changes in diff mode.

closes: vim/vim#18810

712b650332

Co-authored-by: Brent Pappas <pappasbrent@gmail.com>
2025-11-27 07:49:44 +08:00
Miika Tuominen
7ebfc50775 fix(lsp): ignore invalid fold ranges (#36708) 2025-11-26 18:47:07 -05:00
glepnir
8a626e5c4a feat(float): 'statusline' in floating windows #36521
Problem:
Can't show 'statusline' in floating windows.

Solution:
Use window-local 'statusline' to control floating window statusline visibility.
2025-11-26 09:10:45 -08:00
glepnir
13ed225054 feat(health): create a bug report #31842
Problem:
Creating a bug report is somewhat tedious for users.
Bug reports sometimes are missing useful info.

Solution:
Add a feature to :checkhealth which automatically gets
system info and includes it in a new bug report.
2025-11-25 21:21:32 -08:00
Rob Pilling
612b2e7850 feat(api): nvim_get_commands returns function fields #36415
Problem:
nvim_get_commands does not return callbacks defined for
"preview", "complete", or the command itself.

Solution:
- Return Lua function as "callback" field in a Lua context.
- Return "preview" function in a Lua context.
- BREAKING: Return "complete" as a function instead of a boolean.
2025-11-25 21:12:39 -08:00
Maria Solano
7e09fedf43 feat(diagnostic): config.status #36693
Problem:
`diagnostic.status()` is configured via `config.signs`, but users may
want diagnostics only in statusline, not in the gutter (signs).

Solution:
Add `config.status`.
2025-11-25 21:00:00 -08:00
Muhammad Saheed
87bd16e470 fix(man.lua): :Man slow/hangs if MANPAGER is set #36689
Problem:
When `MANPAGER` is set to something like 'nvim +Man!',
`vim.system({ 'nvim' })` call waits forever for input and times out
after 10 seconds in `system()` and the assert on `stdout` being not
`nil` fails.

Solution:
Set `MANPAGER=cat` when calling `system()`
2025-11-25 12:38:32 -08:00
Riley Bruins
4107442103 feat(diagnostic): highlights in diagnostic.status() #36685
Applies the appropriate `DiagnosticSign*` highlight to each group,
resetting the highlights at the end of the expression.
2025-11-25 10:14:46 -08:00
Riley Bruins
8d8f17c924 refactor(defaults): deduplicate selection_range() mappings #36686
We don't need to specify the timeout ms here anymore, because the
implementation was changed to use it by default.
2025-11-25 10:00:28 -08:00
Branden Call
e82aef2e22 feat(lsp): incremental-selection operator-pending mode #36575
Problem:
LSP incremental selection provides default visual-mode keymaps for `an`
and `in`. Operator-pending mode is not supported, so `dan` and `can` do
not apply the operation.

Solution:
Modify selection_range() to be synchronous.
Add operator-pending mappings.
2025-11-24 17:10:50 -08:00
Justin M. Keyes
60c35cc4c7 docs: vimdoc parsing errors #36681
Error: .tests/neovim/runtime/doc/dev_test.txt
    (MISSING "`" [420, 79] - [420, 79])
    Error: .tests/neovim/runtime/doc/news.txt
    (MISSING "`" [137, 80] - [137, 80])
    Error: .tests/neovim/runtime/doc/nvim.txt
    (MISSING "<" [106, 0] - [106, 0])
    Error: .tests/neovim/runtime/doc/vimfn.txt
    (MISSING "}" [2610, 26] - [2610, 26])
2025-11-24 15:10:05 -08:00
zeertzjq
dbd7f45873 vim-patch:2190036: runtime(doc): Add environment variable expansion note to options (#36675)
Add "Environment variables are expanded |:set_env|" documentation to
options that have the P_EXPAND flag but were missing this note.

Updated options:
- 'cdpath'
- 'dictionary'
- 'mkspellmem'
- 'packpath'
- 'runtimepath'
- 'spellfile'
- 'spellsuggest'
- 'thesaurus'
- 'ttytype'
- 'undodir'
- 'verbosefile'
- 'viewdir'
- 'viminfofile'

These options support environment variable expansion in their values
(e.g., $HOME, $USER) but the documentation didn't explicitly mention
this capability. This brings their documentation in line with other
options like backupdir, directory, and makeprg that already include
this note.

closes: vim/vim#18791

2190036c8c

Co-authored-by: Alex Plate <AlexPl292@gmail.com>
2025-11-24 10:29:39 +08:00
zeertzjq
71ce3030eb vim-patch:898ac80: runtime(new-tutor): update vim-02-beginner following 48940d9 (#36674)
closes: vim/vim#18793

898ac80be6
2025-11-24 09:33:28 +08:00
Justin M. Keyes
3fc72f4ef1 docs: misc
Close #36441
Close #36631
Close #36656

Co-authored-by: Maria José Solano <majosolano99@gmail.com>
Co-authored-by: glepnir <glephunter@gmail.com>
Co-authored-by: "Mike J. McGuirk" <mike.j.mcguirk@gmail.com>
2025-11-23 20:03:13 -05:00
Tomas Slusny
a88c7962a8 fix(difftool): handle "no differences found" #36671
Add an early exit in diff_dirs to notify the user and return when no
differences are detected between directories.
This prevents Vim:E42: No Errors exception message

See https://github.com/neovim/neovim/pull/35448#issuecomment-3568271456
2025-11-23 13:01:57 -08:00
Justin M. Keyes
bf820b1b94 docs: misc, build, lsp 2025-11-22 19:32:45 -05:00
Justin M. Keyes
6c20531e48 docs: deprecate BUNDLED_CMAKE_FLAG
Problem:
We have too many build flags.
BUNDLED_CMAKE_FLAG is redundant with DEPS_CMAKE_FLAGS.

Solution:
In documentation, refer to DEPS_CMAKE_FLAGS instead of BUNDLED_CMAKE_FLAG.
2025-11-22 14:33:13 -05:00
zeertzjq
1c12073db6 vim-patch:8da8862: runtime(vim): Update base syntax, match full :history command (#36655)
closes: vim/vim#18784

8da886269a

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-11-21 23:13:10 +00:00
zeertzjq
2185e4f4b7 vim-patch:ea86e53: runtime(vim): Update base syntax, match :debug and :break* commands
Match full :debug, :breakadd, :breakdel and :breaklist commands.

closes: vim/vim#18748

ea86e53c2b

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-11-21 08:56:51 +08:00
zeertzjq
5f93d27fba vim-patch:74b4f92: runtime(compiler): set errorformat where missing
As a matter of caution it sets it to the default gcc errorformat:

```
errorformat=%*[^"]"%f"%*\D%l: %m,"%f"%*\D%l: %m,%-Gg%\?make[%*\d]: *** [%f:%l:%m,%-Gg%\?make: *** [%f:%l:%m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c\,,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\,,%-G%*[ ]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,"%f"\, line %l%*\D%c%*[^ ] %m,%D%*\a[%*\d]: Entering directory %*[`']%f',%X%*\a[%*\d]: Leaving directory %*[`']%f',%D%*\a: Entering directory %*[`']%f',%X%*\a: Leaving directory %*[`']%f',%DMaking %*\a in %f,%f|%l| %m
```

so that the compiler keeps working after switching to others.

While likely only a subset is needed; such a subset has been proposed in
a commented errorformat;

checked to work for yamllint but ran out of steam for other compilers;

closes: vim/vim#18754

74b4f9242e

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2025-11-21 08:56:51 +08:00
zeertzjq
091b0859ad vim-patch:d128850: runtime(php): Update indent script to 1.76 (from 1.75)
fixes: vim/vim#18739 (editor hang on mixed syntax style)
closes: vim/vim#18758

d1288503aa

Co-authored-by: John Wellesz <john.wellesz@gmail.com>
2025-11-21 08:56:51 +08:00