Commit Graph

32390 Commits

Author SHA1 Message Date
0814086a23 docs: misc (#33093)
Co-authored-by: Jx <JxJxxJxJ@github.com>
Co-authored-by: Richard Dzenis <richard@dzenis.dev>
Co-authored-by: Shixian Sheng <shixian_sheng-2@protonmail.com>
Co-authored-by: Sourabh Kumar <sourabh7.tech@gmail.com>
Co-authored-by: Yegor Yefremov <yegorslists@googlemail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2025-04-13 07:41:54 +08:00
60af1a1db2 fix(treesitter): clear parse options state #33437
Apparently after parsing with options in tree-sitter, the options data
persists in the parser object, and thus successive calls to
`ts_parser_parse()` will act like `ts_parser_parse_with_options()`. This
is problematic because `languagetree.lua` makes coroutine-environment
assumptions based on if a nullptr has been returned by the parser
function. This commit makes it so that the parse options state is reset
upon a regular parse (would be nice if this was done upstream).

Fixes #33277
2025-04-12 15:51:29 -07:00
b8763cb215 fix(man.lua): useless executability check #33438
Problem:
executability check using `uv.fs_access`
doesn't work currently and can't work on windows

Solution:
only check for executable with `vim.fn.executable`
2025-04-12 15:50:04 -07:00
a8dd5c7e41 fix(man.lua): noisy "ENOENT" error on Windows #33409
Problem:
:Man shows noisy "ENOENT: no such file or directory" error on Windows.

Solution:
Do some checks before calling `vim.system`.
2025-04-12 10:54:20 -07:00
74ca73d545 docs: misc #33330 2025-04-12 10:21:03 -07:00
d77d961b35 feat(defaults): shelltemp=false #33012
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2025-04-12 08:24:42 -07:00
c8fbb0d2ee vim-patch:ab2fe65: runtime(doc): correct backslash escaping comma example (#33433)
closes: vim/vim#17096

ab2fe65fbf

Co-authored-by: Qiming zhao <chemzqm@gmail.com>
2025-04-12 10:08:57 +00:00
4a706a7092 fix(column): don't count signs on lines beyond eob #33410
Problem:  Computed previous buffer line count may be beyond end of
          buffer. This results in signs being removed from `b_signcols`
          that were never included in it, tripping an assertion.

Solution: Store the previous line count as it was before appending or
          deleting lines. Use it to clamp the edited region when
          clearing signs before a splice, after which it is reset.
2025-04-11 04:46:55 -07:00
064ff74cdb fix(marks): wrong display after inserting/deleting lines #33389
Problem:  Lines to/from which virt_lines or inline virt_text may have
          moved are left valid. Similarly the modified region may be
          too small to account for moved decorations after inserting
          or deleting lines. `redrawOneLine()` can be replaced with
          a call to `changed_lines_redraw_buf()`.

Solution: Invalidate the line after a change if there is virt_lines, or
          inline virt_text in the buffer with 'wrap' enabled. Extend the
          modified region for inserted or deleted lines if there may be
          decorations in the buffer. Remove `redrawOneLine()`.
          Simplify the logic for `changed_lines_invalidate_win()`.

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2025-04-11 04:36:49 -07:00
5111d66ac9 build(deps): bump luajit to 51d4c26ec (#33422)
* ARM: Fix soft-float math.min()/math.max().
* ARM64: Fix pass-by-value struct calling conventions.
2025-04-11 12:47:50 +02:00
092962b07c fix(vim.version): vim.VersionRange:has(<prerelease>) (#33324)
Problem:
`vim.version.range('>=0.10'):has('0.12.0-dev')` returns false, which is
wrong per semver.

Solution:
`vim.VersionRange:has()` shouldn't have special handling for prereleases
(Why would we need it when `__eq`, `__lt`, `__le` already handle
 prereleases?).

Closes #33316
2025-04-11 03:15:18 -07:00
6a728382f9 vim-patch:06a41ad: runtime(keymaps): include 2 Brazilian Keymaps (#33424)
closes: vim/vim#17072

06a41ad084

Co-authored-by: Elsarques <luismarques0504@proton.me>
2025-04-11 08:56:23 +00:00
3aa833e0d9 vim-patch:5c84d12: runtime(filetype): make shell filetype detection more robust (#33421)
closes: vim/vim#17063

5c84d12df1

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2025-04-11 16:45:14 +08:00
7c15987444 vim-patch:9.1.1290: tests: missing cleanup in test_filetype.vim (#33420)
Problem:  tests: missing cleanup in test_filetype.vim, wrong name in
          test_plugin_matchparen
Solution: Add :bwipe corresponding to :split, rename test case

closes: vim/vim#17088

b0e19f9e1b
2025-04-11 08:10:50 +08:00
dc00b37965 vim-patch:9.1.1212: filetype: logrotate'd pacmanlogs are not recognized (#33412)
Problem:  filetype: logrotate'd pacmanlogs are not recognized
Solution: also detect pacman.log* files as pacmanlog filetype,
          remove BufNewFile autocmd (Eisuke Kawashima)

closes: vim/vim#16873

20d23ce93b

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2025-04-10 16:20:22 +08:00
0ee5a4d481 feat(meta): vendor luv meta files
Problem: No type information for `vim.uv`.

Solution: Vendor https://github.com/LuaCATS/luv (which is what
luals bundles). This will allow other tooling to work out-of-the-box and
make these files available to users and plugins without the need for
`lazydev.nvim` etc.
2025-04-10 09:13:13 +02:00
627d0a2b32 vim-patch:f9f53f5: runtime(remind): include remind.vim ftplugin
closes: vim/vim#17085

f9f53f5a8f

Co-authored-by: Joe Reynolds <joereynolds952@gmail.com>
2025-04-10 09:12:57 +02:00
51a967d58a vim-patch:9.1.1289: tests: no test for matchparen plugin with WinScrolled event (#33411)
Problem:  tests: no test for matchparen plugin with WinScrolled event
Solution: add missing test

closes: vim/vim#10942

96a0b2a6d5

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-04-10 00:46:49 +00:00
f908fe4462 vim-patch:0b540c6: runtime(help): add omni completion and 'iskeyword' to filetype plugin (#33398)
Problem:

- Help tags provide a good way to navigate the Vim documentation, but
  many help documents don't use them effectively. I think one of the
  reasons is that help writers have to look up help tags manually with
  `:help` command, which is not very convenient.
- 'iskeyword' is only set for help buffers opened by `:help` command.
  That means if I'm editing a help file, I cannot jump to tag in same
  file using `Ctrl-]` unless I manually set it, which is annoying.

Solution:

- Add omni completion for Vim help tags.
- Set 'iskeyword' for `ft-help`

closes: vim/vim#17073

0b540c6f38

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-04-10 07:36:30 +08:00
f068386c9f fix(lsp): "bold" border for vim.lsp.buf.hover #33395
Problem: vim.lsp.buf.hover allows a bold border size which hasn't been
defined

Solution: Define the bold border size for vim.lsp.buf.hover
2025-04-09 04:15:33 -07:00
5a94edad70 feat(health): summary in section heading #33388
Problem:
As checkhealth grows, it is increasingly hard to quickly glance through
the information.

Solution:
Show a summary of ok, warn, and error outputs per section.
2025-04-09 04:13:20 -07:00
ff2cbe8fac vim-patch:7517a8c: runtime(lf): improve syntax script, add filetype plugin
- Greatly improve detection and highlighting of command/shell regions,
  input-device key labels, escape sequences (@joelim-work)
- Add ftplugin for formatoptions, toggling comment areas
  (@andis-sprinkis)
- Add a few missing lf option keywords, rm. old non-working code, misc.
  formatting (@andis-sprinkis)

closes: vim/vim#17078

7517a8cadf

Co-authored-by: Andis Spriņķis <andis@sprinkis.com>
2025-04-09 10:14:27 +02:00
c73a827564 vim-patch:9.1.1288: Using wrong window in ll_resize_stack() (#33397)
Problem:  Using wrong window in ll_resize_stack()
          (after v9.1.1287)
Solution: Use "wp" instead of "curwin", even though they are always the
          same value.  Fix typos in documentation (zeertzjq).

closes: vim/vim#17080

b71f1309a2
2025-04-09 07:40:55 +08:00
jyn
3647b821ea fix(editor): respect [+cmd] when executing :drop #33339
Problem:
Normally, `:drop +41 foo.txt` will open foo.txt with the cursor on line
41. But if foo.txt is already open, it instead is a no-op, even if the
cursor is on a different line.

Steps to reproduce:

    nvim --clean foo.txt
    :drop +30 foo.txt

Solution:
Handle +cmd in ex_drop().
2025-04-08 05:54:32 -07:00
5b1561bb71 fix(display): scroll redrawing doesn't account for virt_lines above fold #33374
Problem:  Logic computing the new height of the modified area does not
          take into account virtual lines attached to a folded line.

Solution: Remove `hasFolding()` branch and let `plines_win_full()` do its job.
2025-04-08 05:47:18 -07:00
c0f46daca5 Merge pull request #33381 from zeertzjq/vim-9.1.1283
vim-patch:9.1.{1253,1283,1287}
2025-04-08 13:24:43 +08:00
454abde1aa vim-patch:9.1.1287: quickfix code can be further improved
Problem:  quickfix code can be further improved (after v9.1.1283)
Solution: slightly refactor quickfix.c (Hirohito Higashi)

- remove error message output
- adjust comments
- rename functions:
  - qf_init_quickfix_stack() --> qf_init_stack()
  - qf_resize_quickfix_stack() --> qf_resize_stack()
  - qf_resize_stack() --> qf_resize_stack_base()

Now qf_alloc_stack() can handle both quickfix/location lists.

closes: vim/vim#17068

adcfb6caeb

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-04-08 13:06:20 +08:00
00eff4b196 vim-patch:9.1.1283: quickfix stack is limited to 10 items
Problem:  quickfix and location-list stack is limited to 10 items
Solution: add the 'chistory' and 'lhistory' options to configure a
          larger quickfix/location list stack
          (64-bitman)

closes: vim/vim#16920

88d41ab270

Co-authored-by: 64-bitman <60551350+64-bitman@users.noreply.github.com>
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-04-08 13:06:19 +08:00
36d143e707 vim-patch:9.1.1253: abort when closing window with attached quickfix data
Problem:  If win_close() is called with a window that has quickfix stack
          attached to it, the corresponding quickfix buffer will be
          closed and freed after the buffer was already closed. At that
          time curwin->w_buffer points to NULL, which the CHECK_CURBUF
          will catch and abort if ABORT_ON_ERROR is defined
Solution: in wipe_qf_buffer() temporarily point curwin->w_buffer back to
          curbuf, the window will be closed anyhow, so it shouldn't
          matter that curbuf->b_nwindows isn't incremented.

closes: vim/vim#16993
closes: vim/vim#16985

ce80c59bfd

Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-04-08 13:06:19 +08:00
8af9f8ab5e vim-patch:9.1.1286: filetype: help files not detected when 'iskeyword' includes ":" (#33377)
Problem:  Help files not detected when 'iskeyword' includes ":".
Solution: Do not use \< and \> in the pattern (zeertzjq).

fixes: vim/vim#17069
closes: vim/vim#17071

e370141bf4
2025-04-08 00:13:12 +00:00
1ffc7d6bf8 vim-patch:2ffb4d0: runtime(lua): fix whitespace style issues in lua ftplugin (#33378)
related: vim/vim#17049

2ffb4d0298

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-04-08 08:07:26 +08:00
2c960e8f04 ci(deps): bump lua-language-server to 3.14.0 2025-04-07 17:30:08 +02:00
ca16b54c86 fix(decor): enable decoration provider in on_start #33337
Problem:  An on_win-disabled decoration provider is left disabled for
          the on_buf callback during the next redraw (if the provider
          does not subscribe to on_end).

Solution: Move re-activation of the provider from after the on_end
          callback to before the on_start callback.
2025-04-07 03:58:18 -07:00
cf59631f65 fix(treesitter): not refreshing virtualtext contents #33361
Problem: In some cases, when treesitter is enabled, deleting a
line below virtualtext will not refresh all updated lines.
https://github.com/neovim/neovim/issues/33358

Solution: Revert a part of https://github.com/neovim/neovim/pull/31324
to ensure that the full range (with virtual lines) is refreshed.
2025-04-07 03:56:40 -07:00
666a82374d docs: PR template #33109 2025-04-07 03:15:55 -07:00
12720e929d build(deps): bump luajit to e0a7ea8a9 2025-04-07 12:01:45 +02:00
bd37348939 fix(health): expecting nonexistent "inotifywait" function #33312
Problem:
55e4301036 changed the program name but not the function name.

Solution:
Fix the healthcheck.
2025-04-07 02:13:05 -07:00
3ebde5ea14 fix(defaults): keywordprg=:help on Windows #33336
Problem:
As `:h kp` says, the default value for keywordprg
should be ':help' on Windows. It is currently
always ':Man'.

Solution:
Add condition to options.lua which sets keywordprg
to ':help' if running on windows.
2025-04-07 02:07:31 -07:00
1e9e523521 vim-patch:00b927b: runtime(lua): improve foldexpr, add vim9 script version
closes: vim/vim#17049

00b927b295

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2025-04-07 10:19:00 +02:00
5e192dbce2 vim-patch:9cd6d82: runtime(fstab): set formatoptions-=t in filetype plugin
closes: vim/vim#17020

9cd6d82fbb

Co-authored-by: Radu Dineiu <radu.dineiu@gmail.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-04-07 10:19:00 +02:00
1867f2a830 vim-patch:9adb310: runtime(svelte): add matchit support to svelte filetype plugin
closes: vim/vim#17052

9adb310cf3

Co-authored-by: 231tr0n <zeltronsrikar@gmail.com>
2025-04-07 10:19:00 +02:00
2d11b981bf ci: bump actions/create-github-app-token from 1 to 2
Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 1 to 2.
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](https://github.com/actions/create-github-app-token/compare/v1...v2)

---
updated-dependencies:
- dependency-name: actions/create-github-app-token
  dependency-version: '2'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-06 11:20:06 +02:00
fece489794 refactor(lsp): deprecate client_is_stopped #33342
Problem:
`client_is_stopped(…)` is an alias for `not get_client_by_id(…)`.
And it's not used anywhere in our codebase.

Solution:
Deprecate it.
2025-04-06 02:13:13 +00:00
28e8190185 fix(vim.hl): nvim_buf_del_extmark on invalid buffer #33331
Problem:
nvim_buf_del_extmark error if buffer is destroyed before timer stops

Solution:
check nvim_buf_is_valid.
2025-04-05 15:56:40 -07:00
f9dec1228d build: bump NVIM_API_LEVEL #33340
Bumping NVIM_API_LEVEL is pretty much required after every major
release, because it's also used to correlated Lua stdlib changes to
a Nvim version.
2025-04-05 22:48:28 +00:00
57d99a515f docs: clipboard, eval #33223 2025-04-05 06:01:40 -07:00
e8785c2e94 vim-patch:9.1.1276: inline word diff treats multibyte chars as word char (#33323)
Problem:  inline word diff treats multibyte chars as word char
          (after 9.1.1243)
Solution: treat all non-alphanumeric characters as non-word characters
          (Yee Cheng Chin)

Previously inline word diff simply used Vim's definition of keyword to
determine what is a word, which leads to multi-byte character classes
such as emojis and CJK (Chinese/Japanese/Korean) characters all
classifying as word characters, leading to entire sentences being
grouped as a single word which does not provide meaningful information
in a diff highlight.

Fix this by treating all non-alphanumeric characters (with class number
above 2) as non-word characters, as there is usually no benefit in using
word diff on them. These include CJK characters, emojis, and also
subscript/superscript numbers. Meanwhile, multi-byte characters like
Cyrillic and Greek letters will still continue to considered as words.

Note that this is slightly inconsistent with how words are defined
elsewhere, as Vim usually considers any character with class >=2 to be
a "word".

related: vim/vim#16881 (diff inline highlight)
closes: vim/vim#17050

9aa120f7ad

Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2025-04-05 09:42:00 +08:00
1e1384b6dd vim-patch:b8d5c85: runtime(doc): update WinScrolled documentation (#33322)
closes: vim/vim#17036

b8d5c85099

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-04-05 08:02:32 +08:00
a8edf6e445 feat(lsp.util): deprecate vim.lsp.util.stylize_markdown
It's not used anywhere.
2025-04-04 14:34:33 +01:00
379c37fa0b fix: bug in stylize_markdown
`stripped` and `markdown_lines` are iterated together so must have the same length.
2025-04-04 14:33:50 +01:00