Commit Graph

8005 Commits

Author SHA1 Message Date
zeertzjq
5be5928771 test(ui/popupmenu_spec): make highlights more consistent 2024-07-27 21:42:31 +08:00
Maria José Solano
8bdfc2ab2b fix(version): return nil with empty string 2024-07-27 14:06:31 +01:00
glepnir
bc8a776ef8 vim-patch:9.1.0619: tests: test_popup fails
Problem:  tests: test_popup fails
          (after v9.1.0618)
Solution: Correct test, move combining extra attributes to
          pum_compute_text_attrs() (glepnir)

closes: vim/vim#15353

8754efe437

Co-authored-by: glepnir <glephunter@gmail.com>
2024-07-27 18:10:33 +08:00
glepnir
f132f8e9d4 vim-patch:9.1.0618: cannot mark deprecated attributes in completion menu
Problem:  cannot mark deprecated attributes in completion menu
Solution: add hl_group to the Dictionary of supported completion fields
          (glepnir)

closes: vim/vim#15314

508e7856ec

Co-authored-by: glepnir <glephunter@gmail.com>
2024-07-27 18:05:37 +08:00
zeertzjq
60967cd9aa
vim-patch:9.1.0616: filetype: Make syntax highlighting off for MS Makefiles (#29874)
Problem:  filetype: Make syntax highlighting off for MS Makefiles
Solution: Try to detect MS Makefiles and adjust syntax rules to it.
          (Ken Takata)

Highlighting of variable expansion in Microsoft Makefile can be broken.
E.g.:
2979cfc262/src/Make_mvc.mak (L1331)

Don't use backslash as escape characters if `make_microsoft` is set.
Also fix that `make_no_comments` was not considered if `make_microsoft`
was set.

Also add description for `make_microsoft` and `make_no_comments` to the
documentation and include a very simple filetype test

closes: vim/vim#15341

eb4b903c9b

Co-authored-by: Ken Takata <kentkt@csc.jp>
2024-07-27 16:48:29 +08:00
zeertzjq
0dfcf3fe12
fix(plines): don't count invalidated virt text in char size (#29863)
Also:
- Remove mt_end() and MT_FLAG_DECOR_VIRT_TEXT_INLINE checks, as they are
  already checked by marktree_itr_check_filter().
- Move ns_in_win() to the last check in decor_redraw_col().
2024-07-26 02:01:12 +00:00
luukvbaal
5af9c065ad
fix(decor): don't draw invalidated virtual lines (#29858) 2024-07-26 09:04:17 +08:00
zeertzjq
41106168a2
vim-patch:8.2.3543: swapname has double slash when 'directory' ends in it (#29862)
Problem:    Swapname has double slash when 'directory' ends in double slash.
            (Shane Smith)
Solution:   Remove the superfluous slash. (closes vim/vim#8876)

8b0e62c93b

The test got lost in #29758...

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-26 00:09:47 +00:00
luukvbaal
dd61be59af
vim-patch:9.1.0617: Cursor moves beyond first line of folded end of buffer (#29859)
Problem:  Cursor moves beyond start of a folded range at the end of a buffer.
Solution: Move cursor to start of fold when going beyond end of buffer.
          Check that cursor moved to detect FAIL in outer cursor function.
          (Luuk van Baal)

dc373d456b
2024-07-26 06:32:54 +08:00
Christian Clason
807eb4434c vim-patch:9.1.0612: filetype: deno.lock file not recognized
Problem:  filetype: deno.lock file not recognized
Solution: detect 'deno.lock' as json filetype
          (カワリミ人形)

Reference:
https://docs.deno.com/runtime/manual/basics/modules/integrity_checking/#caching-and-lock-files

closes: vim/vim#15333

df77c8ad39

Co-authored-by: カワリミ人形 <kawarimidoll+git@gmail.com>
2024-07-25 10:01:46 +02:00
Gregory Anders
b02c839414
fix(tui): set id parameter in OSC 8 sequences (#29840)
The id parameter is used to communicate to the terminal that two URLs
are the same. Without an id, the terminal must rely on heuristics to
determine which cells belong together to make a single hyperlink.

See the relevant section in the spec [1] for more details.

[1]: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#hover-underlining-and-the-id-parameter
2024-07-24 09:04:09 -05:00
Christian Clason
862338255d fix(runtime): sync bundled treesitter queries 2024-07-24 16:02:53 +02:00
Gregory Anders
79d492a421
vim-patch:9.1.0610: filetype: OpenGL Shading Language files are not detected (#29831)
Problem:  filetype: OpenGL Shading Language files are not detected
Solution: detect various file extensions as GLSL filetype, include
          indent and syntax script, do no longer recognize '*.comp'
          as Mason filetype (Gregory Anders)

closes: vim/vim#15317

e4b991ed36
2024-07-23 06:28:05 +08:00
bfredl
7381f0a1d5
Merge pull request #29650 from ruuzia/fix_expression_parser_crash
fix: assert failure in VimL expression parser
2024-07-21 16:29:16 +02:00
bfredl
cbb46ac4fa
Merge pull request #28873 from luukvbaal/redraw
fix(api): alloc and draw cursor window in nvim__redraw
2024-07-21 16:04:59 +02:00
Luuk van Baal
89f9f168a5 fix(api): alloc and draw cursor window in nvim__redraw
Problem:  Unable to move cursor to recently opened window.
Solution: Make sure uninitialized window is drawn before trying to move
          the cursor to it.
2024-07-20 14:53:42 +02:00
Luuk van Baal
012db2b0f5 fix(marks): revalidate marks whose position did not change
Problem:  Marks whose position did not change with the action that
          invalidated them (right_gravity = false) are not revalidated
          upon undo.
Solution: Remove early return when restoring a marks saved position so
          that it is still revalidated. Add "move" guards instead.
2024-07-20 14:52:39 +02:00
Christian Clason
2a24d0a435 vim-patch:9.1.0603: filetype: use correct extension for Dracula
Problem:  pattern detection for Dracula language uses "*lvs" and "*lpe".
          as there is no dot, those are not treated as extensions which
          they should (judging by 'runtime/syntax/dracula.vim' and
          common sense).
Solution: use "*.lvs" and "*.lpe" patterns (Evgeni Chasnovski)

closes: vim/vim#15303

5fb801a74f

Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
2024-07-19 17:28:48 +02:00
zeertzjq
f67a7365af vim-patch:9.1.0602: filetype: Prolog detection can be improved
Problem:  filetype: Prolog detection can be improved
Solution: update the prolog detection regex
          (igna_martinoli)

related: vim/vim#10835
related: vim/vim#15206
closes: vim/vim#15253

37853b7de3

N/A patch:

vim-patch:7347642: runtime(filetype): Fix Prolog file detection regex

Problem: filetype: .pro file detection for Prolog is broken
Solution: fixed the regex to only match on the tested
          cases (igna_martinoli)

fixes: vim/vim#10835
closes: vim/vim#15206

7347642633

Co-authored-by: igna_martinoli <ignamartinoli@protonmail.com>
Co-authored-by: clason <c.clason@uni-graz.at>
2024-07-19 14:42:02 +08:00
zeertzjq
44f871a3cb vim-patch:9.1.0558: filetype: prolog detection can be improved
Problem:  filetype: prolog detection can be improved
Solution: Improved the Prolog file detection regex and added tests for
          all cases. (igna_martinoli)

fixes: vim/vim#10835
closes: vim/vim#15206

50dc83cf92

Only include the tests, as code changes are superseded by later patches.

Co-authored-by: igna_martinoli <ignamartinoli@protonmail.com>
2024-07-19 14:42:02 +08:00
zeertzjq
35b35cb93c
vim-patch:9.1.0601: Wrong cursor position with 'breakindent' when wide char doesn't fit (#29793)
Problem:  Wrong cursor position with 'breakindent' when a double-width
          character doesn't fit in a screen line (mikoto2000)
Solution: Include the width of the 'breakindent' properly.
          (zeertzjq)

fixes: vim/vim#15289
closes: vim/vim#15290

b5d6b5caac
2024-07-19 03:54:42 +00:00
zeertzjq
0b710c8e55
vim-patch:9.1.0599: Termdebug: still get E1023 when specifying arguments (#29794)
Problem:  Termdebug: still get E1023 when specifying arguments and using
          a prompt buffer.
Solution: Use empty() instead of len().  Add a test.  Fix wrong order of
          arguments to assert_equal() in Test_termdebug_basic().
          (zeertzjq)

closes: vim/vim#15288

aef6179bcf
2024-07-19 03:48:13 +00:00
Christian Clason
c69ea53c9d
vim-patch:9.1.0596: filetype: devscripts config files are not recognized (#29773)
Problem:  filetype: Debian devscripts config files are not recognized
Solution: detect devscripts.conf and .devscripts files as sh filetype
          (sourced by /bin/sh)

closes: vim/vim#15227

76c19028ff

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-07-18 07:13:16 +00:00
Rustum Zia
6720bd440f fix: assert failure in VimL expression parser 2024-07-17 23:37:59 -04:00
zeertzjq
185b22720d
vim-patch:9.0.0003: functions are global while they could be local (#29777)
Problem:    Functions are global while they could be local.
Solution:   Add "static".  Add a few tests. (Yegappan Lakshmanan,
            closes vim/vim#10612)

ee47eaceaa

Omit script_name_after_autoload(), untrans_function_name(): Vim9 script
only.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2024-07-17 23:47:20 +00:00
zeertzjq
286f7ef8a8 vim-patch:partial:8.2.2571: test may leave file behind
Problem:    Test may leave file behind.
Solution:   Delete the temporary file.  Don't profile in the running Vim
            instance.

8c801b374b

This only includes test_quickfix.vim changes.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-18 07:00:07 +08:00
zeertzjq
005f6e1076 vim-patch:partial:8.2.1432: various inconsistencies in test files
Problem:    Various inconsistencies in test files.
Solution:   Add modelines where they were missing.  Use Check commands instead
            of silently skipping over tests.  Adjust indents and comments.
            (Ken Takata, closes vim/vim#6695)

6d91bcb4d2

This only includes test_quickfix.vim changes.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-18 07:00:04 +08:00
zeertzjq
bbe51ef016
vim-patch:9.1.0594: Unnecessary redraw when setting 'winfixbuf' (#29775)
Problem:  Unnecessary redraw when setting 'winfixbuf'.
Solution: Remove P_RWIN flag. (zeertzjq)

closes: vim/vim#15283

ac4ce9e15b
2024-07-18 06:45:26 +08:00
zeertzjq
457ab65ff3 vim-patch:9.0.1257: code style is not check in test scripts
Problem:    Code style is not check in test scripts.
Solution:   Add basic code style check for test files.

94722c5107

Use Test_test_files() from latest Vim.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-18 06:18:03 +08:00
zeertzjq
f17d819330 vim-patch:partial:9.0.0719: too many delete() calls in tests
Problem:    Too many delete() calls in tests.
Solution:   Use deferred delete where possible.

56564964e6

This includes all changes expect changes in test_startup.vim.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-18 06:18:02 +08:00
Amit Singh
e29f245a10
fix(lsp): inlay hints are rendered in the correct order (#29707)
Problem:
When there are multiple inlay hints present at the same position, they
should be rendered in the order they are received in the response from
LSP as per the LSP spec. Currently, this is not respected.

Solution:
Gather all hints for a given position, and then set it in a single
extmark call instead of multiple set_extmark calls. This leads to fewer
extmark calls and correct inlay hints being rendered.
2024-07-17 16:44:53 +02:00
zeertzjq
bc2bd25f8e
test: fix reporting "no flush received" too early (#29735) 2024-07-17 22:39:25 +08:00
zeertzjq
5d7fd74397
vim-patch:8.1.1588: in :let-heredoc line continuation is recognized (#29767)
Problem:    In :let-heredoc line continuation is recognized.
Solution:   Do not consume line continuation. (Ozaki Kiichi, closes vim/vim#4580)

e96a2498f9

Nvim already sets may_garbage_collect to false in nv_event(), so the
timer change isn't needed.
Other changes have already been ported.
Also fix incorrect port of test in patch 8.1.1356.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-17 12:06:59 +00:00
Christian Clason
8e590cae83 vim-patch:9.1.0593: filetype: Asymptote files are not recognized
Problem:  filetype: Asymptote files are not recognized
Solution: detect '*.asy' files as asy filetype, include
          ftplugin and syntax plugin (AvidSeeker).

Reference: https://asymptote.sourceforge.io/

closes: vim/vim#15252

3088ef094d

Co-authored-by: AvidSeeker <avidseeker7@protonmail.com>
2024-07-17 11:11:58 +02:00
Christian Clason
61ea466591 vim-patch:9.1.0592: runtime: filetype: Mediawiki files are not recognized
Problem:  filetype: Mediawiki files are not recognized
Solution: detect "*.mw" and "*.wiki" as mediawiki filetype,
          include basic syntax and filetype plugins.
          (AvidSeeker)

closes: vim/vim#15266

b5844104ab

Co-authored-by: AvidSeeker <avidseeker7@protonmail.com>
2024-07-17 11:11:58 +02:00
Christian Clason
4a7371c714 vim-patch:9.1.0591: filetype: *.wl files are not recognized
Problem:  filetype: *.wl files are not recognized
Solution: Detect '*.wl' files as Mathematica package files
          (Jonas Dujava)

closes: vim/vim#15269

c6d7dc0393

Co-authored-by: Jonas Dujava <jonas.dujava@gmail.com>
2024-07-17 11:11:58 +02:00
zeertzjq
79002cf438
vim-patch:8.2.2656: some command line arguments and regexp errors not tested (#29761)
Problem:    Some command line arguments and regexp errors not tested.
Solution:   Add a few test cases. (Dominique Pellé, closes vim/vim#8013)

a2b3e7dc92

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-17 03:33:45 +00:00
zeertzjq
e83949f96c vim-patch:9.0.0414: matchstr() still does not match column offset
Problem:    matchstr() still does not match column offset when done after a
            text search.
Solution:   Only use the line number for a multi-line search.  Fix the test.
            (closes vim/vim#10938)

753aead960

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-17 11:04:55 +08:00
zeertzjq
ccdbab7810 vim-patch:9.0.0407: matchstr() does match column offset
Problem:    matchstr() does match column offset. (Yasuhiro Matsumoto)
Solution:   Accept line number zero. (closes vim/vim#10938)

75a115e8d6

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-17 11:04:55 +08:00
zeertzjq
dce615bc42 vim-patch:9.0.0228: crash when pattern looks below the last line
Problem:    Crash when pattern looks below the last line.
Solution:   Consider invalid lines to be empty. (closes vim/vim#10938)

13ed494bb5

Comment out the test as it uses Vim9 script and text properties.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-17 11:04:50 +08:00
zeertzjq
8f890f74b6 test(old): reorder test_regexp_latin.vim to match upstream 2024-07-17 10:50:19 +08:00
zeertzjq
4025c2aa5f
vim-patch:8.2.0281: two placed signs in the same line are not combined (#29757)
Problem:    Two placed signs in the same line are not combined.  E.g. in the
            terminal debugger a breakpoint and the PC cannot be both be
            displayed.
Solution:   Combine the sign column and line highlight attributes.

a2f6e42ded

Nvim already does this in decor_redraw_signs().

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-17 01:20:41 +00:00
luukvbaal
f9a49fab0c
fix(column): modifying a sign should update placed signs (#29750)
Problem:  Modifying a sign no longer updates already placed signs.
Solution: Loop over (newly-exposed) placed decorations when modifying a
          sign definition. Update placed decor if it belongs to the sign
          that is modified.
2024-07-17 08:53:10 +08:00
Maria José Solano
5fe4ce6678
fix(snippet): modify base indentation when there's actually whitespace (#29670) 2024-07-16 19:30:22 +02:00
altermo
118ae7e5ed fix(tohtml): support ranges again 2024-07-16 15:07:40 +02:00
zeertzjq
7e5c5b4d85 vim-patch:8.2.1659: spellfile code not completely tested
Problem:    Spellfile code not completely tested.
Solution:   Add a few more test cases. (Yegappan Lakshmanan, closes vim/vim#6929)

96fdf4348a

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-16 15:25:10 +08:00
zeertzjq
10fa9c8039 vim-patch:8.2.1651: spellfile code not completely tested
Problem:    Spellfile code not completely tested.
Solution:   Add a few more test cases. (Yegappan Lakshmanan, closes vim/vim#6918)

64e2db6dc6

Fix incorrect spellfile message.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-16 15:25:10 +08:00
zeertzjq
0bbccf7c5f
vim-patch:8.2.3381: crash when using NULL list with sign functions (#29740)
Problem:    Crash when using NULL list with sign functions.
Solution:   Handle a NULL list like an empty list. (issue vim/vim#8260)

5c56da4de8

Nvim's TV_LIST_ITER_MOD() already checks for NULL.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-16 15:24:32 +08:00
zeertzjq
e84a4c5a98 vim-patch:9.0.0393: signals test often fails on FreeBSD
Problem:    Signals test often fails on FreeBSD.
Solution:   Use separate files for Suspend and Resume. (Ken Takata,
            closes vim/vim#11065)

a9480dbc8c

Co-authored-by: K.Takata <kentkt@csc.jp>
2024-07-16 14:41:02 +08:00
zeertzjq
a35eda36c3 vim-patch:8.2.5158: TSTP and INT signal tests are not run with valgrind
Problem:    TSTP and INT signal tests are not run with valgrind.
Solution:   Sleep a bit longer. (closes vim/vim#10614)

61e3784819

Cherry-pick Test_signal_TSTP() from patch 8.2.3941.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-16 14:40:14 +08:00
zeertzjq
76aede1162 vim-patch:8.2.2276: list of distributed files is outdated
Problem:    List of distributed files is outdated.
Solution:   Update the file list.  Minor comment updates.

a72514945b

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-16 14:38:04 +08:00
zeertzjq
598fd77d95
vim-patch:8.2.0183: tests fail when the float feature is disabled (#29738)
Problem:    Tests fail when the float feature is disabled.
Solution:   Skip tests that don't work without float support.

5feabe00c4

Cherry-pick Test_ruby_Vim_blob() from patch 8.1.0977 and skip it.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-16 06:25:35 +00:00
zeertzjq
37c7c7547a
vim-patch:8.1.1106: no test for 'writedelay' (#29736)
Problem:    No test for 'writedelay'.
Solution:   Add a test.

449ac47f93

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-16 05:39:20 +00:00
zeertzjq
a553b36876
vim-patch:7.4.1565 (#29734)
Problem:    Crash when assert_equal() runs into a NULL string.
Solution:   Check for NULL. (Dominique) Add a test.

f155196444

Use the latest version of the test from Vim.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-16 03:44:17 +00:00
zeertzjq
24bd7a4a9c vim-patch:8.2.3579: CI sometimes fails for MinGW
Problem:    CI sometimes fails for MinGW.
Solution:   Use backslashes in HandleSwapExists(). (Christian Brabandt,
            closes vim/vim#9078)

4b2c804767

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-07-16 10:56:37 +08:00
zeertzjq
1bf9a7ce95 vim-patch:8.2.3311: Vim9: check for DO_NOT_FREE_CNT is very slow
Problem:    Vim9: check for DO_NOT_FREE_CNT is very slow.
Solution:   Move to a separate function so it can be skipped by setting
            $TEST_SKIP_PAT.

dae453f339

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-16 10:56:37 +08:00
zeertzjq
594c7f3d77
fix(ui): avoid ambiguity about last chunk when flushing halfway (#29718) 2024-07-15 18:35:20 +08:00
zeertzjq
15a0977ffc vim-patch:9.1.0585: tests: test_cpoptions leaves swapfiles around
Problem:  tests: test_cpoptions leaves swapfiles around
Solution: Use :bw! instead of :close!

bb5d27dc79

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-07-15 06:16:31 +08:00
zeertzjq
7214fd8f55 vim-patch:partial:9.0.0418: manually deleting temp test files
Problem:    Manually deleting temp test files.
Solution:   Use the 'D' flag of writefile() and mkdir().

45bbaef038

This only includes test_cpoptions.vim changes.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-15 06:03:58 +08:00
Christian Clason
79130c0fd3 vim-patch:9.1.0586: ocaml runtime files are outdated
Problem:  ocaml runtime files are outdated
Solution: sync those files with the upstream repo,
          detect a few more ocaml files
          (Yinzuo Jiang)

closes: vim/vim#15260

700cf8cfa1

Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
2024-07-14 23:55:57 +02:00
Christian Clason
60734dc761 vim-patch:9.1.0583: filetype: *.pdf_tex files are not recognized
Problem:  filetype: *.pdf_tex files are not recognized
Solution: Detect '*.pdf_tex' files as tex filetype
          (Jonas Dujava)

Those files are generated by inkscape, when exporting, see e.g.
https://inkscape.org/doc/inkscape-man.html

closes: vim/vim#15250

28145e005d

Co-authored-by: Jonas Dujava <jonas.dujava@gmail.com>
2024-07-14 12:21:11 +02:00
zeertzjq
c8401515cd vim-patch:9.1.0582: Printed line doesn't overwrite colon when pressing Enter in Ex mode
Problem:  Printed line no longer overwrites colon when pressing Enter in
          Ex mode (after 9.1.0573).
Solution: Restore the behavior of pressing Enter in Ex mode.
          (zeertzjq)

closes: vim/vim#15258

7d664bf0eb
2024-07-14 16:33:07 +08:00
zeertzjq
ba36742211 vim-patch:9.1.0574: ex: wrong handling of commands after bar
Problem:  ex: wrong handling of commands after bar
Solution: for :append, :insert and :change use the text after the bar
          as input for those commands. This is what POSIX requests.
          (Mohamed Akram)

See the POSIX Spec:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ex.html#tag_20_40_13_03
Section 12.c

closes: vim/vim#15229

8c446da349

Co-authored-by: Mohamed Akram <mohd.akram@outlook.com>
2024-07-14 13:39:40 +08:00
zeertzjq
9093fbdd02 vim-patch:9.1.0573: ex: no implicit print for single addresses
Problem:  ex: no implicit print for single addresses
Solution: explicitly print even during single addresses,
          as requested by POSIX (Mohamed Akram)

See the POSIX behaviour here:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ex.html#tag_20_40_13_03
Section 6b

closes: vim/vim#15230

c25a7084e9

Co-authored-by: Mohamed Akram <mohd.akram@outlook.com>
2024-07-14 13:39:40 +08:00
zeertzjq
49ba36becd
vim-patch:9.1.0580: :lmap mapping for keypad key not applied when typed in Select mode (#29693)
Problem:  An :lmap mapping for a printable keypad key is not applied
          when typing it in Select mode.
Solution: Change keypad key to ASCII after setting vgetc_char.
          (zeertzjq)

closes: vim/vim#15245

90a800274d
2024-07-14 06:50:36 +08:00
zeertzjq
3700d94c6f vim-patch:9.1.0579: Ex command is still executed after giving E1247
Problem:  Ex command is still executed after giving E1247.
Solution: Indicate the error properly and set cmd to NULL.
          (zeertzjq)

closes: vim/vim#15241

d1b5ea984d
2024-07-14 06:12:42 +08:00
zeertzjq
5531c95101 vim-patch:8.2.4065: computation overflow with large cound for :yank
Problem:    Computation overflow with large cound for :yank.
Solution:   Avoid an overflow.

3cf21b3051

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-14 06:12:42 +08:00
zeertzjq
6276fce11e test(old): enable Test_address_line_overflow()
Nvim doesn't use atol() in getdigits() and doesn't need to check for
size of long.
2024-07-14 06:12:42 +08:00
zeertzjq
c31f64dd4d vim-patch:9.1.0577: Unnecessary checks for v:sizeoflong in test_put.vim
Problem:  Unnecessary checks for v:sizeoflong in test_put.vim.  They are
          no longer necessary as patch 8.2.3661 has changed the count to
          be within 32-bit integer limit.
Solution: Remove the checks (zeertzjq).

closes: vim/vim#15239

69a28f6c08
2024-07-14 06:12:41 +08:00
bfredl
eab535e10e
Merge pull request #29315 from bfredl/staticinline
refactor(declarations): also generate prototypes for functions in headers
2024-07-13 17:22:59 +02:00
Amit Singh
970a27927e
fix(lua)!: do not use typed table for empty dict
Problem:
Empty dictionaries are converted into typed tables of the form `{ [true]
= 6}` instead of an empty dictionary representation `{}`. This leads to
incorrect table representation, along with failure in JSON encoding of
such tables as currently tables with only string and number type keys
can be encoded.

Solution:
The typed table logic has been removed from `nlua_push_Dictionary`. The
typed table logic is required only for float value conversions which is
already handled in `nlua_push_Float`. So, it is(was) no longer required
here.

Fixes neovim/neovim#29218
2024-07-13 16:42:28 +05:30
bfredl
7dffc36e61 refactor(declarations): also generate prototypes for functions in headers
Before this change, "static inline" functions in headers needed to have
their function attributes specified in a completely different way. The
prototype had to be duplicated, and REAL_FATTR_ had to be used instead
of the public FUNC_ATTR_ names.

TODO: need a check that a "header.h.inline.generated.h" file is not
forgotten when the first "static inline" function with attributes
is added to a header (they would just be silently missing).
2024-07-13 12:30:49 +02:00
zeertzjq
b1aa8f5eb8
vim-patch:9.1.0572: cannot specify tab page closing behaviour (#29682)
Problem:  cannot specify tab page closing behaviour
          (Gianluca Pacchiella)
Solution: Add the 'tabclose' option (LemonBoy).

fixes: vim/vim#5967
closes: vim/vim#15204

5247b0b92e

Co-authored-by: LemonBoy <thatlemon@gmail.com>
2024-07-13 08:56:58 +08:00
zeertzjq
16f63b964f
fix(input): handle vim.on_key() properly with ALT and K_SPECIAL (#29677) 2024-07-13 04:14:29 +08:00
zeertzjq
028dd3c5c4
vim-patch:9.1.0569: fnamemodify() treats ".." and "../" differently (#29673)
Problem:  fnamemodify() treats ".." and "../" differently.
Solution: Expand ".." properly like how "/.." is treated in 8.2.3388.
          (zeertzjq)

closes: vim/vim#15218

1ee7420460
2024-07-12 14:30:49 +08:00
zeertzjq
83f42aa450 vim-patch:9.1.0568: Cannot expand paths from 'cdpath' setting
Problem:  Cannot expand paths from 'cdpath' setting
          (Daniel Hahler)
Solution: Implement 'cdpath' completion, add the new 'dir_in_path'
          completion type (LemonBoy)

fixes vim/vim#374
closes: vim/vim#15205

a20bf69a3b

Co-authored-by: LemonBoy <thatlemon@gmail.com>
2024-07-12 07:39:36 +08:00
zeertzjq
f1827d877d vim-patch:partial:9.0.0418: manually deleting temp test files
Problem:    Manually deleting temp test files.
Solution:   Use the 'D' flag of writefile() and mkdir().

45bbaef038

This only includes test_cd.vim changes.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-12 07:30:21 +08:00
zeertzjq
a61666293d vim-patch:partial:9.0.0323: using common name in tests leads to flaky tests
Problem:    Using common name in tests leads to flaky tests.
Solution:   Rename files and directories to be more specific.

3b0d70f4ff

This only includes test_cd.vim changes.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-12 07:30:21 +08:00
zeertzjq
80818641f3 vim-patch:9.1.0567: Cannot use relative paths as findfile() stop directories
Problem:  Cannot use relative paths as findfile() stop directories.
Solution: Change a relative path to an absolute path.
          (zeertzjq)

related: vim/vim#15200
closes: vim/vim#15202

764526e279
2024-07-12 06:49:43 +08:00
zeertzjq
091a130804 vim-patch:9.1.0566: Stop dir in findfile() doesn't work properly w/o trailing slash
Problem:  Stop directory in findfile() doesn't work properly without a
          trailing slash.
Solution: Always use fnamencmp(), not fnamecmp().

related: vim/vim#15200
related: vim/vim#15202

e6ab23bd4a
2024-07-12 06:49:38 +08:00
zeertzjq
50feb85b0c vim-patch:9.1.0565: Stop directory doesn't work properly in 'tags'
Problem:  Stop directory doesn't work properly in 'tags'.
          (Jesse Pavel)
Solution: Also move the stop directory forward by one byte.
          (zeertzjq)

This doesn't support relative stop directories yet, as they are not
supported in other places like findfile() either.

fixes: vim/vim#15200
related: vim/vim#15202

68819afb2c
2024-07-12 06:49:35 +08:00
zeertzjq
2c9e82e193 vim-patch:partial:9.0.0323: using common name in tests leads to flaky tests
Problem:    Using common name in tests leads to flaky tests.
Solution:   Rename files and directories to be more specific.

3b0d70f4ff

This only includes test_findfile.vim changes.

vim-patch:9.1.0562: tests: inconsistency in test_findfile.vim

Problem:  tests: inconsistency in test_findfile.vim, it saves and
          restores 'shellslash', but doesn't actually set it
Solution: Set shellslash explicitly (zeertzjq)

closes: vim/vim#15217

e7b98ab96e

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-12 06:49:33 +08:00
zeertzjq
31d53cbb0f
vim-patch:8.2.3388: fnamemodify('path/..', ':p') differs from using 'path/../' (#29667)
Problem:    fnamemodify('path/..', ':p') differs from using 'path/../'.
Solution:   Include the "/.." in the directory name. (closes vim/vim#8808)

4eaef9979f

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-12 06:33:54 +08:00
zeertzjq
45b7a2c503
vim-patch:9.1.0557: moving in the buffer list doesn't work as documented (#29653)
Problem:  moving in the buffer list doesn't work as documented
          (SenileFelineS)
Solution: Skip non-help buffers, when run from normal buffers, else
          only move from help buffers to the next help buffer (LemonBoy)

As explained in the help section for :bnext and :bprev the commands
should jump from help buffers to help buffers (and from regular ones to
regular ones).

fixes: vim/vim#4478
closes: vim/vim#15198

893eeeb445

Co-authored-by: LemonBoy <thatlemon@gmail.com>
2024-07-11 08:02:59 +08:00
Christian Clason
afbe7736a4 vim-patch:9.1.0555: filetype: angular ft detection is still problematic
Problem:  filetype: angular ft detection is still problematic
          (after 9.1.0551)
Solution: detect htmlangular filetype only by inspecting the content,
          do not try to determine it from a generic name like
          '*.component.html'

For the reasons mentioned here:

https://github.com/vim/vim/pull/13594#issuecomment-1834465890

related: vim/vim#15190
related: vim/vim#13594
related: vim/vim#13604

c03f631b7b

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-07-11 00:41:40 +02:00
zeertzjq
07c1996c8a
vim-patch:9.1.0556: :bwipe doesn't remove file from jumplist of other tabpages (#29651)
Problem:  :bwipe doesn't remove file from jumplist and tagstack of other
          tabpages. Time complexity of mark_forget_file() is O(n^2) when
          removing all entries (after v9.1.0554)
Solution: Use FOR_ALL_TAB_WINDOWS().  Start the loops over the arrays
          from the end instead of the start (zeertzjq)

closes: vim/vim#15199

2e7d89b398
2024-07-11 06:26:22 +08:00
Christian Clason
17bc5af01b vim-patch:9.1.0553: filetype: *.mcmeta files are not recognized
Problem:  filetype: *.mcmeta files are not recognized
Solution: Detect '*.mcmeta' files as json filetype
          (Tomodachi94)

"pack.mcmeta" was added to the JSON tests because that is the most common
filename with that extension.

There are currently 34,000 instances of this file extension on GitHub:
https://github.com/search?q=path%3A*.mcmeta&type=code&p=2

.zip files with this extension have downloads in the millions on sites
like CurseForge:
https://www.curseforge.com/minecraft/search?page=1&pageSize=20&sortBy=relevancy&class=texture-packs

Further reading about the file extension:
https://minecraft.wiki/w/Tutorials/Creating_a_resource_pack#Creating_a_.MCMETA_file

closes: vim/vim#15189

d33a518025

Co-authored-by: Tomodachi94 <tomodachi94@protonmail.com>
2024-07-10 09:31:48 +02:00
Christian Clason
7fa089f463 vim-patch:9.1.0551: filetype: htmlangular files are not properly detected
Problem:  filetype: htmlangular files are not properly detected
Solution: Use the new htmlangular filetype for angular files, because
          since angular v17, those are no longer valid HTML files.
          (Dennis van den Berg)

Since Angular 17, the new Control Flow Syntax is not valid HTML. This PR
adds a new filetype detection for the HTML templates of Angular.

It first checks the filename. The Angular convention is to use
*.component.html for the template. However, this is not mandatory.

If the filename does not match, it will check the contents of the file
if it contains:

  - One of the Control-Flow blocks: @if, @for, @switch, @defer
  - A structural directive: *ngIf, *ngFor, *ngSwitch, *ngTemplateOutlet
  - Builtin Angular elements: ng-template or ng-content
  - String interpolation: {{ something }}

This enables the Angular LSP to attach only to htmlangular filetypes, as
well as language parsers, such as tree-sitter.

closes: vim/vim#15190

1ad194c0df

Co-authored-by: Dennis van den Berg <dennis.vandenberg@nedap.com>
2024-07-10 09:31:48 +02:00
Christian Clason
80530d07e7 vim-patch:9.1.0552: No test for antlr4 filetype
Problem:  No test for antlr4 filetype
          (after 9.1.0550)
Solution: Add a simple filename test

related: vim/vim#15191

8fc23bb8a4

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-07-10 09:31:48 +02:00
zeertzjq
158ffd646d
vim-patch:9.1.0554: :bw leaves jumplist and tagstack data around (#29639)
Problem:  :bw leaves jumplist and tagstack data around
          (Paul "Joey" Clark)
Solution: Wipe jumplist and tagstack references to the wiped buffer
          (LemonBoy)

As documented the :bwipeout command brutally deletes all the references
to the buffer, so let's make it delete all the entries in the jump list
and tag stack referring to the wiped-out buffer.

fixes: vim/vim#8201
closes: vim/vim#15185

4ff3a9b1e3

Co-authored-by: LemonBoy <thatlemon@gmail.com>
2024-07-10 10:35:12 +08:00
zeertzjq
545aafbeb8
vim-patch:9.1.0547: No way to get the arity of a Vim function (#29638)
Problem:  No way to get the arity of a Vim function
          (Austin Ziegler)
Solution: Enhance get() Vim script function to return the function
          argument info using get(func, "arity") (LemonBoy)

fixes: vim/vim#15097
closes: vim/vim#15109

48b7d05a4f

Co-authored-by: LemonBoy <thatlemon@gmail.com>
2024-07-10 08:07:16 +08:00
Christian Clason
51d85f7ea5
build(deps): drop unused bundled bash, python parsers and queries
Problem: Neovim bundles treesitter parsers for bash and python but does
not use them by default. This dilutes the messaging about the bundled
parsers being required for functionality or reasonable out-of-the-box
experience. It also increases the risk of query incompatibilities for no
gain.

Solution: Stop bundling bash and python parser and queries.
2024-07-09 15:26:48 +02:00
Christian Clason
bf92d423a9 vim-patch:9.1.0544: filetype: ldapconf files are not recognized
Problem:  filetype: ldapconf files are not recognized
Solution: Detect '.ldaprc', 'ldap.conf' and 'ldaprc' files as ldapconf
          filetype, include a simple ldapconf ftplugin file
          (Riley Bruins)

[Specification](https://www.openldap.org/software//man.cgi?query=ldap.conf&sektion=5&apropos=0&manpath=OpenLDAP+2.4-Release)

closes: vim/vim#15176

62f31e9499

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2024-07-08 11:03:51 +02:00
zeertzjq
73ae7d44a2
fix(quickfix): make shortmess+=O work with cmdheight=0 (#29609) 2024-07-08 10:36:41 +08:00
zeertzjq
76b91106fc
vim-patch:9.1.0543: Behavior of CursorMovedC is strange (#29608)
Problem:  Behavior of CursorMovedC is strange.
Solution: Also trigger when the cmdline has changed.
          (zeertzjq)

fixes: vim/vim#15069
closes: vim/vim#15071

8145620a95
2024-07-08 06:55:21 +08:00
zeertzjq
6a886a2511
vim-patch:9.1.0538: not possible to assign priority when defining a sign (#29592)
Problem:  not possible to assign priority when defining a sign
          (Mathias Fußenegger)
Solution: Add the priority argument for the :sign-define ex command and
          the sign_define() function (LemonBoy)

Use the specified value instead of the default one (SIGN_DEF_PRIO) when
no priority is explicitly specified in sign_place or :sign place.

fixes: vim/vim#8334
closes: vim/vim#15124

b975ddfdf9

Co-authored-by: LemonBoy <thatlemon@gmail.com>
2024-07-07 07:21:14 +08:00
Christian Clason
472b5b9b20 vim-patch:9.1.0536: filetype: zone files are not recognized
Problem:  filetype: zone files are not recognized
          (rpdprd)
Solution: Detect '*.zone' files as bindzone filetype

fixes: vim/vim#14222

f095539b39

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-07-07 00:36:40 +02:00
zeertzjq
5da9b49b19
vim-patch:9.1.0537: signed number detection for CTRL-X/A can be improved (#29590)
Problem:  signed number detection for CTRL-X/A can be improved
          (Chris Patuzzo)
Solution: Add the new "blank" value for the 'nrformat' setting. This
          will make Vim assume a signed number only if there is a blank
          in front of the sign.
          (distobs)

fixes: vim/vim#15033
closes: vim/vim#15110

25ac6d67d9

Co-authored-by: distobs <cuppotatocake@gmail.com>
2024-07-07 06:32:54 +08:00
zeertzjq
7a54d707fa
vim-patch:9.1.0534: completion wrong with fuzzy when cycling back to original (#29588)
Problem:  completion wrong with fuzzy when cycling back to original
          (Quan Nguyen)
Solution: reset show_match_ok when cp_score is zero (glepnir)

fixes: vim/vim#15095
closes: vim/vim#15105

65407ce1d2

Co-authored-by: glepnir <glephunter@gmail.com>
2024-07-06 22:44:37 +08:00
zeertzjq
bdc6e38781
fix(lua): don't include text after cursor in completion pattern (#29587) 2024-07-06 22:25:35 +08:00
Andreas Schneider
55e4301036
feat(lsp): drop fswatch, use inotifywait (#29374)
This patch replaces fswatch with inotifywait from inotify-toools:

https://github.com/inotify-tools/inotify-tools

fswatch takes ~1min to set up recursively for the Samba source code
directory. inotifywait needs less than a second to do the same thing.

https://github.com/emcrisostomo/fswatch/issues/321

Also it fswatch seems to be unmaintained in the meantime.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2024-07-06 11:44:19 +02:00
Zoltán Nyikos
b109b1abce
fix(glob): avoid subcapture nesting too deep error (#29520)
Use Cmt to evaluate Cond and Elem during match to avoid building the
nested capture structure later.
2024-07-06 11:40:08 +02:00
Christian Clason
0abaccb2a7 vim-patch:9.1.0532: filetype: Cedar files not recognized
Problem:  filetype: Cedar files not recognized
Solution: Detect '*.cedar' files as cedar filetype
          (Riley Bruins)

References: https://github.com/cedar-policy

closes: vim/vim#15148

15addb24dd

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2024-07-06 11:05:19 +02:00
Riley Bruins
9217e0d671 fix(treesitter): display fields for anonymous nodes in :InspectTree 2024-07-05 10:11:48 +02:00
zeertzjq
2a883d9c59
vim-patch:9.1.0524: the recursive parameter in the *_equal functions can be removed (#29572)
Problem:  the recursive parameter in the *_equal functions can be removed
Solution: Remove the recursive parameter in dict_equal(), list_equal()
          object_equal and tv_equal(). Use a comparison of the static
          var recursive_cnt == 0 to determine whether or not tv_equal()
          has been called recursively (Yinzuo Jiang).

closes: vim/vim#15070

7ccd1a2e85

Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
2024-07-05 15:20:02 +08:00
luukvbaal
3e6cec0bef
vim-patch:9.1.0526: Unwanted cursor movement with pagescroll at start of buffer (#29569)
Problem:  Cursor is moved to bottom of window trying to pagescroll when
          already at the start of the buffer (Asheq Imran, after v9.1.0357)
Solution: Don't move cursor when buffer content did not move.
          (Luuk van Baal)

8ccb89016e
2024-07-05 07:51:34 +08:00
zeertzjq
842725eedc
vim-patch:9.1.0525: Right release selects immediately when pum is truncated. (#29568)
Problem:  Right release selects immediately when pum is truncated.
Solution: Use pum_height instead of pum_size when checking click row.
          Don't place it above mouse row when there is more space below.
          (zeertzjq)

fixes: vim/vim#15101
closes: vim/vim#15102

761a420c66
2024-07-05 07:46:01 +08:00
zeertzjq
81d4e96bc8
fix(mouse): don't treat click on hsep as click on statusline (#29565)
This allows showing popup menu when right-clicking on hsep or cmdline.
2024-07-05 07:24:45 +08:00
zeertzjq
6cbba2b48d
vim-patch:9.1.0529: silent! causes following try/catch to not work (#29567)
Problem:  silent! causes following try/catch to not work
          (Malcolm Rowe)
Solution: consider emsg_silent in handle_did_throw() and do not abort
          evaluation flow for :silent! (LemonBoy)

The silent! flag causes the evaluation not to be aborted in case of
uncaught exceptions, adjust handle_did_throw to take this detail into
account.

Fixes the long-standing todo.txt item:
```
Problem that a previous silent ":throw" causes a following try/catch not
to work. (ZyX, 2013 Sep 28) With examples: (Malcolm Rowe, 2015 Dec 24)
Also see vim/vim#8487 for an example.
```

fixes: vim/vim#538
closes: vim/vim#15128

749ba0f6d9

Cherry-pick Test_deeply_nested_source() from patch 8.2.5169.

Co-authored-by: LemonBoy <thatlemon@gmail.com>
2024-07-05 07:10:30 +08:00
zeertzjq
033ea63b2f
refactor: add assertion for v_blob in tv_ptr() (#29554)
Also add test for using printf() and id() with a Blob.
2024-07-04 09:54:51 +08:00
Tyler Miller
7f33c1967b
fix(lua): use rawget() to get __call in vim.is_callable() (#29536)
Lua 5.1 uses a "raw get" to retrieve `__call` from a metatable to
determine if a table is callable. Mirror this behavior in
`vim.is_callable()`.
2024-07-04 06:36:00 +08:00
zeertzjq
599fc7cee4
test: starting and stopping treesitter highlight (#29546) 2024-07-03 08:40:55 +08:00
zeertzjq
d413038b4f
fix(treesitter): ensure syntaxset augroup exists (#29542)
Problem:
Error when calling vim.treesitter.start() and vim.treesitter.stop() in
init.lua.

Solution:
Ensure syntaxset augroup exists after loading synload.vim.
2024-07-03 07:40:42 +08:00
Sebastian Lyng Johansen
aec7f1979a
fix(lsp): fallback to label for completion items if all others are missing (#29522) 2024-07-02 18:27:51 +02:00
zeertzjq
e7020306a1
feat(jumplist): allow opting out of removing unloaded buffers (#29347)
Problem:  Cannot opt out of removing unloaded buffers from the jumplist.
Solution: Only enable that with "unload" flag in 'jumpoptions'.
2024-06-30 06:40:31 +08:00
dundargoc
aa6b9c677d refactor: use vim._with where possible
This mostly means replacing `nvim_buf_call` and `nvim_win_call` with
`vim._with`.
2024-06-28 19:58:31 +02:00
bfredl
46187117c9
Merge pull request #29483 from bfredl/nonbinary
refactor(typval)!: remove binary distinction of binary and nonbinary strings
2024-06-27 18:45:18 +02:00
Mathias Fußenegger
724d1110b1
fix(lsp): pre-filter matches on label if filterText is missing (#29491)
Although the built-in pum completion mechanism will filter anyway on the
next input it is odd if the initial popup shows entries which don't
match the current prefix.

Using fuzzy match on the label/prefix is compatible with
`completeopt+=fuzzy` and also doesn't seem to break postfix snippet
cases

Closes https://github.com/neovim/neovim/issues/29287
2024-06-27 12:20:00 +02:00
bfredl
bda63d5b97 refactor(typval)!: remove distinction of binary and nonbinary strings
This is a breaking change which will make refactor of typval and shada
code a lot easier. In particular, code that would use or check for
v:msgpack_types.binary in the wild would be broken. This appears to be
rarely used in existing plugins.

Also some cases where v:msgpack_type.string would be used to represent a
binary string of "string" type, we use a BLOB instead, which is
vimscripts native type for binary blobs, and already was used for BIN
formats when necessary.

msgpackdump(msgpackparse(data)) no longer preserves the distinction
of BIN and STR strings. This is very common behavior for
language-specific msgpack bindings. Nvim uses msgpack as a tool to
serialize its data. Nvim is not a tool to bit-perfectly manipulate
arbitrary msgpack data out in the wild.

The changed tests should indicate how behavior changes in various edge
cases.
2024-06-27 11:04:04 +02:00
dundargoc
76dd07e572
Merge pull request #29280 from echasnovski/with-owobogo
Add several updates to `vim._with` (tests, granular option contexts, `env` context)
2024-06-26 12:23:34 +02:00
Yinzuo Jiang
9e436251de
vim-patch:9.1.0516: need more tests for nested dicts and list comparison (#29481)
Problem:  need more tests for nested dicts and list comparison
Solution: Add tests for comparing deeply nested List/Dict values
          (Yegappan Lakshmanan)

closes: vim/vim#15081

88bbdb04c2

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2024-06-25 11:34:37 +08:00
Evgeni Chasnovski
cd53db2157
feat(lua): add context.env (environment variables) to vim._with() 2024-06-24 20:23:11 +03:00
Evgeni Chasnovski
07cc559cdf
feat(lua): update vim._with to allow more granular option contexts
Problem: with a single `context.options` there is no way for user to
  force which scope (local, global, both) is being temporarily set and
  later restored.

Solution: replace single `options` context with `bo`, `go`, `wo`, and
  `o`. Naming and implementation follows how options can be set directly
  with `vim.*` (like `vim.bo`, etc.).
  Options are set for possible target `win` or `buf` context.
2024-06-24 20:23:11 +03:00
Evgeni Chasnovski
f8795365de
test(lua): cover vim._with() with tests
Problem: `vim._with()` has many different use cases which are not
  covered with tests.

Solution: cover with tests. Some (many) test cases are intentionally
  marked as "pending" because they cover cases which don't work as
  expected at the moment (and fixing them requires specific knowledge of
  C codebase). Use them as a reference for future fixes.
  Also some of "can be nested" tests currently might pass only because
  the tested context doesn't work.
2024-06-24 20:23:11 +03:00
Tom Praschan
5581a95534
feat(lsp): vim.lsp.buf.format() supports textDocument/rangesFormatting #27323
While this relies on a proposed LSP 3.18 feature, it's fully backwards
compatible, so IMO there's no harm in adding this already.

Looks like some servers already support for this e.g.
- gopls: https://go-review.googlesource.com/c/tools/+/510235
- clangd: https://github.com/llvm/llvm-project/pull/80180

Fixes #27293
2024-06-24 07:54:56 -07:00
Riley Bruins
c57a85e0ed perf(treesitter): remove unnecessary foldexpr loop
Instead of looping over all captured nodes, just take the end range from
the last node in the list. This uses the fact that nodes returned by
iter_matches are ordered by their range (earlier to later).
2024-06-24 14:10:25 +02:00
Luuk van Baal
da4e8dc5b0 fix(treesitter): do not modify highlight state for _on_spell_nav
Problem:  Treesitter highlighter clears the already populated highlight
          state when performing spell checking while drawing a
          smoothscrolled topline.
Solution: Save and restore the highlight state in the highlighter's
          _on_spell_nav callback.
2024-06-24 09:22:27 +01:00
zeertzjq
5a8a34dafa
fix(filetype): source ftdetect/* after creating scripts.vim autocmds (#29445) 2024-06-22 21:17:36 +08:00
Christian Clason
d82efeccc7 vim-patch:9.1.0506: filetype: .envrc & .prettierignore not recognized
Problem:  filetype: .envrc & .prettierignore not recognized
Solution: Detect '.envrc' as shell and '.prettierignore' as gitignore
          filetype (Tyler Miller)

Support ft detection for `.envrc` files used by direnv, and
`.prettierignore` files used by prettier.

closes: vim/vim#15053
resolves: neovim/neovim#29405

49012cd8c2

Co-authored-by: Tyler Miller <tmillr@proton.me>
2024-06-21 11:17:33 +02:00
zeertzjq
1db1476fd9
vim-patch:9.1.0512: Mode message for spell completion doesn't match allowed keys (#29437)
Problem:  Mode message for spell completion doesn't match allowed keys
          (Kyle Kovacs)
Solution: Show "^S" instead of "s".
          (zeertzjq)

This matches the code in vim_is_ctrl_x_key():

	case CTRL_X_SPELL:
	    return (c == Ctrl_S || c == Ctrl_P || c == Ctrl_N);

fixes: neovim/neovim#29431
closes: vim/vim#15065

7002c055d5
2024-06-21 14:40:28 +08:00
zeertzjq
f45403db19 vim-patch:9.1.0511: CursorMovedC triggered wrongly with setcmdpos()
Problem:  CursorMovedC triggered wrongly with setcmdpos()
          (after v9.1.0507)
Solution: Remove the premature triggering.  Also don't trigger when
          cursor didn't move. (zeertzjq)

closes: vim/vim#15064

bc6f96708e
2024-06-21 14:13:33 +08:00
zeertzjq
86ea42ce26 vim-patch:9.1.0507: hard to detect cursor movement in the command line
Problem:  hard to detect cursor movement in the command line
Solution: Add the CursorMovedC autocommand
          (Shougo Matsushita)

closes: vim/vim#15040

d09521476f

Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
2024-06-21 14:10:30 +08:00
Jaehwang Jung
0e3e1e6b6d
fix(treesitter): don't open fold when o/O adds a line below #28709
Problem:
`o`-ing on a folded line opens the fold, because the new line gets the
fold level from the above line (level '='), which extends the fold to
the new line. `O` has a similar problem when run on the line below a
fold.

Solution:
Use -1 for the added line to get the lower level from the above/below
line.
2024-06-20 06:37:09 -07:00
zeertzjq
af0021f990
vim-patch:9.1.0505: filetype: Faust files are not recognized (#29426)
Problem:  filetype: Faust files are not recognized
Solution: Detect '*.lib' files as Faust filetype, add detection for
          '*.dsp' files (Faust or Make), remove '*.lib' from Cobol
          filetype (PowerUser64)

closes: vim/vim#14894

aa61b8a908

Co-authored-by: PowerUser64 <blake@blakenorth.net>
2024-06-20 17:45:41 +08:00
zeertzjq
978b0263f8
Merge pull request #29413 from jiangyinzuo/vim-patch-9.1.0497
vim-patch:partial:9.1.{0497,0501}: termdebug can be further improved
2024-06-20 12:29:47 +08:00
Yinzuo Jiang
99373c8792 vim-patch:partial:9.1.0501: too complicated mapping restore in termdebug
Problem:  too complicated mapping restore in termdebug
Solution: simplify unmapping logic, add a few more tests
          (Ubaldo Tiberi)

closes: vim/vim#15046

46f2823807

Co-authored-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
2024-06-20 10:49:24 +08:00
zeertzjq
3317aa2f37
vim-patch:9.1.0504: inner-tag textobject confused about ">" in attributes (#29420)
Problem:  inner-tag textobject confused about ">" in attributes
Solution: Skip over quoted '>' when determining the start position

fixes: vim/vim#15043
closes: vim/vim#15049

ca7f93e6f3

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-20 09:57:00 +08:00
Yinzuo Jiang
b48192af37 vim-patch:partial:9.1.0497: termdebug can be further improved
Problem:  termdebug can be further improved
Solution: refactor save/restore, update docs,
          add a new save/restore test (Ubaldo Tiberi)

closes: vim/vim#15032

a48637c105

Co-authored-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
2024-06-19 21:23:21 +08:00
zeertzjq
b1c439cef6
fix(drawline): don't draw beyond end of window with 'rnu' (#29406) 2024-06-19 09:20:24 +08:00
zeertzjq
a2a3e8412e vim-patch:8.2.5047: CurSearch highlight is often wrong
Problem:    CurSearch highlight is often wrong.
Solution:   Remember the last highlighted position and redraw when needed.

368137aa52

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-06-19 08:02:29 +08:00
zeertzjq
a2d510e101
vim-patch:9.1.0499: MS-Windows: doesn't handle symlinks properly (#29400)
Problem:  MS-Windows: doesn't handle symlinks properly
          (Timothy Madden)
Solution: Implement lstat() on MS-Windows
          (author)

lstat() differs from stat() in how it handles symbolic links, the former
doesn't resolve the symlink while the latter does so.

Implement a simple yet effective fallback using Win32 APIs.

fixes vim/vim#14933
closes: vim/vim#15014

23c5ebeb95

Co-authored-by: LemonBoy <thatlemon@gmail.com>
Co-authored-by: K.Takata <kentkt@csc.jp>
2024-06-19 06:32:02 +08:00
luukvbaal
102971a396
fix(mouse): early return when clicking in padded 'statuscolumn' (#29394)
Problem:  Hit assert when clicking inside a padded 'statuscolumn' that
          is padded beyond the length of the allocated click_defs.
Solution: Still consider this a "in_statuscol" click, but return early
          when about to execute the click func.
2024-06-19 06:00:39 +08:00
zeertzjq
4e8ec4900e
vim-patch:9.1.0498: getcmdcompltype() interferes with cmdline completion (#29397)
Problem:  getcmdcompltype() interferes with cmdline completion.
Solution: Don't set expand context when it's already set.
          (zeertzjq)

closes: vim/vim#15036

a821b609f9
2024-06-19 05:47:25 +08:00
zeertzjq
b0c336eaf8
refactor(lua): remove unnecessary strlen() in nlua_expand_pat() (#29388)
Also change the initial value of `status` to `FAIL`, as that'll avoid
unnecessary assignments.
2024-06-18 12:02:31 +08:00
Rafael Kitover
1a1c766049
refactor: Windows tilde expansion followup (#29380)
Followup to #28515:

Rename the static os_homedir() to os_uv_homedir() to emphasize that it
is a wrapper around a libuv function.

Add the function os_get_homedir() to os/env.c to return the cached
homedir value as a const. Must be called after homedir is initialized or
it fails.

The difference between this function and the static os_uv_homedir() is
that the latter gets the homedir from libuv and is used to initialize
homedir in init_homedir(), while os_get_homedir() just returns homedir
as a const if it's initialized and is public.

Use the os_get_homedir() accessor for ~/ expansion on Windows to make
the code more concise.

Add a Windows section to main_spec.lua with tests for expanding ~/ and
~\ prefixes for files passed in on the command-line.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-06-18 11:23:52 +08:00
zeertzjq
948f2beed4
fix(lua): find length of completion prefix earlier (#29384)
Do the expansion right after setting the expand context, so that the
length of the completion prefix can be set, but don't do that directly
in set_one_cmd_context(), as that's also called by getcmdcompltype().
2024-06-18 09:47:10 +08:00
zeertzjq
c2491fbab4 vim-patch:9.1.0496: matched text is highlighted case-sensitively
Problem:  matched text is highlighted case-sensitively
Solution: use MB_STRNICMP, update highlighting when the base changes
          (glepnir)

fixes: vim/vim#15021
closes: vim/vim#15023

f189138b39

Co-authored-by: glepnir <glephunter@gmail.com>
2024-06-18 06:18:58 +08:00
zeertzjq
c429c5f86f vim-patch:9.1.0495: Matched text isn't highlighted in cmdline pum
Problem:  Matched text isn't highlighted in cmdline pum.
Solution: Use cmdline completion pattern in cmdline mode.
          (zeertzjq)

closes: vim/vim#15029

d8c9340fc6

Cherry-pick syntax.txt change from runtime update.
2024-06-18 06:18:34 +08:00
zeertzjq
20a7eebec0
vim-patch:9.1.0494: Wrong matched text highlighted in pum with 'rightleft' (#29371)
Problem:  Wrong matched text highlighted in pum with 'rightleft'.
Solution: Match using the original text instead of the reversed text.
          (zeertzjq)

closes: vim/vim#15020

63901e8963
2024-06-17 06:42:11 +08:00
zeertzjq
7746c54e10
Merge pull request #29357 from luukvbaal/statuscol
feat(column)!: rework 'statuscolumn' %r/l items
2024-06-17 06:33:15 +08:00
Luuk van Baal
ad70c9892d feat(column)!: rework 'statuscolumn' %r/l items
Problem:  A custom 'statuscolumn' needs to check a bunch of options and
          placed signs to replicate the default number column.
Solution: Rework %l item to include the necessary logic to mimic the
          default number column. Remove now redundant %r item.
2024-06-16 19:04:34 +02:00
Christian Clason
191a70f9dd vim-patch:9.1.0492: filetype: Vim-script files not detected by shebang line
Problem:  Vim-script files may not be recognised
Solution: Add shebang line detection (Doug Kearns)

closes: vim/vim#15012

0d4d23dac0

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2024-06-16 11:45:44 +02:00
zeertzjq
57c377dfb2
vim-patch:9.1.0493: Test for patch 9.1.0489 doesn't fail without the fix (#29366)
Problem:  Test for patch 9.1.0489 doesn't fail without the fix.
Solution: Use "!" flag of feedkeys() so that ex_normal_busy is not set
          and ins_compl_check_keys() is not skipped (zeertzjq).

closes: vim/vim#15018

acc8746941
2024-06-16 17:30:15 +08:00
zeertzjq
aa319da402
vim-patch:9.1.0489: default completion may break with fuzzy (#29364)
Problem:  default completion may break with fuzzy
Solution: check that completion_match_array is not null
          (glepnir)

closes: vim/vim#15010

aced8c2f4f

Co-authored-by: glepnir <glephunter@gmail.com>
2024-06-16 07:07:06 +08:00
zeertzjq
203540926d
vim-patch:9.1.0491: Cmdline pum doesn't work properly with 'rightleft' (#29355)
Problem:  Cmdline pum doesn't work properly with 'rightleft'.
Solution: Don't use curwin->w_p_rl in cmdline mode in pum_redraw().  Use
          a static variable since pum_may_redraw() may be called in any
          mode.  Also correct position of other popups with 'rightleft'.
          (zeertzjq)

closes: vim/vim#15005

883018feff
2024-06-15 22:37:48 +08:00
zeertzjq
fd2ef4edf9
vim-patch:9.1.0488: Wrong padding for pum "kind" with 'rightleft' (#29352)
Problem:  Wrong padding for pum "kind" with 'rightleft'.
Solution: Fix off-by-one error (zeertzjq).

The screen_fill() above is end-exclusive, and
- With 'rightleft' it fills `pum_col - pum_base_width - n + 1` to `col`,
  so the next `col` should be `pum_col - pum_base_width - n`.
- With 'norightleft' it fills `col` to `pum_col - pum_base_width + n - 1`,
  so the next `col` should be `pum_col - pum_base_width + n`.

closes: vim/vim#15004

a2324373eb
2024-06-15 21:39:56 +08:00
Christian Clason
4faad4a950 vim-patch:9.1.0486: filetype: Snakemake files are not recognized
Problem:  filetype: Snakemake files are not recognized
Solution: Detect '*.smk' and Snakefile files as snakemake filetype
          (Riley Bruins)

See:
https://snakemake.readthedocs.io/en/stable/snakefiles/deployment.html#distribution-and-reproducibility

closes: vim/vim#14992

82a579e15a

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2024-06-15 10:27:59 +02:00
Jerry
61aabe0730
fix(defaults): default @/Q broken when 'ignorecase' is set (#29343)
Problem:
When 'ignorecase' is set, the default keymap Q and Q would exit visual
mode.

This issue was raised in #28287 and a fix was applied in #28289.

However, `==` operator is subject to user `ignorecase` setting.

Solution:
Switching to `==#` operator would guarantee case sensitive comparison
between visual mode and linewise visual mode.

Co-authored-by: Kuanju Chen <kuanju.chen@mksinst.com>
2024-06-15 10:21:16 +08:00
zeertzjq
199d852d9f
vim-patch:9.1.0487: completed item not update on fuzzy completion (#29341)
Problem:  completed item not update on fuzzy completion
Solution: reset compl_shown_match when at original match position
          (glepnir)

closes: vim/vim#14955

f94c9c482a

Co-authored-by: glepnir <glephunter@gmail.com>
2024-06-15 07:20:38 +08:00
zeertzjq
aacd6c440d vim-patch:9.1.0485: Matched text shouldn't be highlighted in "kind" and "menu"
Problem:  Matched text shouldn't be highlighted in "kind" and "menu".
Solution: Pass hlf_T instead of the attribute.  Fix indent.
          (zeertzjq)

closes: vim/vim#14996

afbe5359e9
2024-06-15 04:58:11 +08:00
zeertzjq
dc4037f612 vim-patch:9.1.0476: Cannot see matched text in popup menu
Problem:  Cannot see matched text in popup menu
Solution: Introduce 2 new highlighting groups: PmenuMatch and
          PmenuMatchSel (glepnir)

closes: vim/vim#14694

40c1c3317d

Co-authored-by: glepnir <glephunter@gmail.com>
2024-06-15 04:47:23 +08:00
zeertzjq
fd950d4998
vim-patch:9.1.0484: Sorting of completeopt+=fuzzy is not stable (#29338)
Problem:  Sorting of completeopt+=fuzzy is not stable.
Solution: Compare original indexes when scores are the same.
          (zeertzjq)

closes: vim/vim#14988

8e56747fd2
2024-06-15 04:33:19 +08:00
Mathias Fußenegger
aa47af7e69
fix(lsp): tune completion word extraction for decorated labels (#29331)
Problem:

For snippets lsp.completion prefers the label if it is shorter than the
insertText or textEdit to support postfix completion cases but clangd
adds decoration characters to labels. E.g.: `•INT16_C(c)`

Solution:

Use parse_snippet on insertText/textEdit before checking if it is
shorter than the label.

Fixes https://github.com/neovim/neovim/issues/29301
2024-06-14 19:32:34 +02:00
Evgeni Chasnovski
458473acb8
fix(highlight): add StatusLineTerm/StatusLineTermNC to :color vim (#29313)
Problem: both `StatusLineTerm`/`StatusLineTermNC` are now explicitly
  used, but `:color vim` does not set them to the values used in Vim.
  This might be fine if `:color vim` is treated as "the state of default
  color scheme prior the big update", but it seems to be better treated
  as "Vim's default color scheme" (how it is documented in its header).

Solution: add `StatusLineTerm`/`StatusLineTermNC` definitions to
  'runtime/colors/vim.lua'.
  Use explicit foreground colors ('Whte'/'Black') instead of `guifg=bg`
  used in source, as the latter caused some problems in the past (if
  `Normal` is not defined, `nvim_set_hl()` can't recognize `'bg'` as the
  foreground value).
  Also realign the rest of the background conditional highlight groups.
2024-06-14 17:28:49 +08:00
Ilia Choly
0a9c81d709
refactor(lsp): use metatable for buf_versions (#29304)
This reduces the number of nil checks around buf_versions usage
Test changes were lifted from 5c33815

Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
2024-06-14 11:03:58 +02:00
Yinzuo Jiang
29e05cfb7e
vim-patch:partial:9.1.0482: termdebug plugin needs more love (#29329)
Problem:  termdebug plugin needs more love
Solution: start with some more Vim9 refactoring
          to improve maintenance and readability
          (Ubaldo Tiberi)

List of Changes and the Reasoning Behind Them:

1) Introduction of InitScriptVariables() Function:

Reasoning: This function has been introduced to ensure that when you open and
close Termdebug, and then open it again, there are no leftover script variable
values from the previous session. Leftover values could potentially cause
issues. The goal is for each Termdebug session to be independent of previous
sessions. At startup, all script variables are initialized. The only exception
is g:termdebug_loaded located at the very beginning of the script to prevent
sourcing the script twice. The variables are declared at script level and
defined in InitScriptVariables().

2) More Descriptive Variable Names:

Reasoning: The names of variables have been made more comprehensive. Almost
every Termdebug buffer now has a variable to indicate its name and another
variable to indicate its number, improving code readability and
maintainability. Due to the latest discussion around the &mousemodel option
save/restore mechanism, perhaps some other variables shall be prepended with
saved_.

3) Consistent Naming for GDB Terminal Buffers:

Reasoning: The name of the GDB terminal buffer now matches the name of the GDB
program being used, e.g., 'gdb', 'mygdb', 'arm-eabi-none-gdb', etc. This
ensures clarity and consistency in identifying buffers.

4) Other minor improvements:
Moved EchoErr() on top, added another test, some refactoring, mainly changed
several 0 and 1 to true and false

closes: vim/vim#14980

ef8eab86e2

Co-authored-by: Ubaldo Tiberi <ubaldo.tiberi@volvo.com>
2024-06-14 16:37:38 +08:00
zeertzjq
5def8714ad
fix(terminal): set local values of window options (#29326) 2024-06-14 06:20:42 +08:00
zeertzjq
6b022f9d8b
vim-patch:9.1.0483: glob() not sufficiently tested (#29323)
Problem:  glob() not sufficiently tested
Solution: Add more tests for directory containing [] chars

related: vim/vim#14991

8b34aea1b0

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-14 05:48:23 +08:00
Gregory Anders
6311a7fe4b
Merge pull request #29103 from gpanders/test-no-tgc
test: do not set termguicolors in test runner
2024-06-12 19:31:15 -05:00
Lewis Russell
53afdf360c
Merge pull request #29303 from lewis6991/fix/wobuf
fix(vim.wo): never allow non-zero bufnr
2024-06-12 17:30:11 +01:00
Gregory Anders
d38912b59f refactor(terminal): move :terminal defaults to _defaults.lua 2024-06-12 10:43:57 -05:00
Gregory Anders
3e09fbdf82 feat(highlight): add StatusLineTerm and StatusLineTermNC groups
These highlight groups are used for the statusline in :terminal windows.
By default they link to StatusLine and StatusLineNC (respectively), so
there is no visual difference unless a colorscheme defines these groups
separately.
2024-06-12 10:43:57 -05:00
Lewis Russell
2ca678f57d test: fix vim.deprecate tests 2024-06-12 16:41:26 +01:00
Lewis Russell
8bf79bd13c fix(vim.wo): never allow non-zero bufnr 2024-06-12 15:42:56 +01:00
zeertzjq
033810ba23
vim-patch:9.1.0477: block_editing errors out when using <enter> (#29294)
Problem:  block_editing errors out when using <enter>
          (Ali Rizvi-Santiago, after v9.1.0274)
Solution: Change ins_len from size_t to int so that the test
          if ins_len is negative actually works properly

Add a test, so that this doesn't regress.

fixes: vim/vim#14960

1fb9eae579

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-12 11:07:36 +08:00
Gregory Anders
3ad977f01d
feat(terminal): add support for copying with OSC 52 in embedded terminal (#29117)
When libvterm receives the OSC 52 escape sequence it ignores it because
Nvim does not set any selection callbacks. Install selection callbacks
that forward to the clipboard provider, so that setting the clipboard
with OSC 52 in the embedded terminal writes to the system clipboard
using the configured clipboard provider.
2024-06-11 13:18:06 -05:00
Luuk van Baal
1dcda86559 fix(column): clamp line number for legacy signs
Problem:  Legacy :sign API still allows placing signs beyond the end of
          the buffer. This is unaccounted for by the signcolumn tracking
          logic and is disallowed in general for the extmark API which
          implements it now.
Solution: Clamp legacy sign line number to the length of the buffer.
2024-06-10 20:00:59 +02:00
Jon Huhn
4bd86120d4
fix(glob): handle overlapping {} condition elements #29236
This change fixes an issue where glob patterns like `{a,ab}` would not
match `ab` because the first option `a` matches, then the end of the
string is expected but `b` is found, and LPeg does not backtrack to try
the next option `ab` which would match. The fix here is to also append
the rest of the pattern to the generated LPeg pattern for each option.
This changes a glob `{a,ab}` from being parsed as

    ("a" or "ab") "end of string"

to

    ("a" "end of string" or "ab" "end of string")

Here, matching against `ab` would try the first option, fail to match,
then proceed to the next option, and match.

The sacrifice this change makes is dropping support for nested `{}`
conditions, which VSCode doesn't seem to support or test AFAICT.

Fixes #28931

Co-authored-by: Sergey Slipchenko <faergeek@gmail.com>
2024-06-10 04:23:03 -07:00
Tom Praschan
20f22f75ee
feat(lsp): include end_col, end_lnum in vim.lsp.buf.locations_to_items #29164 2024-06-09 18:14:55 -07:00
bfredl
2b2dd6accf
Merge pull request #29141 from bfredl/rstream2
refactor(io): make rstream use a linear buffer
2024-06-09 11:33:00 +02:00
dundargoc
9afa1fd355 feat(lua): add vim._with
It's a function to perform operations in their own sealed context,
similar to pythons `with`. This helps ease operations where you need to
perform an operation in a specific context, and then restore the
context.

Marked as private for now as it's not ready for public use. The current
plan is to start using this internally so we can discover and fix any
problems. Once this is ready to be exposed it will be renamed to
`vim.with`.

Usage:

```lua
local ret = vim._with({context = val}, function()
  return "hello"
end)
```

, where `context` is any combination of:

- `buf`
- `emsg_silent`
- `hide`
- `horizontal`
- `keepalt`
- `keepjumps`
- `keepmarks`
- `keeppatterns`
- `lockmarks`
- `noautocmd`
- `options`
- `sandbox`
- `silent`
- `unsilent`
- `win`

(except for `win` and `buf` which can't be used at the same time). This
list will most likely be expanded in the future.

Work on https://github.com/neovim/neovim/issues/19832.

Co-authored-by: Lewis Russell <lewis6991@gmail.com>
2024-06-08 21:38:06 +02:00
bfredl
78d21593a3 refactor(io): make rstream use a linear buffer
If you like it you shouldn't put a ring on it.

This is what _every_ consumer of RStream used anyway, either by calling
rbuffer_reset, or rbuffer_consumed_compact (same as rbuffer_reset
without needing a scratch buffer), or by consuming everything in
each stream_read_cb call directly.
2024-06-08 12:50:17 +02:00
Lennard Hofmann
da6f68ee69
fix(man): filter OSC 8 hyperlink markup #29171
Problem: `man cmake` shows "8;;https://cmake.orghttps://cmake.org8;;"
Solution: Remove noise so that it shows as "https://cmake.org".
See also: https://en.wikipedia.org/wiki/ANSI_escape_code#OSC
2024-06-07 12:43:17 -07:00
altermo
f3632e14e3
feat: get/set namespace properties #28728
ref https://github.com/neovim/neovim/pull/28432
ref https://github.com/neovim/neovim/issues/28469
2024-06-07 08:33:40 -07:00
Al Colmenar
2ce4a4d91e
fix(lsp): fix reverse sorting of same position text edits (#29212)
Problem:
Text edits with the same position (both line and character) were being
reverse sorted prior to being applied which differs from the lsp spec

Solution:
Change the sort order for just the same position edits
2024-06-07 11:54:43 +02:00
Mathias Fußenegger
6e45cd7f00
fix(lsp): revert buf_versions deprecation/replacement (#29217)
* Revert "fix(lsp): account for changedtick version gap on modified reset (#29170)"

This reverts commit 2e6d295f79.

* Revert "refactor(lsp): replace util.buf_versions with changedtick (#28943)"

This reverts commit 5c33815448.
2024-06-07 11:36:46 +02:00
sus-domesticus
cb6c0fda71
feat(editorconfig): add support for spelling_language (#28638) 2024-06-06 09:16:43 -05:00
zeertzjq
1d4e894403 vim-patch:9.1.0469: Cannot have buffer-local value for 'completeopt'
Problem:  Cannot have buffer-local value for 'completeopt'
          (Nick Jensen).
Solution: Make 'completeopt' global-local (zeertzjq).

Also for some reason test Test_ColonEight_MultiByte seems to be failing
sporadically now. Let's mark it as flaky.

fixes: vim/vim#5487
closes: vim/vim#14922

529b9ad62a
2024-06-06 06:07:31 +08:00
zeertzjq
c235a063d6 vim-patch:9.1.0467: typos in some comments
Problem:  typos in some comments
          (after v9.1.0466)
Solution: fix comments
          (zeertzjq)

closes: vim/vim#14919

551d8c372e
2024-06-06 05:50:12 +08:00
Gregory Anders
d7651b27d5
fix(tui): move $COLORTERM check to _defaults.lua (#29197)
We currently check $COLORTERM in the TUI process to determine if the
terminal supports 24 bit color (truecolor). If $COLORTERM is "truecolor"
or "24bit" then we automatically assume that the terminal supports
truecolor, but if $COLORTERM is set to any other value we still query
the terminal.

The `rgb` flag of the UI struct is a boolean which only indicates
whether the UI supports truecolor, but does not have a 3rd state that we
can use to represent "we don't know if the UI supports truecolor". We
currently use `rgb=false` to represent this "we don't know" state, and
we use XTGETTCAP and DECRQSS queries to determine at runtime if the
terminal supports truecolor. However, if $COLORTERM is set to a value
besides "truecolor" or "24bit" (e.g. "256" or "16) that is a clear
indication that the terminal _does not_ support truecolor, so it is
incorrect to treat `rgb=false` as "we don't know" in that case.

Instead, in the TUI process we only check for the terminfo capabilities.
This must be done in the TUI process because we do not have access to
this information in the core Neovim process when `_defaults.lua` runs.
If the TUI cannot determine truecolor support from terminfo alone, we
set `rgb=false` to indicate "we don't know if the terminal supports
truecolor yet, keep checking". When we get to `_defaults.lua`, we can
then check $COLORTERM and only query the terminal if it is unset.

This means that users can explicitly opt out of truecolor determination
by setting `COLORTERM=256` (or similar) in their environment.
2024-06-05 08:27:56 -05:00
zeertzjq
43bd9c9c1c
fix(lua): don't clamp -1 or v:maxcol in vim.highlight.range() (#29203) 2024-06-05 16:47:43 +08:00
zeertzjq
164338330b vim-patch:9.1.0463: no fuzzy-matching support for insert-completion
Problem:  no fuzzy-matching support for insert-completion
Solution: enable insert-mode completion with fuzzy-matching
          using :set completopt+=fuzzy (glepnir).

closes: vim/vim#14878

a218cc6cda

Co-authored-by: glepnir <glephunter@gmail.com>
2024-06-05 15:08:31 +08:00
Andre Toerien
f69937fdbd
fix(diagnostic): fix float scope filtering (#29134) 2024-06-04 16:35:44 -05:00
Mathias Fußenegger
2e6d295f79
fix(lsp): account for changedtick version gap on modified reset (#29170)
Follow up to https://github.com/neovim/neovim/pull/28943
Fixes https://github.com/neovim/neovim/issues/29163
2024-06-04 17:21:37 +02:00
luukvbaal
b66106a46c
fix(ui): superfluous showmode / excessive grid_cursor_goto #29089
Problem:  Unsetting global variables earlier in #28578 to avoid
          recursiveness, caused superfluous or even unlimited
          showmode().
Solution: Partly revert #28578 so that the globals are unset at the end
          of showmode(), and avoid recursiveness for ext UI by adding a
          recursive function guard to each generated UI call that may
          call a Lua callback.
2024-06-04 06:09:12 -07:00
Ilia Choly
8cbb1f20e5
refactor(lua): use tuple syntax everywhere #29111 2024-06-04 06:06:02 -07:00
Christian Clason
2f5b8a0092 vim-patch:9.1.0464: no whitespace padding in commentstring option in ftplugins
Problem:  no whitespace padding in commentstring option in ftplugins
Solution: Change default to include whitespace padding, update
          existing filetype plugins with the new default value
          (Riley Bruins)

closes: vim/vim#14843

0a0830624a

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2024-06-04 10:38:55 +02:00
zeertzjq
e20c5fba2c
vim-patch:partial:8.2.3637: typos in test files (#29172)
Problem:    Typos in test files.
Solution:   Correct the typos. (Dominique Pellé, closes vim/vim#9175)

923dce2b07

Co-authored-by: Dominique Pelle <dominique.pelle@gmail.com>
2024-06-04 06:07:20 +08:00
Soham Shanbhag
054a287dbe
feat(ftplugin): change 'commentstring' to // %s for C/C++ (#29085)
Problem: The default commentstring for C/C++ can lead to invalid code 
when commenting and does not match the Nvim codebase.

Solution: Change commentstring to `// %s` as used by Neovim. Also
set all commentstrings that derive from the default C string explicitly
(and correctly).
2024-06-03 09:48:43 +02:00
Christian Clason
659d3dcd2e vim-patch:9.1.0460: filetype: lintstagedrc files are not recognized
Problem:  filetype: lintstagedrc files are not recognized
Solution: recognize '.lintstagedrc' files as json filetype
          (İlyas Akın)

see: https://github.com/lint-staged/lint-staged

closes: vim/vim#14897

7577afd5ef

Co-authored-by: İlyas Akın <ilyas.akin@kuika.com>
2024-06-02 23:01:20 +02:00
Mathias Fußenegger
19be3d2683
fix(lsp): trim trailing whitespace from completion words (#29122)
the `complete()` mechanism doesn't play nicely with trailing newlines or
tabs. A newline causes it to insert a null character, showing up as
`^@`.
2024-06-02 09:54:15 +02:00
zeertzjq
56337310ef test: add a test for #29119 2024-06-02 15:18:30 +08:00
zeertzjq
0e49c3ad1a vim-patch:9.1.0456: Left shift is incorrect with vartabstop and shiftwidth=0
Problem:  Left shift is incorrect with vartabstop and shiftwidth=0
Solution: make tabstop_at() function aware of shift direction
          (Gary Johnson)

The problem was that with 'vartabstop' set and 'shiftwidth' equal 0,
left shifts using << were shifting the line to the wrong column.  The
tabstop to the right of the first character in the line was being used
as the shift amount instead of the tabstop to the left of that first
character.

The reason was that the tabstop_at() function always returned the value
of the tabstop to the right of the given column and was not accounting
for the direction of the shift.

The solution was to make tabstop_at() aware of the direction of the
shift and to choose the tabtop accordingly.

A test was added to check this behavior and make sure it doesn't
regress.

While at it, also fix a few indentation/alignment issues.

fixes: vim/vim#14864
closes: vim/vim#14887

88d4f255b7

Co-authored-by: Gary Johnson <garyjohn@spocom.com>
2024-06-02 06:06:34 +08:00
zeertzjq
6f87779857 vim-patch:8.2.4452: test for what 8.2.4436 fixes does not check for regression
Problem:    Test for what 8.2.4436 fixes does not check for regression.
Solution:   Set several options. (Ken Takata, closes vim/vim#9830)

2dada73a4e

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-06-02 06:06:34 +08:00
zeertzjq
7cbfbd3ae1 vim-patch:8.2.4437: vartabs test fails on MS-Windows
Problem:    Vartabs test fails on MS-Windows.
Solution:   Use iso8859-1 'encoding'. (Ken Takata, closes vim/vim#9818)

0f113e4f7b

Co-authored-by: K.Takata <kentkt@csc.jp>
2024-06-02 06:06:34 +08:00
zeertzjq
c81ad884c7 vim-patch:8.2.4436: crash with weird 'vartabstop' value
Problem:    Crash with weird 'vartabstop' value.
Solution:   Check for running into the end of the line.

4e889f98e9

Code change is N/A as it's superseded by virtual text changes.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-06-02 06:06:34 +08:00
Ilia Choly
9eb0426002 fix(luacats): allow all types inside tuples 2024-06-01 12:56:43 +01:00
luukvbaal
f2083bd55c
fix(column): crash with 'signcolumn' set to "number" (#29003)
Problem:  Numberwidth may depend on number of signs with text in the
          buffer and is not handled correctly for extmark signs.
Solution: Move legacy sign code for changed numberwidth so that it is
          handled properly for legacy and extmark signs alike.
2024-06-01 18:10:35 +08:00
Gregory Anders
5493fcd52f test: remove checks for failed tests on Windows 2024-05-31 10:04:01 -05:00
Ilia Choly
d87ecfc8bc docs(luacats): add tuple support 2024-05-31 15:00:17 +01:00
Gregory Anders
d24f3d055a test: do not set termguicolors in test runner
It's not clear why this is needed and it has adverse side effects on
other tests.
2024-05-31 08:25:35 -05:00
Christian Clason
9b3dfa3ac0 vim-patch:9.1.0454: minor issues in test_filetype with rasi test
Problem:  minor issues in test_filetype with rasi test
          (after 9.1.0453)
Solution: re-sort test_filetype, fix wrong syntax.txt help tags

f3dd6f617c

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-05-31 14:11:20 +02:00
Christian Clason
07af492f63 vim-patch:9.1.0453: filetype: rasi files are not recognized
Problem:  filetype: rasi files are not recognized
Solution: regonize '*.rasi' files as rasi filetype,
          include a filetype and syntax plugin
          (Pierrick Guillaume)

ported from: https://github.com/Fymyte/rasi.vim

closes: vim/vim#14821

280e5b13ca

Co-authored-by: Pierrick Guillaume <pierguill@gmail.com>
2024-05-31 14:11:20 +02:00
zeertzjq
2de12e9bd7 vim-patch:9.1.0451: No test for escaping '<' with shellescape()
Problem:  No test for escaping '<' with shellescape()
Solution: Add a test.  Use memcpy() in code to make it easier to
          understand.  Fix a typo (zeertzjq).

closes: vim/vim#14876

88c8c547d5
2024-05-31 05:52:53 +08:00
Mathias Fußenegger
5c33815448
refactor(lsp): replace util.buf_versions with changedtick (#28943)
`lsp.util.buf_versions` was already derived from changedtick (`on_lines`
from `buf_attach` synced the version)

As far as I can tell there is no need to keep track of the state in a
separate table.
2024-05-30 10:46:26 +02:00
Mathias Fussenegger
b2bad0ac91 feat(lsp): support postfix snippets in completion 2024-05-30 09:24:24 +02:00
Mathias Fussenegger
0df2c6b5d0 feat(lsp): use fuzzy match on filterText instead of prefix match
The `complete()` mechanism matches completion candidates against
the typed text, so strict pre-filtering isn't necessary.

This is a first step towards supporting postfix snippets (like
`items@insert` in luals)
2024-05-30 09:24:24 +02:00
zeertzjq
40679c764a
vim-patch:8.2.3061: testing the shell option is incomplete and spread out (#29090)
Problem:    Testing the shell option is incomplete and spread out.
Solution:   Move shell tests to one file and increase coverage. (Yegappan
            Lakshmanan, closes vim/vim#8464)

054794c20f

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2024-05-30 14:39:48 +08:00
bfredl
f55767afe2
Merge pull request #29016 from bfredl/shadareader
refactor(shada): remove ShaDaReadDef secondary wrapper
2024-05-29 13:23:14 +02:00
dundargoc
f09f5c45fa build: reuse code for deps.txt for both deps and main build 2024-05-28 20:58:07 +02:00
Gregory Anders
1c6d920052
feat(defaults): use vim.diagnostic.jump() for default mappings (#29066)
This allows the mappings to work with a count and also enables new ]D
and [D mappings to go to the last/first diagnostic in the buffer.
2024-05-28 13:24:16 -05:00
Gregory Anders
0bdd602bf9
Merge pull request #27339 from MariaSolOs/completion
feat(lsp): completion side effects
2024-05-28 12:39:30 -05:00
Maria José Solano
e6cfcaed18 feat(snippet): add default keymaps during snippet session 2024-05-28 08:49:39 -07:00
Gregory Anders
8ba73f0e4c
feat(diagnostic): add vim.diagnostic.jump() (#26745)
Deprecate vim.diagnostic.goto_prev() and vim.diagnostic.goto_next() in
favor of a unified vim.diagnostic.jump() interface.

We cannot name the function "goto()" because some of our tooling
(luacheck and stylua) fail to parse it, presumably because "goto" is a
keyword in newer versions of Lua.

vim.diagnostic.jump() also allows moving to a specific diagnostic and
moving by multiple diagnostics at a time (useful for creating mappings
that use v:count).
2024-05-28 08:51:44 -05:00
bfredl
b386334cdb refactor(shada): remove ShaDaReadDef secondary wrapper
`FileDescriptor` is already a wrapper around an fd and a buffer.
By allowing to just use the buffer without an fd, it can
already handle in-memory reads.
2024-05-28 13:36:54 +02:00
luukvbaal
5b6477be45
fix(ui): flush ext_cmdline events before doing cmdpreview #27950
Problem:  Unable to update the screen for external cmdline during cmdpreview.
Solution: Flush the cmdline UI before cmdpreview state.
2024-05-28 02:43:56 -07:00
zeertzjq
7b16c1fa84
fix(runtime): source c ftplugin properly for cpp on Windows (#29053)
On Windows, '{' is currently not treated as a wildcard char, so another
wildcard char is needed for the pattern to be treated as a wildcard.

It may be worth trying to make '{' always a wildcard char in the future,
but that'll be a bit harder as it'll be necessary to make sure '{' is
escaped at various places.
2024-05-28 06:39:07 +08:00
Maria José Solano
490c2109e6 test(lsp): add completion tests 2024-05-27 14:53:28 -07:00
Maria José Solano
ff097f2091 feat(lsp): completion side effects 2024-05-27 14:53:28 -07:00
Ilia Choly
292365fa1b
fix(lsp): do not detach from buffer if there are uninitialized clients (#29029)
Problem: if on_lines is called before the LSP is initialized, the buffer
is detached.
Solution: check for uninitialized clients before detaching.
2024-05-27 17:06:03 +02:00
glepnir
dbc2678f46
vim-patch:9.1.0447: completion may be wrong when deleting all chars (#29040)
Problem:  completion may be wrong when deleting all chars.
Solution: reset compl_shown_match (glepnir).

closes: https://github.com/vim/vim/pull/14854

53387c55a1
2024-05-27 22:02:24 +08:00
Gregory Anders
48251134ee
perf: add fast path to vim.validate (#28977)
For many small/simple functions (like those found in shared.lua), the
runtime of vim.validate can far exceed the runtime of the function
itself. Add an "overload" to vim.validate that uses a simple assertion
pattern, rather than parsing a full "validation spec".
2024-05-27 08:08:23 -05:00
Guilherme Soares
c4eb0b64bd
fix(treesitter): find buffer in multiple windows #28922
Problem:
1. When interacting with multiple :InspectTree and the source buffer
   windows there is a high chance of errors due to the window ids not
   being updated and validated.
2. Not all InspectTree windows were closed when the source buffer was
   closed.

Solution:
1. Update InspectTree window id on `CursorMoved` event and validate
   source buffer window id before trying to navigate to it.
2. Close all InspectTree windows
2024-05-27 04:20:03 -07:00
zeertzjq
9a0239fdc8
fix(drawline): don't draw beyond end of window (#29035) 2024-05-27 14:37:22 +08:00
zeertzjq
22fe04452e
vim-patch:9.1.0446: getregionpos() inconsistent for partly-selected multibyte char (#29032)
Problem:  getregionpos() behaves inconsistently for a partly-selected
          multibyte char.
Solution: Always use column of the first byte for a partly-selected
          multibyte char (zeertzjq).

closes: vim/vim#14851

ef73374dc3
2024-05-27 05:50:49 +08:00
luukvbaal
bc63ffcf39
fix(tui): reset clear_region attributes during startup #28713
Problem:  Fix added in #28676 worked accidentally(used variables were
          themselves uninitialized at this point during startup) and
          does not always work.
Solution: Reset attributes when clearing regions during startup.
2024-05-26 10:54:08 -07:00
Riley Bruins
eb37241d38
fix(tohtml): properly handle multiple hl groups #29012
Problem: :TOhtml doesn't properly handle virtual text when it has
multiple highlight groups. It also improperly calculates position offset
for multi-byte virt_text characters.

Solution: Apply the `vim.api.nvim_strwidth` broadly to properly
calculate character offset, and handle the cases where the `hl` argument
can be a table of multiple hl groups.
2024-05-26 10:27:12 -07:00
bfredl
b90d7c36cf refactor(tests): more global highlight definitions 2024-05-26 10:24:27 +02:00
bfredl
05a65432b6
Merge pull request #29006 from bfredl/apitest
refactor(tests): use more global highlight definitions
2024-05-26 09:40:05 +02:00
bfredl
fb43741f80 refactor(tests): use more global highlight definitions 2024-05-26 09:22:20 +02:00
zeertzjq
3d39ea3ea9
vim-patch:9.1.0442: hare runtime files outdated (#29011)
Problem:  hare runtime files outdated
Solution: runtime(hare): update hare.vim to match upstream
          (Amelia Clarke)

closes: vim/vim#14836

35dfe58a54

Co-authored-by: Amelia Clarke <selene@perilune.dev>
2024-05-26 07:11:50 +08:00
bfredl
a4b5549655 refactor(tests): update screen:snapshot_util() to use new-style highlights
This makes screen:snapshot_util() generate code with the new
screen:add_extra_attr_ids { ... } pattern. For convenience,
the old-style configuration is still detected and supported (until
all tests have been refactored, which is my goal for the 0.11 cycle)

Remove the last traces of the "ignore" attr anti-pattern. This code
is no longer functional, it is just "ignore" argument being passed around
like a hot potato at this point.
2024-05-25 19:01:27 +02:00
dundargoc
52389e7243 test(unit): skip flaky 'typval.c dict extend() works' test 2024-05-25 15:15:36 +02:00
zeertzjq
bdb81afab3
refactor(lua): rewrite vim.highlight.range() (#28986)
- Use getregionpos().
- Use a single extmark for non-blockwise selection.
2024-05-25 20:37:33 +08:00
bfredl
75f6ee5b26
Merge pull request #28617 from glepnir/border_hl
fix(float): missing default highlight for title
2024-05-25 11:13:58 +02:00
zeertzjq
4757d497f3
vim-patch:9.1.0444: Not enough tests for getregion() with multibyte chars (#29000)
Problem:  Not enough tests for getregion() with multibyte chars.
Solution: Add a few more tests (zeertzjq).

closes: vim/vim#14844

dff55a3358
2024-05-25 16:53:10 +08:00
glepnir
8b2b1fba2a fix(float): missing default highlight for title
Problem: there is missing default title highlight when highlight not defined in title text chunk.

Solution: when attr is not set use default title highlight group.
2024-05-25 15:34:29 +08:00
zeertzjq
06347a64ca
vim-patch:9.1.0443: Can't use blockwise selection with width for getregion() (#28985)
Problem:  Can't use a blockwise selection with a width for getregion().
Solution: Add support for blockwise selection with width like the return
          value of getregtype() or the "regtype" value of TextYankPost
          (zeertzjq).

closes: vim/vim#14842

afc2295c22
2024-05-25 05:19:46 +08:00
Gregory Anders
206f8f24a2
fix(fs): make vim.fs.root work for relative paths and unnamed buffers (#28964)
If a buffer does not have a backing file then fall back to the current
working directory.
2024-05-24 10:48:32 -05:00
zeertzjq
8db9a0e5a2
vim-patch:8.2.3158: strange error message when using islocked() with a number (#28962)
Problem:    Strange error message when using islocked() with a number.
            (Yegappan Lakshmanan)
Solution:   Check that the name is empty.

1840a7b4e3

Use ll_name_len instead.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-05-24 18:29:17 +08:00
Famiu Haque
a616272f56
feat(complete): specify reason for CompleteDone
Problem: `CompleteDone` currently does not specify the reason for why completion was done, which is problematic for completion plugins as they cannot know whether the event was triggered due to the completion being canceled, accepted, or for some other reason.

Solution: Add a `reason` key to `v:event`, which is set by `CompleteDone` to indicate why completion ended.
2024-05-24 11:57:46 +02:00
dundargoc
d123202ae6 fix: change deprecation presentation
Deprecation with vim.deprecate is currently too noisy. Show the
following warning instead:

[function] is deprecated. Run ":checkhealth vim.deprecated" for more information.

The important part is that the full message needs to be short enough to
fit in one line in order to not trigger the "Press ENTER or type command
to continue" prompt.

The full information and stack trace for the deprecated functions will
be shown in the new healthcheck `vim.deprecated`.
2024-05-24 11:08:00 +02:00
zeertzjq
4f431bb632
vim-patch:9.1.0439: Cannot filter the history (#28958)
Problem:  Cannot filter the history
Solution: Implement :filter :history

closes: vim/vim#14835

42a5b5a6d0

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-05-24 15:45:07 +08:00
zeertzjq
cd05fbef17
vim-patch:9.1.0441: getregionpos() can't properly indicate positions beyond eol (#28957)
Problem:  getregionpos() can't properly indicate positions beyond eol.
Solution: Add an "eol" flag that enables handling positions beyond end
          of line like getpos() does (zeertzjq).

Also fix the problem that a position still has the coladd beyond the end
of the line when its column has been clamped.  In the last test case
with TABs at the end of the line the old behavior is obviously wrong.

I decided to gate this behind a flag because returning positions that
don't correspond to actual characters in the line may lead to mistakes
for callers that want to calculate the length of the selected text, so
the behavior is only enabled if the caller wants it.

closes: vim/vim#14838

2b09de9104
2024-05-24 15:44:52 +08:00
zeertzjq
c836383d21
vim-patch:9.1.0438: Wrong Ex command executed when :g uses '?' as delimiter (#28956)
Problem:  Wrong Ex command executed when :g uses '?' as delimiter and
          pattern contains escaped '?'.
Solution: Don't use "*newp" when it's not allocated (zeertzjq).

closes: vim/vim#14837

3074137542
2024-05-24 15:04:33 +08:00
zeertzjq
e7859d2ad5
vim-patch:9.1.0436: Crash when using '?' as separator for :s (#28955)
Problem:  Crash when using '?' as separator for :s and pattern contains
          escaped '?'s (after 9.1.0409).
Solution: Always compute startplen. (zeertzjq).

related: neovim/neovim#28935
closes: 14832

789679cfc4
2024-05-24 05:57:00 +08:00
Christian Clason
0d3d198109 vim-patch:9.1.0435: filetype: cygport files are not recognized
Problem:  filetype: cygport files are not recognized
Solution: Recognize '*.cygport' files as sh filetype
          (Ken Takata)

https://cygwin.github.io/cygport/cygport_in.html

closes: vim/vim#14833

cd79f8fbd3

Co-authored-by: K.Takata <kentkt@csc.jp>
2024-05-23 23:47:13 +02:00
Evgeni Chasnovski
0a2218f965
fix(comment): fall back to using trimmed comment markers (#28938)
Problem: Currently comment detection, addition, and removal are done
  by matching 'commentstring' exactly. This has the downside when users
  want to add comment markers with space (like with `-- %s`
  commentstring) but also be able to uncomment lines that do not contain
  space (like `--aaa`).

Solution: Use the following approach:
  - Line is commented if it matches 'commentstring' with trimmed parts.
  - Adding comment is 100% relying on 'commentstring' parts (as is now).
  - Removing comment is first trying exact 'commentstring' parts with
    fallback on trying its trimmed parts.
2024-05-23 15:30:53 -05:00
Ilia Choly
af200c10cf
fix(lsp): check if buffer was detached in on_init callback (#28914)
Co-authored-by: Jongwook Choi <wookayin@gmail.com>
2024-05-23 15:17:53 +02:00
Andre Toerien
5ac8db10f0
fix(lsp): trigger LspDetach on buffer delete (#28795)
Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
2024-05-23 12:03:47 +02:00
zeertzjq
bdf15dbe69
vim-patch:9.1.0433: Wrong yanking with exclusive selection and ve=all (#28933)
Problem:  Wrong yanking with exclusive selection and virtualedit=all,
          and integer overflow when using getregion() on it.
Solution: Set coladd when decreasing column and 'virtualedit' is active.
          Add more tests for getregion() with 'virtualedit' (zeertzjq).

closes: vim/vim#14830

701ad50a9e
2024-05-23 14:23:09 +08:00
zeertzjq
cd48b72b60
fix(shada): restore search pattern length properly (#28929) 2024-05-23 09:10:16 +08:00
zeertzjq
5cbd6d9b9f
vim-patch:9.1.0430: getregionpos() doesn't handle one char selection (#28924)
Problem:  getregionpos() doesn't handle one char selection.
Solution: Handle startspaces differently when is_oneChar is set.
          Also add a test for an exclusive charwise selection with
          multibyte chars (zeertzjq)

closes: vim/vim#14825

52a6f34887
2024-05-23 06:08:24 +08:00
dundargoc
01b4da65c2 fix: merge all provider healthchecks into a single health.lua
This will help manage the overly granular checkhealth completion to go
from

```
vim.health
vim.lsp
vim.provider.clipboard
vim.provider.node
vim.provider.perl
vim.provider.python
vim.provider.ruby
vim.treesitter
```

to

```
vim.health
vim.lsp
vim.provider
vim.treesitter
```
2024-05-22 21:34:49 +02:00
zeertzjq
10601ac5fa
vim-patch:62ccaa6: runtime(termdebug): check for gdb file/dir before using as buffer name (#28908)
Add test so that this doesn't regress.

fixes: vim/vim#12718
closes: vim/vim#14792

62ccaa60d5

Co-authored-by: Ubaldo Tiberi <ubaldo.tiberi@volvo.com>
2024-05-22 08:41:07 +08:00
zeertzjq
81a1d7258c
vim-patch:9.1.0427: tests: some issues with termdebug mapping test (#28907)
Problem:  tests: some issues with termdebug mapping test
Solution: Use assert_{true,false} if suitable, change
          order of expected and actual arguments in assert() calls.
          (Ken Takata)

closes: vim/vim#14818
related: 7fbbd7f

ffed1540f3

Co-authored-by: Ken Takata <kentkt@csc.jp>
2024-05-22 07:19:12 +08:00
zeertzjq
59fe8ffdea vim-patch:9.1.0428: Tag guessing leaves wrong search history with very short names
Problem:  Tag guessing leaves wrong search history with very short names
          (after 9.1.0426).
Solution: Use the correct variable for pattern length (zeertzjq).

closes: vim/vim#14817

42cd192daa

Cherry-pick Test_tagbsearch() changes from patch 9.0.0767.
2024-05-22 06:37:26 +08:00
zeertzjq
b86381f425 vim-patch:9.1.0426: too many strlen() calls in search.c
Problem:  too many strlen() calls in search.c
Solution: refactor code and remove more strlen() calls,
          use explicit variable to remember strlen
          (John Marriott)

closes: vim/vim#14796

8c85a2a49a

Co-authored-by: John Marriott <basilisk@internode.on.net>
2024-05-22 06:37:26 +08:00
Riley Bruins
a108852b00
fix(lsp): semantic token functions allow "0" bufnr #28849
aligns with ":help dev-patterns"
2024-05-21 09:25:54 -07:00
Tobias Schmitz
ad191be65e
feat(signs)!: place higher-priority signs from the left #27781
Problem:
Higher-priority signs may be hidden by lower-priority signs.

Solution:
Place higher-priority signs from the left.

Example:

    nvim_buf_set_extmark(0, ns, 0, -1, {sign_text='H', priority=1})
    nvim_buf_set_extmark(0, ns, 0, -1, {sign_text='W', priority=2})
    nvim_buf_set_extmark(0, ns, 0, -1, {sign_text='E', priority=3})

Before:

            |     |
          H | W E |
          ^ |     |
Not visible

After:

  |     |
  | E W | H
  |     | ^
          Not visible

Fixes #16632
2024-05-21 09:21:42 -07:00
zeertzjq
91892f56b6
vim-patch:9.1.0399: block_editing errors out when using del (#28867)
Problem:  block_editing errors out when using del
          (@Jamarley)
Solution: Change ins_len from size_t to int and
          properly check that it doesn't become negative

There is a check in os.c that verifies that `ins_len` does not become
negative:
```
if (pre_textlen >= 0 && (ins_len = len - pre_textlen - offset) > 0)
```
However this only works, if ins_len can actually become negative and
unfortunately, ins_len has been declared as `size_t` so instead of
becoming negative it will wrap around and be very large.

So let's define it as integer, after which the condition above
properly catches this condition.

fixes: vim/vim#14734
closes: vim/vim#14735

d5c8c0920e

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-05-20 21:45:02 +08:00
zeertzjq
e0259b9466 vim-patch:9.1.0423: getregionpos() wrong with blockwise mode and multibyte
Problem:  getregionpos() wrong with blockwise mode and multibyte.
Solution: Use textcol and textlen instead of start_vcol and end_vcol.
          Handle coladd properly (zeertzjq).

Also remove unnecessary buflist_findnr() in add_regionpos_range(), as
getregionpos() has already switched buffer.

closes: vim/vim#14805

c95e64f41f
2024-05-20 20:59:54 +08:00
zeertzjq
d89144626e vim-patch:9.1.0394: Cannot get a list of positions describing a region
Problem:  Cannot get a list of positions describing a region
          (Justin M. Keyes, after v9.1.0120)
Solution: Add the getregionpos() function
          (Shougo Matsushita)

fixes: vim/vim#14609
closes: vim/vim#14617

b4757e627e

Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2024-05-20 20:50:08 +08:00
Christian Clason
5c2616846a vim-patch:9.1.0425: filetype: purescript files are not recognized
Problem:  filetype: purescript files are not recognized
Solution: recognize '*.purs' files as purescript filetype,
          include basic purescript filetype plugin
          (Riley Bruins)

Reference: https://github.com/purescript/documentation/blob/master/language/Syntax.md#comments

closes: vim/vim#14813

155583a5c3

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2024-05-20 14:43:12 +02:00
Christian Clason
70c0b03e61 vim-patch:9.1.0424: filetype: slint files are not recognized
Problem:  filetype: slint files are not recognized
Solution: Detect '*.slint' files as slint filetype,
          include basic sling filetype plugin
          (Riley Bruins)

closes: vim/vim#14808

aa3104b07a

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2024-05-20 14:43:12 +02:00
Christian Clason
b16b287b8f vim-patch:9.1.0421: filetype: hyprlang files are not recognized
Problem:  filetype: hyprlang files are not recognized
Solution: recognize 'hypr{land,paper,idle,lock}.conf' files
          as 'hyprlang' filetype, add hyprlang ftplugin
          (Riley Bruins)

closes: vim/vim#14803

5f1b115afd

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2024-05-20 00:13:40 +02:00
dundargoc
0f4f7d32ce refactor!: remove nvim and provider module for checkhealth
The namespacing for healthchecks for neovim modules is inconsistent and
confusing. The completion for `:checkhealth` with `--clean` gives

```
nvim
provider.clipboard
provider.node
provider.perl
provider.python
provider.ruby
vim.lsp
vim.treesitter
```

There are now three top-level module names for nvim: `nvim`, `provider`
and `vim` with no signs of stopping. The `nvim` name is especially
confusing as it does not contain all neovim checkhealths, which makes it
almost a decoy healthcheck.

The confusion only worsens if you add plugins to the mix:

```
lazy
mason
nvim
nvim-treesitter
provider.clipboard
provider.node
provider.perl
provider.python
provider.ruby
telescope
vim.lsp
vim.treesitter
```

Another problem with the current approach is that it's not easy to run
nvim-only healthchecks since they don't share the same namespace. The
current approach would be to run `:che nvim vim.* provider.*` and would
also require the user to know these are the neovim modules.

Instead, use this alternative structure:

```
vim.health
vim.lsp
vim.provider.clipboard
vim.provider.node
vim.provider.perl
vim.provider.python
vim.provider.ruby
vim.treesitter
```

and

```
lazy
mason
nvim-treesitter
telescope
vim.health
vim.lsp
vim.provider.clipboard
vim.provider.node
vim.provider.perl
vim.provider.python
vim.provider.ruby
vim.treesitter
```

Now, the entries are properly sorted and running nvim-only healthchecks
requires running only `:che vim.*`.
2024-05-19 11:46:34 +02:00
zeertzjq
62eb7e79a5
vim-patch:9.1.0418: Cannot move to previous/next rare word (#28822)
Problem:  Cannot move to previous/next rare word
          (Colin Kennedy)
Solution: Add the ]r and [r motions (Christ van Willegen)

fixes: vim/vim#14773
closes: vim/vim#14780

8e4c4c7d87

Co-authored-by: Christ van Willegen - van Noort <github.com@vanwillegen-vannoort.nl>
2024-05-18 07:09:05 +08:00
zeertzjq
5947f249f8
fix(move): half-page scrolling with resized grid at eob (#28821) 2024-05-18 07:00:29 +08:00
zeertzjq
5f9e7edae6
Merge pull request #28790 from luukvbaal/vim-9.1.0414
vim-patch:9.1.{0414,0416}
2024-05-18 06:13:46 +08:00
Gregory Anders
4c0d18c197
fix(vim.iter): enable optimizations for arrays (lists with holes) (#28781)
The optimizations that vim.iter uses for array-like tables don't require
that the source table has no holes. The only thing that needs to change
is the determination if a table is "list-like": rather than requiring
consecutive, integer keys, we can simply test for (positive) integer
keys only, and remove any holes in the original array when we make a
copy for the iterator.
2024-05-17 14:17:25 -05:00
Luuk van Baal
f178b8ba49 vim-patch:9.1.0414: Unable to leave long line with 'smoothscroll' and 'scrolloff'
Problem:  Unable to leave long line with 'smoothscroll' and 'scrolloff'.
          Corrupted screen near the end of a long line with 'scrolloff'.
          (Ernie Rael, after 9.1.0280)
Solution: Only correct cursor in case scroll_cursor_bot() was not itself
          called to make the cursor visible. Avoid adjusting for
          'scrolloff' beyond the text line height (Luuk van Baal)

b32055e504

vim-patch:9.1.0416: some screen dump tests can be improved

Problem:  some screen dump tests can be improved (after 9.1.0414)
Solution: Make sure screen state changes properly and is captured in the
          screen dumps (Luuk van Baal)

2e642734f4
2024-05-17 20:28:14 +02:00
Justin M. Keyes
aec4938a21
feat(api): broadcast events to ALL channels #28487
Problem:
`vim.rpcnotify(0)` and `rpcnotify(0)` are documented as follows:

    If {channel} is 0, the event is broadcast to all channels.

But that's not actually true. Channels must call `nvim_subscribe` to
receive "broadcast" events, so it's actually "multicast".

- Assuming there is a use-case for "broadcast", the current model adds
  an extra step for broadcasting: all channels need to "subscribe".
- The presence of `nvim_subscribe` is a source of confusion for users,
  because its name implies something more generally useful than what it
  does.

Presumably the use-case of `nvim_subscribe` is to avoid "noise" on RPC
channels not expected a broadcast notification, and potentially an error
if the channel client reports an unknown event.

Solution:
- Deprecate `nvim_subscribe`/`nvim_unsubscribe`.
  - If applications want to multicast, they can keep their own multicast
    list. Or they can use `nvim_list_chans()` and `nvim_get_chan_info()`
    to enumerate and filter the clients they want to target.
- Always send "broadcast" events to ALL channels. Don't require channels
  to "subscribe" to receive broadcasts. This matches the documented
  behavior of `rpcnotify()`.
2024-05-17 07:37:39 -07:00
zeertzjq
42aa69b076
fix(path): avoid chdir() when resolving path (#28799)
Use uv_fs_realpath() instead.

It seems that uv_fs_realpath() has some problems on non-Linux platforms:
- macOS and other BSDs: this function will fail with UV_ELOOP if more
  than 32 symlinks are found while resolving the given path.  This limit
  is hardcoded and cannot be sidestepped.
- Windows: while this function works in the common case, there are a
  number of corner cases where it doesn't:
  - Paths in ramdisk volumes created by tools which sidestep the Volume
    Manager (such as ImDisk) cannot be resolved.
  - Inconsistent casing when using drive letters.
  - Resolved path bypasses subst'd drives.

Ref: https://docs.libuv.org/en/v1.x/fs.html#c.uv_fs_realpath

I don't know if the old implementation that uses uv_chdir() and uv_cwd()
also suffers from the same problems.
- For the ELOOP case, chdir() seems to have the same limitations.
- On Windows, Vim doesn't use anything like chdir() either. It uses
  _wfullpath(), while libuv uses GetFinalPathNameByHandleW().
2024-05-17 18:39:01 +08:00
vanaigr
4b02916334
perf(treesitter): use child_containing_descendant() in has-ancestor? (#28512)
Problem: `has-ancestor?` is O(n²) for the depth of the tree since it iterates over each of the node's ancestors (bottom-up), and each ancestor takes O(n) time.
This happens because tree-sitter's nodes don't store their parent nodes, and the tree is searched (top-down) each time a new parent is requested.

Solution: Make use of new `ts_node_child_containing_descendant()` in tree-sitter v0.22.6 (which is now the minimum required version) to rewrite the `has-ancestor?` predicate in C to become O(n).

For a sample file, decreases the time taken by `has-ancestor?` from 360ms to 6ms.
2024-05-16 16:57:58 +02:00
Justin M. Keyes
27fb62988e NVIM v0.10.0
For notable changes, see runtime/doc/news.txt (or `:help news` in Nvim).
Following is a list of fixes/features commits.

BREAKING
--------------------------------------------------------------------------------
- 649dd00fe2 remove deprecated functions
- 0370e4def0 remove neovim qt
- 880f7d12fe remove vimballs (#22402)
- c48b1421af rename "playground" => "dev" #23919
- 2f85bbe615 rewrite TOhtml in lua
- abe39f2b24 api: change return type of nvim_win_text_height to Dict (#24365)
- 7180ef6901 api: nvim_open_win: noautocmd blocks all autocmds #28192
- 700cab0068 events: trigger CursorMoved later on switching window (#23711)
- e4a136f713 ex_cmds: remove :behave
- e5e0bda41b lsp: add vim.lsp.status, client.progress and promote LspProgressUpdate (#23958)
- 5a363ccac8 lsp: deprecate trim_empty_lines
- 5a2536de0c lsp: move changetracking to separate file (#26577)
- 58618d208a lsp: promote LspRequest to a full autocmd and enrich with additional data (#23694)
- 1b9ccd38a1 lsp: rename vim.lsp.get_active_clients to get_clients (#24113)
- eb1f0e8fcc lsp: replace snippet parser by lpeg grammar
- 448907f65d lsp: vim.lsp.inlay_hint.get(), enable(), is_enabled() #25512
- 7caf0eafd8 lua: add stricter vim.tbl_islist() and rename old one to vim.tbl_isarray() (#16440)
- 747264320c mappings: remove #n as a notation for a function key (#17318)
- f7da472257 options: graduate shortmess+=f flag
- c3d1d9445c options: graduate some more shortmess flags
- 5df4fdf253 options: make OptionSet `v:` values use typval
- 881d17a113 options: remove compatible behaviours for vim 5.0 and earlier
- e19cc9c9b7 options: unify `set_option` and `set_string_option`
- db590e96d5 startup: "nvim -l" message does not end with newline #24215
- 2ca076e45f treesitter: incremental injection parsing
- f5dc453109 treesitter: new standard capture names
- fc0ee871de treesitter: remove deprecated legacy injection format
- 6debb18523 treesitter: remove duplicated diagnostic code (#24976)
- 18da6964cc vim.iter: remove vim.iter.map/filter/totable #26138
- 9b028bd64f vim.iter: rename xxback() => rxx() #28503
- 8d4a53fe6e vim.json: remove global options, "null", "array_mt" #24070
- 40ce857797 vim.ui: change open() to return `result|nil, errmsg|nil` #28612
- e0d92b9cc2 vim.ui: change open() to return pcall-like values #28502

FEATURES
--------------------------------------------------------------------------------
- a66b0fdfaa NVIM_APPNAME supports relative paths #25233
- c0beb8173f add .luarc.json (#24592)
- 14b7ffcf89 add __call typing for vim.inspect()
- ca7e488cfe add link in issue template to minimal config template
- 4bf47222c9 add vim.text module (#26069)
- 0ebc4de0ff allow opting in to builtin clipboard providers (#28083)
- e8d3c4cccb generate types and docs for v variables
- 29fe883aa9 ignore swapfile for running Nvim processes #25336
- 28d1640dd6 improve return type annotations for vim.api.*
- 199a990c9e report "build" in vim.version() #23925
- e688793253 tostring(vim.version())
- c559ab0ae6 update unicode tables (#27317)
- ecdb6465e2 vim.version() returns a Version object
- 4b60267f82 :source: source current ft=lua buffer as Lua code (#23802)
- 428edcde70 api: add forward and back mouse buttons
- 037ea6e786 api: add nvim__redraw for more granular redrawing
- ca9f6f5694 api: add nvim_tabpage_set_win (#27222)
- db8fe63a93 api: add nvim_win_text_height (#24236)
- 16513b3033 api: allow floats to be opened in non-current tabpage (#28480)
- 6b4970f6e0 api: allow open_win/win_set_buf in the cmdwin in some cases
- 5d921e28c1 api: allow win_close in cmdwin to close wins except previous
- 472271199e api: allow win_hide to close cmdwin or non-previous windows
- 6bba4beced api: make nvim_open_win support non-floating windows (#25550)
- b162adbb7c api: pass 0 to nvim_get_chan_info for current channel (#27321)
- 42bbc4fabc api: support abbreviations in nvim_set_keymap
- 98a4ed0a11 api: support getting abbreviations (#26868)
- d3d7d763f3 builtin: improve types
- 748bc4d22d clipboard: add OSC 52 clipboard support
- db57df04b6 clipboard: enable OSC 52 clipboard provider by default (#26064)
- 734848dc1a colorscheme: add semantic tokens modifiers to builtin color scheme
- 1e0996b572 colorscheme: update treesitter groups
- 73de98256c comment: add built-in commenting
- ae4ca4edf8 complete: support f flag for complete buffer part
- 01c51a4913 completion: support completing more string options
- ae3685798d decoration: allow conceal_char to be a composing char
- 30a5c28c87 decoration_provider: log errors as error messages
- 9711370c26 defaults: add :Inspect to right-click menu (#28181)
- 2613ba5000 defaults: enable 'termguicolors' by default when supported by terminal
- 513fc46195 defaults: improve :grep defaults #28545
- c26dc1f77c defaults: map Q and @x to repeat in Visual mode (#26495)
- 8758c6fb87 defaults: set g:netrw_use_errorwindow = 0 #24179
- 1d81d7a268 defaults: treat "•" as a list item prefix #24623
- 20b38677c2 defaults: use ripgrep (rg) for 'grepprg' if available
- 61063653b0 defaults: visual CTRL-R for LSP mappings #28537
- 4ee656e4f3 diagnostic: add `vim.diagnostic.count()` (#26807)
- 73034611c2 diagnostic: add default mappings for diagnostics (#16230)
- fc6d713dd8 diagnostic: add support for many namespaces filtering in GetOpts (#28045)
- 5ed9916a28 diagnostic: enable(…, opts)
- e780177506 diagnostic: filter diagnostics by specific severities (#24736)
- b13e63db1d diagnostic: goto functions jump to highest severity (#28490)
- 26765e8461 diagnostic: is_enabled, enable(…, enable:boolean)
- 9cb7e00b97 diagnostic: provide more control over virtual text display (#24724)
- ee41153a94 diagnostic: revert default behaviour of goto_next/prev()
- 07b60efd80 diagnostic: specify diagnostic virtual text prefix as a function
- a3b3978474 diagnostics: support numhl and linehl for diagnostic signs
- 0381f5af5b diff: grouping optimization for linematch algorithm
- 42333ea98d docs: generate builtin.txt (#24493)
- 9beb40a4db docs: replace lua2dox.lua
- 1d4a5cd185 eval: exists() function supports checking v:lua functions (#26485)
- 4a1ad676ce ex_cmds: no error on :lua with {range} and {code} (#27290)
- c2433589dc ex_cmds: ranged :lua #27167
- b04286a187 extmark: support proper multiline ranges
- 1c032ad703 extmark: window scoped extmark
- 68cb4a7405 extmarks: add "undo_restore" flag to opt out of undo-restoring
- 4e6f559b8c extmarks: add 'invalidate' property to extmarks
- c249058758 extmarks: add sign name to extmark "details" array
- bbd5c6363c extmarks: add virt_text_repeat_linebreak flag (#26625)
- 15e77a56b7 extmarks: subpriorities (relative to declaration order) (#27131)
- f0884f21fa extmarks: support hl_mode "combine" for inline virt_text (#24099)
- 372aa2eb3d float: add fclose command
- 35570e4a11 float: implement footer
- 4200a0f167 float: support toggle show float window
- 1233ac467d fold: transparent foldtext
- 71530cc972 folds: support virtual text format for 'foldtext' (#25209)
- 38b9c322c9 fs: add vim.fs.root (#28477)
- e3e6fadfd8 fs: expose join_paths as `vim.fs.joinpath` (#23685)
- bc67cf3ccd gen_help_html: add anchors to help tags #25112
- b0cf9c5fee gen_help_html: ignore pi_netrw.txt errors
- 81d8fce8f9 gen_help_html: non-default vimdoc.so parser
- da09f9b551 gen_lsp.lua: protocol.Methods #24504
- f41496ce74 gen_lsp.lua: sort by name, handle failure #24504
- 3692fd4c87 gen_lsp.lua: validate CLI args #26514
- 2ff2785c39 health: checkhealth buffer can show in a split window (#26714)
- 4382d2ed56 health: fold successful healthchecks #22866
- d1bc6fca71 health: list attached buffers in LSP report #23561
- 2877672d70 health: make :checkhealth support more split modifiers (#26731)
- ddda5e0a48 help: hide filename of "gO" outline using conceal #27547
- e72c0cd920 highlight: Allow hyphens (-) in highlight group names (#24714)
- 986bf7e78d highlight: add `FloatFooter` highlight group
- 574519d9d6 highlight: tweak default color scheme
- 64a14026d7 highlight: update default color scheme
- a79694a08e issue_template: instruct not to include a package manager
- 69ffbb76c2 iter: add `Iter.take` (#26525)
- cebc00603e l10n: update Turkish translations #24246
- fec51229c4 l10n: update Ukrainian translations (#24882)
- 996dd36c77 lsp: add actionable advice to lsp client quit error msg (#24510)
- 4ff3217bbd lsp: add fswatch watchfunc backend
- 643546b82b lsp: add handlers for inlay hints (#23736)
- 317c80f460 lsp: add method filter to get_active_clients (#24319)
- 6888607415 lsp: add more LSP defaults (#28500)
- 0fe86f7e24 lsp: add opts paramater to vim.lsp.codelens.refresh
- 131a1ee82d lsp: add original LSP Location as item's user_data in locations_to_items (#23743)
- f1775da07f lsp: add snippet API (#25301)
- db0ec84fb4 lsp: add type annotations for lsp.util.locations_to_items (#26694)
- f190f758ac lsp: add vim.lsp.buf.subtypes(), vim.lsp.buf.supertypes() (#28388)
- 451bc50d40 lsp: deprecate severity_limit
- e9b85acfbb lsp: enable workspace/didChangeWatchedFiles by default (#23190)
- 4a09c178a1 lsp: fallback to code-action command on resolve failure (#25464)
- 2f22ed6a00 lsp: handle multiple clients in omnifunc (#24381)
- 63b3408551 lsp: implement textDocument/diagnostic (#24128)
- 5e3cf9fb4b lsp: improve control over placement of floating windows (#24494)
- 15641f38cf lsp: include positionEncodings in default client capabilities
- ddd92a70d2 lsp: initial support for dynamic capabilities (#23681)
- ca5de9306c lsp: inlay hints #23984
- 350d818564 lsp: inlay_hint.is_enabled({filter}) #28523
- 33e1a8cd70 lsp: map K to hover by default #24331
- 97bea3163a lsp: more annotations
- 37079fca58 lsp: move inlay_hint() to vim.lsp (#24130)
- 12c2c16acf lsp: opt-in to dynamicRegistration for inlay hints (#24102)
- a49924a318 lsp: remove notify from vim.lsp.buf_detach_client (#25140)
- 8149bd089e lsp: report fswatch errors
- fb54e6980e lsp: set client offset_encoding if server supports positionEncoding
- 96e19533f6 lsp: set kind in select call for codelens #23889
- 9af3559643 lsp: set workDoneToken in initialize request (#28182)
- f736b075d3 lsp: snippet parsing using lpeg
- 134b9ec483 lsp: soft deprecate vim.lsp.for_each_buffer_client (#24104)
- 63f9c2da9a lsp: support completion itemDefaults
- 3f788e73b3 lsp: support connect via named pipes/unix domain sockets (#26032)
- 7e36c8e972 lsp: support for choice snippet nodes
- 5c40f3e86a lsp: support vim.lsp.ListOpts.loclist in location_handler()
- abd2352bd8 lsp: update LSP protocol 3.18 typings to date (#28730)
- cfd4a9dfaf lsp: use treesitter for stylize markdown
- d5063f4b29 lsp: vim.lsp.inlay_hint.enable(nil) applies to all buffers #28543
- c0952e62fd lua: add `vim.system()`
- 9248dd77ac lua: add hl priority opts on yank (#23509)
- 6425869771 lua: add meta file for vim submodules (#24525)
- 3734519e3b lua: add noref to deepcopy
- 7c661207cc lua: add ringbuffer (#22894)
- 877d04d0fb lua: add vim.func._memoize
- ab1edecfb7 lua: add vim.iter (#23029)
- d675bd01b1 lua: allow vim.F.if_nil to take multiple arguments (#22903)
- c379d72c49 lua: allow vim.wo to be double indexed (#20288)
- e52c25b761 lua: deprecate vim.tbl_add_reverse_lookup
- f1dfe32bf5 lua: enable(enable:boolean, filter:table) #28374
- 5b40a1c09d lua: implement Iter:join() (#26416)
- c01e624b07 lua: more specific error messages for vim.api type checking
- e1ff2c51ca lua: pass keys before mapping to vim.on_key() callback (#28098)
- 2db719f6c2 lua: rename vim.loop -> vim.uv (#22846)
- 6c0812d92e lua: specific error messages for type checking `opts` params
- fd089c8e50 lua: typing for vim.fn.* (#24473)
- 302d3cfb96 lua: use callable table as iterator in vim.iter (#23957)
- 51c754b62e lua: use keyset type information
- 8e5c48b08d lua: vim.fs.normalize() resolves ".", ".." #28203
- 7e70ca0b48 lua: vim.keycode (#22960)
- 9e86f473e0 lua: vim.region accepts getpos() arg (#22635)
- 4d04feb662 lua: vim.tbl_contains supports general tables and predicates (#23040)
- 48d533272e lua-types: types for vim.api.* (#24523)
- 25e7299707 man: allow opening pages in current window (#27861)
- 08db61b19b man: respect 'wrapmargin' when wrapping man pages (#24091)
- f9944a78bc meta: add types for vim.lpeg
- deb6fd6704 msgpack-rpc: show actual request id in error message
- 01fe6b9e6a msgpack_rpc: support out-of-order responses on `msgpack-rpc`
- 619407eb54 nvim_open_term: convert LF => CRLF (#26384)
- e98decf9a6 quickfix: support -q - to read 'errorfile' from stdin (#27303)
- 7b0123dd6a remote: avoid --remote-ui infinite loop (#24465)
- cca6c4c698 rpc: allow empty string key in msgpack => Vim conversion
- d0d4160dd1 runtime: highlight hl groups in syntax.txt (#25050)
- 5f4895200a scripts: add lsp_types.lua (#23750)
- 4e6096a67f server: allow embed with listen (#25709)
- 170c890dca shortmess: "q" flag fully hides recording message (#27415)
- d3582e102b statuscolumn: re-evaluate for every screen line (#25885)
- 224f303ee5 stdlib: add vim.base64 module (#25843)
- fa131de9ad tabline: middle mouse button now closes tab (#27522)
- c855eee919 term: enable reflow by default (#21124)
- cd1b14f027 termdebug: improve `:Evaluate` floating window (#26621)
- cffdf102d4 terminal: allow :terminal to take modifiers (#15427)
- 0c89854da1 terminal: close shell terminals automatically
- 7589336120 terminal: respond to OSC background and foreground request (#17197)
- beca827212 terminal: trigger TermRequest autocommand events (#22159)
- c6ec7fa8d7 treesitter: add 'injection.self' and 'injection.parent'
- 6cfca21bac treesitter: add `@injection.filename`
- 5d8ab32f38 treesitter: add a query editor (#24703)
- cb0a1a10b2 treesitter: add bash parser and queries
- bb15fa0356 treesitter: add folding for `InspectTree` (#27518)
- 9ce1623837 treesitter: add foldtext with treesitter highlighting (#25391)
- 31c4ed26bc treesitter: add injection language fallback (#24659)
- 28f54a7878 treesitter: add lang parameter to the query editor (#25181)
- 88c8803aa1 treesitter: add python parser and queries
- c194acbfc4 treesitter: add query_linter from nvim-treesitter/playground (#22784)
- af040c3a07 treesitter: add support for setting query depths
- 11844dde81 treesitter: bundle markdown parser and queries (#22481)
- 5e6240ffc2 treesitter: handle quantified fold captures
- f69658bc35 treesitter: highlight Lua files by default (#26824)
- 988b472d90 treesitter: highlight help files by default (#26347)
- 845d5b8b64 treesitter: improve query error message
- 189fb62032 treesitter: improved logging (#23638)
- c0b99bb1de treesitter: show root nodes in :InspectTree (#26944)
- cb46f6e467 treesitter: support URLs (#27132)
- ff6092b4ee treesitter: update Bash parser and queries to v0.21.0
- 8dda630ae9 treesitter: update C parser and queries to v0.21.0
- 3836eeb901 treesitter: update C queries from upstream
- aca4ad430b treesitter: update Lua parser and queries to v0.1.0
- 5e875ae8d0 treesitter: update Markdown parsers and queries to v0.2.1
- 8a3385dde7 treesitter: update Python parser and queries to v0.21.0
- 20dcbaaaf8 treesitter: update Vim parser and queries to v0.4.0
- 987dff6713 treesitter: update Vimdoc parser and queries to v2.4.0
- 1384bebd5a treesitter: update query parser to v0.2.0
- 668f16bac7 treesitter: upstream query omnifunc from playground (#23394)
- a478bf936b treesitter: use 0-based indexing to show ranges in `:InspectTree`
- ac8ed77afb tui: add 'termsync' option (#25871)
- 4ee9e58056 tui: query extended underline support using DECRQSS (#28052)
- b4b7ca2d54 tui: support DCS responses in TermResponse event (#26061)
- 622ae2f53e tui: support Super and Meta modifiers (#24357)
- a142670360 tui: support undercurl in WezTerm (#28037)
- 56627ca242 tui: use TermResponse event for OSC responses (#25868)
- 32b49448b2 tutor: add Japanese tutor #27268
- 9c2270b834 types: add `test/.luarc.json`
- d3a8e9217f ui: add chdir UI event (#27093)
- 6ea6b3fee2 ui: add support for OSC 8 hyperlinks (#27109)
- b72931e704 ui: allow non-zero 'cmdheight' with ext_messages
- 2615ed879e ui: allow to get the highlight namespace
- e38027ef69 ui: completeopt support popup like vim
- 2e4e12756a ui: indicate margins for the area used by win_viewport
- efa9b299a7 ui: inline virtual text
- dacd34364f ui-ext: make 'mousehide' into proper ui_option (#25532)
- 43ded8d358 version: unverbose ":version", ":verbose version" #24195
- 0a598c13b1 vim.deprecate: only issue warning if neovim version is high enough
- a767c046f4 vim.iter: add Iter:flatten  (#26786)
- af6e6ccf3d vim.ui: vim.ui.open, "gx" without netrw
- fa4b02fa67 vim.version: add `vim.version.le` and `vim.version.ge`
- 27a566f3f8 vimdoc: support Markdown code blocks (#25127)

FIXES
--------------------------------------------------------------------------------
- f5573fba3d Remove nested for_each_tree in TSTreeView (#26328)
- ae28ef327e adjust error message for error in UI event callback (#28200)
- ebe489d8f0 allow multiline message for echoerr (#25380)
- 592bc831ce avoid ui_grid_cursor_goto when drawing window separators
- d6483793e1 buffer overrun in lmpack_session_receive
- 3bbb0aa399 checkhealth warning even if init.lua exists #25306
- 5cb906e91c correct versions in deprecation warnings
- 118fd8367c deduplicate gen_cflags
- eb4676c67f disallow removing extmarks in on_lines callbacks (#23219)
- 6e9b204afb doc errors
- 77d3526a3d explain that user should run nvim with -V1 to see more information
- fd791db0ec fix ASAN errors on clang 17 (#25469)
- bb38c066a9 fix compiler warning from clang
- 478273a423 fix iter_matches call in query linter (#27496)
- bb7324292c flush UI state before blocking in vim.wait (#25938)
- 44d4ae448d function was renamed (#23772)
- 1dd700a8d9 gf fails on "foo/bar.txt:1:2" on Windows
- 6e703f778f handle argv not present in nvim_get_chan_info
- 56dc8b9212 heap-buffer-overflow in file_name_in_line
- 74b2f6c3d9 ignore non-existent properties during header generation
- f5a09f1b03 invoke changed_bytes when rewriting <Tab> char #25125
- b8273c9a33 lua annotations
- 69d49727d7 luacheck
- 4ce3159e24 missing case in setxattr error handling (#26176)
- 41fb98d6fa move fswatch linux check inside of vim.schedule (#27824)
- ba58c6f8a4 only attempt to close timer if not already closing (#26047)
- b400b947f3 prevent child processes from inheriting ui channel file descriptors
- 99b8a343e1 quick update, squash later
- 83b51b36aa raise TS min version
- a090d43d61 splitting of big UI messages
- 2424c3e696 support UNC paths in vim.fs.normalize
- 43e76cc346 tostring(vim.version()) fails if build is NIL #24097
- 8c7a8be274 transposed xcalloc arguments (#28695)
- 35f453f65d type warnings in shared.lua
- f112ac73bd unreliable "checkhealth completions" test
- b32b5b2711 use BEL to terminate OSC 11 request (#26335)
- d95e3a4c9c use no_ff instead of ffdos as condition
- a1bec02c1e use snprintf instead of sprintf
- ca887b80a9 version-range < and <= #23539
- c1ee187f82 vim.loop in luv threads (#23924)
- fe4583127f vim.validate() order is not deterministic #28377
- be8b15200d windows timeouts have exit code 1
- 1f8fb7c000 :let: fix error when applying operator to boolean option (#24030)
- 5a3752889c NVIM_APPNAME: show error message if $NVIM_APPNAME is invalid
- c4ad15ae32 PVS/V009: add top-level message
- 128e194f64 PVS/V1001: variable is assigned but is not used
- 1bbbca267d PVS/V547: expression is always true/false
- 592e4472da PVS/V564: the '|' operator is applied to bool type value
- 30d311ebcf PVS/V592: expression is enclosed by parentheses twice
- 3ecd45ded0 api: allow negative column arguments for nvim_buf_set_text (#23501)
- 3ac952d4e2 api: avoid assertion when autocmd group id is 0 (#23210)
- b2a8a93147 api: avoid immediate TextChanged with nvim_create_buf (#25492)
- ef7ae66eef api: avoid integer truncation
- b1e24f240b api: avoid open_win UAF if target buf deleted by autocmds
- 0a81ec14a4 api: better topline adjustments in nvim_buf_set_lines
- c18f3cfcdb api: crash after nvim_win_set_config title/footer validation error (#26606)
- aa4e47f704 api: disallow some more functions during textlock
- 22d9338afc api: disallow win_set_buf from changing cmdwin's old curbuf (#24745)
- da979ae04b api: do not re-apply win_config.style when missing
- 344906a08f api: do not update grid position in nvim_win_set_cursor (#28235)
- 22205f36a6 api: don't change title when setting buffer in a window (#23492)
- 711a2f5ff6 api: don't leak memory with nvim_win_get_ns (#27570)
- 1cf51a07a6 api: don't set coladd of mark (#26648)
- 5fd1bac65e api: don't use stl 'fillchar' for "use_statuscol_lnum" (#27501)
- a3751f5de2 api: dont change curwin for nvim_win_set_height
- 1ff4562502 api: dont change curwin for nvim_win_set_width
- 59fed8bb64 api: extmark highlight groups not always included in details (#23179)
- 9b9030ff2c api: fix inconsistent behavior of topline touched in recent refactor
- fc2a56fe61 api: fix set_lines viewport adjustment, but this time good
- b7763d7f6b api: get virtual text with multiple hl properly (#25307)
- b3be7b7413 api: handle NUL in nvim_err_write() and nvim_out_write() (#25354)
- 132bbd1cbd api: handle clearing out last line of non-current buffer
- d942c2b943 api: handle win_split_ins failure properly
- 5cfdaaaeac api: ignore 'autochdir' when renaming other buf (#28376)
- 2fc2343728 api: ignore 'autochdir' when setting buf in other win (#28371)
- 7367838359 api: limit depth of nvim_cmd (#27225)
- 0da27e9bde api: load buffer first on nvim_buf_set_lines (#25823)
- 4e5c633ed4 api: make getting explicit empty hl in virtual text work (#28697)
- d05d63a18f api: make nvim_get_hl not return non-existing groups
- a70eae57bd api: make open_win block only enter/leave events if !enter && !noautocmd
- 5d58136ccc api: make open_win/win_set_config check if splitting allowed
- 4ec8fd43bf api: make width/height for split by nvim_open_win work (#28341)
- b1577d371a api: make win_set_config with "win" for splits need "split/vertical"
- 0330dd9e69 api: mark nvim__complete_set as experimental #28579
- d22172f36b api: more intuitive cursor updates in nvim_buf_set_text
- b051b131f5 api: nvim_buf_get_offset in a new buffer with zero or one lines
- e0453d7f57 api: nvim_cmd{cmd="win_getid"} parsed as :winsize #24181
- 6091df6b7a api: nvim_create_buf assert fails if autocmds set &swapfile
- d5c23d72a5 api: nvim_create_buf leaks memory if buffer is loaded early
- b7708eac24 api: nvim_get_hl should return default flag
- a741c7fd04 api: nvim_parse_cmd error message in pcall() #23297
- e55a502ed4 api: open_win fire Buf* events when !enter && !noautocmd if entered early
- a873f33993 api: open_win fire BufWinEnter for other buffer when !enter && !noautocmd
- e7c262f555 api: patch some cmdwin/textlock holes
- a9968912b7 api: redundant error when using `nvim_cmd` (#24010)
- dbcba26bf1 api: revert unintended change of optional bool params
- b25753381c api: set script context when using nvim_set_hl (#28123)
- d3ea9a04bc api: update "w_scwidth" in nvim_eval_statusline()
- c971f538ab api: update grid cursor in nvim_win_set_cursor()
- 130cb4815a api: use a conditional stack for nvim_cmd (#26341)
- cf9f002f31 api: use correct buffer for "range" in nvim__redraw (#28614)
- 77118d0da8 api: use text_locked() to check textlock
- bcb70eeac4 api: win_set_config autocmds crash when moving win to other tabpage
- 233649bc75 api: win_set_config fires unnecessary autocmds
- b52d15853e api: win_set_config set tp_curwin of win moved from other tabpage
- 54022a2946 api: win_set_config update statuslines after removing splits
- a9cd8467cb api: wrong nvim_buf_set_extmark error for invalid hl_mode
- 4d3a38ac07 api, lua: handle setting v: variables properly (#25325)
- 92760a7f42 api, lua: make blank lines in a message work properly (#24244)
- 08fc1ebbaa api/buffer: fix handling of viewport of non-current buffer
- 24e3ee9d07 api/options: validate buf and win
- 139e6f68f9 autocmd: API functions accept garbage after event name #25523
- 02d00cf3ee backup: E1509 when writing extended attr to symlink (#28014)
- 746a153bc1 base64: only check padding if leftover index is set (#25854)
- 533e01a75b base64: properly handle embedded NULLs when decoding (#28349)
- 095bd8d0f8 buffer: do not filter help buffer
- e5d9b15044 buffer_updates: correct buffer updates when splitting empty line
- 11865dbe39 build: better deps for doc
- ffaf74f147 build: distinguish vim.mpack from global require'mpack'
- f9416470b1 build: include FindPackageHandleStandardArgs
- ade42d531b build: teach cmake about vvars
- da7178cbbf builtin: fix incorrect optional fields for fn.sign_define
- 6fa0f303d7 builtin: parameter mismatch between winsaveview and winrestview
- 3159a2c28f change: update fold after on_bytes (#26364)
- 342c7da4bd channel: use os_write() instead of fwrite() for stderr (#26689)
- cd6458123f charset: fix wrong display of 0xffff (#24158)
- 603f3b36a4 checkhealth: error in node.js check #28348
- b0978fca6b checkhealth: fix crash due to incorrect argument type
- 7f94a032e1 checkhealth: shell_error and cpanm module
- bfdec5b0e7 clang: null pointer dereference in parse_msgpack #25389
- 1027ccac6d clangd: check size of array before applying qsort on it
- cdd8017469 clangd: set block pointer to null in case map is empty
- 6851b265ba clipboard: don't pass --foreground to wl-copy (#25481)
- c3de6524a5 clipboard: ignore exit caused by signal #23378
- 3128cff6b1 clipboard: increase OSC 52 wait timeout (#25936)
- 46ceefb52b clipboard: make getreg() accurate for clipboard registers (#26740)
- d2983dcdb1 clipboard: make osc52 work with PUC Lua (#26014)
- e51e524175 cmake: restore previously undocumented workround, now documented
- 3688735c2b cmdline: don't redraw 'tabline' in Ex mode (#24123)
- c72d877c33 cmdline: wrong 'incsearch' highlighting after :redraw (#27947)
- bc67bbe446 codelens: add buffer and line checks before displaying codelens (#23887)
- 2b1a6e7597 colorscheme: add missing LSP groups
- 0c850add3e colorscheme: default statusline groups usability #26921
- 8b23653695 colorscheme: link LSP semantic tokens to treesitter groups
- 62e0e0349c colorscheme: try .lua files in 'rtp' before .vim files in 'pp' (#23727)
- eca72def1f colorscheme: typo
- d4bd6b1eaa colorscheme: use explicit normal foreground in syntax groups
- 3c724fe1f3 column: 'statuscolumn' not drawn after virt_lines with "n" in 'cpo' (#22967)
- cdc028e97d column: add truncated width during estimation for 'statuscolumn'
- e89071522c column: always set b_signcols.max
- c126a3756a column: apply numhl signs when 'signcolumn' is "no" (#26167)
- 2ded2e75f4 column: avoid exceeding configured 'signcolumn' width
- b50fdcba4a column: clear "b_signcols" before moving saved marks
- 13d50c3b13 column: clear "b_signcols" when marktree is cleared
- ec74538044 column: correct width after truncated 'statuscolumn' error (#26737)
- 2bdef6dd2a column: don't overflow sign column with extmark signs (#23854)
- bab4bcdefb column: don't reset 'statuscolumn' width after it has been drawn
- c509f4907b column: fill 'statuscolumn' clickdefs with evaluated width (#26891)
- 25e62697c3 column: fix wrong cursor with 'statuscolumn' and cpo+=n (#24268)
- dbf6be296d column: full redraw with 'stc, 'rnu' and inserted lines (#27712)
- 7d0a23973b column: handle unprintable chars in 'statuscolumn' (#24198)
- 0db6946b39 column: handle w_redr_statuscol at end filler lines (#27365)
- 97122eaa1c column: ignore empty signcols range (#28177)
- 967c7abde3 column: keep track of number of lines with number of signs
- f871fee8b6 column: pass kFalse when initializing "b_signcols.count"
- 44d4f03573 column: rebuild status column when sign column is invalid
- c6864b0d14 column: redraw 'statuscolumn' on wrapped lines with 'relativenumber'
- 35cec0de4a column: redraw and update signcols for paired extmark
- d88814ef68 column: remove sign from line it was previously on with undo
- df399ea0d2 column: reset decor state before starting from top
- 5a4e0b837f column: use a single path for sign sorting (#27431)
- a878e02d5d column: use maxwidth to allocate/fill 'statuscolumn' click defs #24190
- 783b0aba41 completion: check that healthcheck name is string (#28458)
- fbeef0d4ef completion: don't add backslashes to runtime pattern (#24296)
- cdc8bacc79 completion: filter results with complete+=f (#26029)
- af8500af64 completion: improve popup window position (#26739)
- d1b2a5cf5f completion: make sure the buffer name is valid (#25975)
- e9b9a86cd5 context: don't crash on invalid arg to nvim_get_context (#25977)
- fdaf6bc557 context: don't leak memory on multiple invalid objects (#25979)
- 55be4a4e26 coverity: dead code #25562
- 6d698c86d0 coverity: unhandled retval for marktree_itr_get_overlap() #26518
- 6f49ed58c3 coverity/348240: memory leak in put_view()
- 9d48266bed coverity/471380: null dereference in get_local_additions()
- ae48d965d7 coverity/477623,477624: guard null pointer dereference in kv_concat_len (#27022)
- 2b0acacb3c decor: allow adding providers during redraw
- 5ca330859c decor: check decor kind before accessing union field (#27205)
- 60d320dea3 decoration_provider: don't leak memory on error (#24410)
- 65738202f8 decorations: better approximation of botline #24794
- 2accf24805 decorations: crash with revised mark with changed decoration flags
- a0e9ef09d7 decorations: do not apply sign highlight id as range attr id
- fba17d5b88 decorations: fix imbalanced sign count
- 444f37fe51 decorations: incompletely displayed line should also get decorations
- dc48a98f9a decorations: validate botline for on_win
- 328a237351 defaults: auto-close terminal for &shell with args (#28276)
- 5aa1ba3efe defaults: background detection in tmux (#26557)
- 5e98439f6d defaults: diagnostic mappings descriptions #28646
- ccb5a76e5a defaults: don't use nvim_feedkeys in default mappings (#24520)
- 85cb0b0ddc defaults: make terminal autoclose not block other events (#27581)
- aa1d0ac095 defaults: only repeat macro for each selected line if linewise (#28289)
- eef2aedff6 defaults: remove tmux background detection passthrough (#27571)
- 5b45efbee6 defaults: set 'fsync' #26034
- 8df3742378 defaults: use augroup for default autocommands (#26933)
- a8e4ee2f2b defaults: validate 'channel' before responding to OSC request (#27594)
- 6318edadc3 defaults: visual hash (#) on text with "?"
- abd380e28d defaults: visual mode star (*,#) is fragile
- b9a0e762f1 defaults: visual star (*) on text with "?"
- 9b4b23493d defaults: wait until VimEnter to set background (#26284)
- 72e3d8c3f9 deps: bump luv to 1.48.0-2
- 87db6d894a deps: make sure --force-config takes effect
- 7aad4643f9 deps: remove stray conflict marker
- 8a6716682e deps: restore functionality of USE_EXISTING_SRC_DIR
- d4dc884012 deps: restore functionality of USE_EXISTING_SRC_DIR
- d272143318 diagnostic: always return copies of diagnostic items (#25010)
- 29d5ff6ac4 diagnostic: check for sign namespace instead of sign group
- 3d8f0cb695 diagnostic: check if delete failed in `qf_fill_buffer()` (#25932)
- 89ffdebd20 diagnostic: fix typing on field |diagnostic-severity|
- 83635e4e3d diagnostic: get border from config (#28531)
- 96f59e1b99 diagnostic: invalid col number  compare in next_diagnostic (#28397)
- ad76b050eb diagnostic: open_float on multi-line diagnostics #28301
- 37011bc45e diagnostic: rename buffer → bufnr in type annotation (#23042)
- 50284d07b6 diagnostic: typing
- a4fc3bb0e6 diagnostic: vim.diagnostic.get(…,{lnum=…}) on multi-line diagnostic #28273
- add1b10b79 diagnostic: virtual_text prefix function should have index and total (#25801)
- 35f475d0a5 diagnostics: if buffer not loaded, skip handlers that set extmark (#25628)
- 5a25dcc5a4 diff: filler lines for hunks bigger than linematch limit (#24676)
- 2f9ee9b6cf doc: improve doc generation of types using lpeg
- c4417ae70c doc: prevent doxygen confusion
- 67f5332344 docs: clean up non-docstring comments for vimdoc gen
- ae7020c667 docs: fix TSNode incorrect signatures
- ab65a98adb docs: ignore_invalid #24174
- f40df63bdc docs: make lines not overflow in vim docs
- 0a90e4b05a docs: match DocSearch style with site theme
- 0d149bb186 docs: the runtimepath is not the runtime path
- 957d05d16b docs: too much whitespace around <pre> blocks #24151
- d931b829e9 docs: vimdoc syntax errors
- 036da0d079 docs: vimdoc syntax errors
- 17c59e417f docs: vimdoc syntax errors
- 34b57508a7 drawline: check filler_todo in place of removed draw_state (#27889)
- 455bca1ba8 drawline: combine extmark highligh with area hl correctly
- 3299797150 drawline: consider position in linebuf for foldcolumn (#26803)
- 889f81c65f drawline: don't invoke on_line for filler line (#28219)
- 2b9d3869f8 drawline: don't use temporary "v" variable when not needed (#26777)
- 06694203e5 drawline: fix missing Visual hl on double-width fold char (#24308)
- d5488633f6 drawline: initialize linebuf_attr to 0 instead of -1 (#27840)
- e9280a68f7 drawline: initialize variable
- 2819718873 drawline: initialize variable
- 36941942d6 drawline: inline virt_text hl_mode inside syntax/extmark hl (#24273)
- 37b73cf14b drawline: make cursorlineopt=screenline work with resized grid
- be1d09c427 drawline: missing NUL termination when drawing TAB (#27307)
- 5b31447811 drawline: update prev_ptr after getting syntax attrs (#27072)
- 14839c5d18 edit: backspace adds extra spaces for inline virtual text (#28005)
- 267e90f31d edit: don't go to Terminal mode when stopping Insert mode (#27033)
- b2e8c0df20 edit: fix K_EVENT interfering with 'digraph' (#24258)
- 143a178332 editorconfig: add missing root validation (#23462)
- cbbda3bcd7 editorconfig: check that buffer is valid (#23922)
- abb8c2c453 editorconfig: do not set 'endofline'
- df2f5e3912 editorconfig: highlight properties with dashes (#24407)
- dc45fb4655 editorconfig: only warn once on errors
- cdbc3e3f3e editorconfig: syntax error regression
- bf0c69e504 eval: correct failure return value for readfile/blob (#27722)
- 5b312cd5f6 eval: make has('pythonx') work properly (#27739)
- 0e4086b741 eval: prevent double-free in garbage collection (#22990)
- 12d123959f eval: properly support checking v:lua function in exists() (#27124)
- b8c34efe33 eval: skip over v:lua properly (#27517)
- ad2fad9a3b event-loop: flush UI when no input is available (#25728)
- 6725565258 event-loop: process input before events (#27358)
- 58a1ef8e6a events: avoid unnecessary CursorMoved (#24675)
- bf9e92c81c events: check for WinResized/WinScrolled in terminal mode (#27226)
- dd24ea8195 events: don't expand non-file as file name
- 774a32e5fe events: null dereference in autocmd functions
- a8cfdf43bc events: trigger VimResume on next UI request (#24426)
- a114a21eff ex_getln: initialize pointer with NULL
- 9e7c4fe579 exception: remember whether message is multiline (#25351)
- 4a098b97e5 excmd: append original command to error message
- 75d9c413d4 excmd: make :def unknown rather than unimplemented (#23150)
- f1dd75c2af exitfree: don't use ex commands to close windows in free_all_mem()
- 79a558277b extmark: fix crash when stepping out from internal node
- a78fd18ed9 extmark: fix cursor position with both left and right gravity inline text
- 320e9c1c21 extmark: only invalidate unpaired marks on deleted rows
- 8e97edb93f extmark: restore extmarks when completing original text
- 2d33a766a1 extmarks: `U` changed_bytes after extmark_splice (#26501)
- 23c21e7630 extmarks: account for rightleft when drawing virt text (#25262)
- d54156ed08 extmarks: blending space shouldn't overwrite wide char (#26960)
- 54225bdb02 extmarks: crash with sign after many marks
- 65b1fd00a7 extmarks: do not remove decor from invalid old marks
- 437d35dbf7 extmarks: do not remove invalid marks from decor upon deletion
- a05bbc60ea extmarks: don't position overlay virt_text halfway a char (#24027)
- 4dd43e31db extmarks: don't show virt lines for end mark (#23792)
- dfa8b582a6 extmarks: draw TAB in virt_text properly with 'rl' (#25381)
- a6e4793baf extmarks: draw virt_text below diff filler lines properly (#25170)
- 958cc22836 extmarks: empty inline virt_text interfering with DiffText (#24101)
- 0534ad8ca5 extmarks: empty inline virt_text interfering with Visual highlight
- 31a51acdc3 extmarks: fix heap buffer overflow caused by inline virtual text (#23851)
- 9c41a81dec extmarks: fix virt_text_hide off-by-one hiding (#23795)
- a6dd67f5b6 extmarks: fix virt_text_hide with 'nowrap' and multibyte (#23757)
- 818d7f6daf extmarks: fix win_col virt_text drawn on wrong screen line (#25264)
- c4df2f08b6 extmarks: fix wrong highlight after "combine" virt_text (#24281)
- b65cd7ff1a extmarks: fix wrong virt_text position after wrapped TAB (#25168)
- 4c7cec4e29 extmarks: handle inline virt_text with empty chunk (#24005)
- ee3d4f6b90 extmarks: handle overwriting right half of wide char (#26951)
- f4f1ce1d16 extmarks: hide inline virt_text properly with 'smoothscroll' (#24106)
- 34a786bc49 extmarks: inline virt_text support multiple hl groups (#25303)
- 5a6c7c805b extmarks: make empty "conceal" respect &conceallevel = 1 (#24785)
- 510e1f131b extmarks: make right_align and win_col work on wrapped line (#23759)
- 215244f749 extmarks: missing "spell" and "conceal" in details (#27116)
- 35e50d79c6 extmarks: overlay virt_text position after 'showbreak' (#25175)
- a0790558c3 extmarks: priority order of inline and non-inline virt_text (#27532)
- b52bd8a2de extmarks: properly handle virt_text on next screen line (#25166)
- a376d979bd extmarks: redraw line on adding/removing conceal (#27463)
- 2d9e063a63 extmarks: redraw pre-undo position (#27437)
- 2137edbd4f extmarks: redraw properly with scoped inline virt_text (#27569)
- 1cc358aed6 extmarks: restore old position before revalidating
- 0818d65528 extmarks: skip virt_text if it is out of window (#25658)
- 19d63563e1 extmarks: splice earlier when opening new line (#28108)
- 362df0f793 extmarks: wrong display when changing text with virt_lines (#24879)
- d5a85d737a f_wait: flush UI before blocking (#25962)
- 81f67b79e8 file_search: path with spaces in finddir() and findfile() (#25493)
- a69c720639 fileio: fix off-by-one in rename_with_tmp (#27780)
- c6c21db82b filetype: add typing and dry (#24573)
- 020d1f626a filetype: call on_detect before setting buffer filetype
- fdf5013e21 filetype: correctly detect bash-fc-{id} files as "sh"
- d6f406db45 filetype: don't use fnamemodify() with :e for extension (#27976)
- 670c7609c8 filetype: make sure buffer is valid before call nvim_buf_call (#24922)
- af38b46a25 filetype: return on_detect function when matching by file contents
- 2955c921ce filetype: use unexpanded file name (#27931)
- e32af31ee8 flake: clang-tools moved to nativeBuildInputs (#26955)
- fd08fd3de3 float: add fixd option
- 884470124d float: allow floating window in cmdline area
- 9ecb43b637 float: apply 'winblend' to title/footer highlight (#25999)
- 898371fc9f float: don't relative flaot win itself
- fcdfbb4303 float: fix some other crashes with :unhide or :all (#25328)
- 3ea124a8d9 float: improve error message when reconfig failed (#25076)
- c5abf487f1 float: make "fixed" work with relative=win (#25243)
- 03e8b5fc91 float: make bufpos work properly with resized parent grid
- 437ed3cee2 float: trigger winnew event when float window create
- f5953edbac float: update position of anchored windows first (#25133)
- 9de157bce4 float: win_get_bordertext_col returning negative column number (#25752)
- 5f18dd3013 float: wrong position when bufpos is set
- 0e01e81552 folds: allow overlay virtual text on folded line (#23892)
- ee986ee044 folds: combined Folded and Visual highlights (#23752)
- ded01a819a folds: don't show search or match highlighting on fold (#24084)
- 811140e276 folds: fix missing virt_lines above when fold is hidden (#24274)
- 678548a2b4 folds: show Folded highlight in Visual selection (#23741)
- 58f9486144 folds: update folds in Insert mode with fdm=indent (#24402)
- 38e38d1b40 fs: allow backslash characters in unix paths
- 8a7e3353eb fs: make `normalize()` work with '/' path (#24047)
- ae5095cac9 fs: use generics for better typing
- e4da418ba8 fs.lua: normalize slash truncation (#23753)
- 06fcf71bd0 fswatch: --latency is locale dependent
- 502a7a0558 ftplugin: respect runtimepath ordering
- 03a2c5b772 ftplugin: source Lua files after Vimscript files per directory (#23801)
- be5cf33836 gen_help_html: type warnings, spell_ignore_files #27254
- 6c35fb421e gen_lsp.lua: improve type name, and fix wrong type inheritance
- 214b125132 gen_lsp.lua: no notifications in lsp.Methods #24530
- 765729a145 gen_vimdoc: INCLUDE_DEPRECATED not generating docs for deprecateds
- ccf328172b gen_vimfn_types: don't include tag before signature's line (#24492)
- 86c9d8b53c gen_vimvim: correctly add aliases to vimAutoEvent (#23429)
- 240c41e1af genvimvim: add special abbreviations of :delete (#23172)
- 51ea753747 genvimvim: generate prefixed boolean options properly (#27487)
- 9f32deba56 grid: add start column when getting char on line (#25627)
- 4ed1c2a8af grid: don't draw beyond max column (#26172)
- 9c202b9392 grid: handle clearing half a double-width char (#27023)
- 6a486c44e6 gx: move to to _init_default_mappings #24420
- 67b2ed1004 gx: visual selection, expand env vars
- e39b6d0c52 health: "attempt to concatenate nil"
- 7ffe450173 health: check for _host_prog variables properly (#23014)
- 50cd5ed360 health: check more "old" files
- f6dcc464f2 health: check unmatching python_glob as empty table (#28215)
- 6818ba271c health: clients may not support watchfiles #28710
- 03a021f378 health: combine python and virtualenv healthchecks (#23004)
- c67efe3a9c health: correctly expand and resolve PYENV_ROOT (#26953)
- 88eb0ad149 health: fix tmux RGB capability detection (#26886)
- cde4892b49 health: fix typo in function name
- 63a17322dd health: improve python executable check error handling (#26954)
- ba88fd886a health: malformed call to warn() #26217
- 8c6f97bef8 health: properly use the value of $PYENV_VERSION (#23109)
- c8ebb04e92 health: replace healthFoo with DiagnosticFoo (#23475)
- 843c1bed95 health: stop job properly on timeout (#23877)
- 96d0c709b6 healthcheck: expand vimrc variable (#28379)
- 4229bbe514 helptags: make multibyte help tags work properly (#23975)
- 7b6d041bae heredoc: allow missing end marker for scripts
- a2f17e97ec highlight: add `FloatFooter` to 'highlight_defs.h' (#25577)
- 837f268093 highlight: add `Nvim{Light,Dark}Gray{1,2,3,4}` colors
- 8afb3a49c0 highlight: add create param in nvim_get_hl
- f8ea49cfe1 highlight: add force in nvim_set_hl
- 4ce0ada0d4 highlight: add missing g: prefix for colors_name (#22952)
- 03ca36d1f8 highlight: apply 'winblend' to NormalNC (#23555)
- 6c3e170e56 highlight: apply 'winblend' to float border (#25981)
- d4872377fe highlight: attr set all when normal attr changed
- dcaf207336 highlight: combine ColorColumn with low-priority CursorLine (#23017)
- 66925f14de highlight: consistently spell "Goldenrod"
- 5183651773 highlight: correct hi command output
- ca7dd33fa7 highlight: don't show CursorColumn on current line (#27848)
- 59289fb987 highlight: make CurSearch work properly with 'winhl' (#24448)
- b11a8c1b5d highlight: remove unnecessary assignment to char_attr for 'spell' (#23713)
- 9a2c98087b highlight: update `IncSearch` to link to `CurSearch`
- ab92575753 highlight: winhl receive wrong argument
- b60a2ab4cb inccommand: block errors when parsing command line again (#24374)
- bc5b0da84e inccommand: don't crash with "split" and 'n' flag
- 382ea4d402 inccommand: don't preview in Ex mode (#26587)
- c1c2a1b5dd inccommand: don't save information of a buffer twice (#24501)
- ef44e59729 inccommand: don't set an invalid 'undolevels' value (#24575)
- ba9f86a9ce inccommand: improve preview buffer number handling (#27087)
- 643bea31b8 inccommand: restrict cmdpreview undo calls (#24289)
- 1dba570e63 inccommand: save and restore '[ and '] marks (#26442)
- 35ffe58ea4 inccommand: update topline after moving cursor (#27341)
- a14c780918 input: set termkey buffer size to read stream capacity
- b61575ba70 intro: clear intro if new buffer is shown in focused float
- 9530a23016 intro: link showing intro to state at start
- 0570a19c8a intro: make intro explicitly stateful
- d1a30221fc intro: redrawing intro exposing pseudo-randomness
- 21360523cd intro: still show intro message with floating window
- 6b96122453 iter: add tag to packed table
- 2ee8ace217 iter: make pipeline termination conditions consistent (#24614)
- 9489406879 iter: remove special case totable for map-like tables
- 57ccd82417 job-control: fix use after free (#25223)
- 1c71c32b29 job-control: make jobwait() flush UI after hiding cursor (#25927)
- e057b38e70 json: allow objects with empty keys #25564
- af6537bc66 jumplist: Ctrl+o, Ctrl+i weird behavior when deleting buffers #25461
- 017ff93b02 keycodes: recognize <t_xx> as a key (#24700)
- 6709f7f8f1 keycodes: simplify S- properly when D- is present (#27316)
- 4447cefa48 l10n: update Japanese translations (#27856)
- 7d17ab5b6f l10n: update Ukrainian translations (#26819)
- 908843df61 languagetree: apply `resolve_lang` to `metadata['injection.language']`
- e353c869ce languagetree: don't treat unparsed nodes as occupying full range
- 6b5f44817e languagetree: remove double recursion in LanguageTree:parse
- f5530bf566 linematch: initialize array
- 766f4978d6 lint: lint warnings #24226
- 5465adcbab lint: use tbl_contains
- 0804034c07 loader: cache path ambiguity #24491
- 89135cff03 loader: remove cyclic dependency on vim.fs (when --luamod-dev)
- 66c66d8db8 loader: reset hashes when running the loader
- ec80e4cb4d log: increase size of buffer for nvim instance name
- 4d0f4c3de9 lsp: E403 if doc contains multiple codeblocks #24458
- 20c331915f lsp: SignatureHelp docstring is not escaped #16702
- 01691c5447 lsp: abort callHierarchy on no result (#28102)
- 9abced6ad9 lsp: account for border height in max floating popup height (#25539)
- 3e016fa8d4 lsp: actually send diagnostic-tags back to the server
- 37d8e50459 lsp: add "silent" option to vim.lsp.start (#28478)
- 2e1f5055ac lsp: add assertion for explicit bufnr in apply_text_edits (#27614)
- 542c910a1d lsp: add missing LSP semantic token highlight links
- be5e361154 lsp: add param assert in client_is_stopped (#23857)
- ac0e8323dc lsp: add parentheses to generated union array types (#27560)
- 0fcbda5987 lsp: add snippet regression test (#27618)
- e42fdaad21 lsp: add spacing for inlay hints separately #24079
- 48bcc7b971 lsp: advertise workspace.didChangeConfiguration capability (#26028)
- c07dceba33 lsp: allow Lua pattern chars in code action filter (#24041)
- 3bf887f6e0 lsp: always return boolean in lsp.buf_client_attach (#24077)
- 966eb8e0b3 lsp: announce publishDiagnostics.dataSupport (#24442)
- 39fc340276 lsp: avoid assertion when `client_hints` do not exist (#28461)
- 47dbda97d2 lsp: buffer messages until connected to server (#28507)
- adbe7f3683 lsp: call `on_list()` even for single location (#25830)
- 15983cf2c6 lsp: cancel session when leaving snippet region (#25762)
- 816b56f878 lsp: cancel watchers when closing a client
- 9b8a075539 lsp: change `silent` in lsp.start.Opts to optional (#28524)
- d3e0352574 lsp: check if inlay hints are enabled for a buffer before disabling (#24074)
- fa9a85ae46 lsp: clean up duplicate and unused meta type annotations
- 8bd6f7c20b lsp: clear codelens on LspDetach (#24903)
- 97c0a52416 lsp: correct deprecation message #28403
- aa62898ae3 lsp: correct the error message's cmd on spawning (#27632)
- 77a9f3395b lsp: create codelens request parameters for each buffer (#27699)
- 9281edb334 lsp: create per client params in lsp.buf.code_action
- 39cc38a87b lsp: defer writing error msgs (#27688)
- 1b679ac192 lsp: define LspInlayHint highlight group #24073
- dc8c086c7e lsp: directly rename the existing buffers when renaming (#27690)
- c1a95d9653 lsp: disable didChangeWatchedFiles on Linux
- 2fde6295df lsp: display initialization errors (#25409)
- 94127cb5df lsp: do not add extra indentation
- cc87dda31a lsp: do not assume client capability exists in watchfiles check (#24550)
- 0fe0cf5ada lsp: do not cancel snippet when selecting placeholder (#25835)
- 073035a030 lsp: don't register didChangeWatchedFiles when capability not set (#23689)
- 5eee633c97 lsp: don't start additional client if attach failed (#28744)
- 21fa19f3e8 lsp: don't use hl_mode = combine for inlay hints #24276
- 96b94f8d77 lsp: duplicate on_detach, on_reload callbacks #24067
- b95b6ed975 lsp: empty commands should not be considered executable (#28216)
- c3c673cdec lsp: enable() does not activate inlay hints on open buffers #28629
- b2c26a875b lsp: ensure buffer is not attached more than once
- fa0a25dcb3 lsp: error in reset_timer on second detach #24117
- 72e64a1afe lsp: extra "." when completing with tsserver #24646
- 031088fc0a lsp: filetype matching to documentSelector in dynamic capabilities (#25425)
- d191bdf9d5 lsp: fix attempt to call non existent function (#24212)
- dd3fa64573 lsp: fix dynamic registration of code actions (#23826)
- ce4ea638c7 lsp: fix incorrect typing and doc for `vim.lsp.rpc`
- f487e5af01 lsp: fix infinite loop on vim.lsp.tagfunc
- 74bd4aba57 lsp: fix multi client handling workspace_folder methods (#18839)
- 5e5f5174e3 lsp: fix off-by-one error for omnifunc word boundary
- ba6761eafe lsp: fix omnicomplete in middle of the line (#25787)
- 075a72d5ff lsp: fix relative patterns for `workspace/didChangeWatchedFiles` (#23548)
- 840e1864c2 lsp: handle NUL bytes in popup text (#25612)
- 345bd91db2 lsp: handle absence of a trailing newline #25194
- 0e9a33572d lsp: handle adjacent snippet tabstops
- 853f647da6 lsp: handle reverse lookup in capabilities
- 91f67fabe6 lsp: handle stale bufnr on LspRequest autocmd trigger (#24013)
- 849d82b80b lsp: handle stale bufnr on LspRequest autocmd trigger (#27981)
- 2eecb1b85d lsp: highlight active parameter in signature help #25663
- e55e80d51c lsp: inlay hints: "Failed to delete autocmd" when closing buffer #24469
- 7968322e7a lsp: inlay_hint nil reference error #24202
- ba8f19ebb6 lsp: lint warnings, default offset_encoding #24046
- 3304449946 lsp: log unknown diagnostic tags instead of showing a warning (#25705)
- 251ca45ac9 lsp: markdown code fence should allow space before info string #24364
- add7e106d5 lsp: noisy warning about offset_encodings #24441
- c235959fd9 lsp: only disable inlay hints / diagnostics if no other clients are connected (#24535)
- 1dacf2ecee lsp: prevent code-lens refresh from becoming a permanent  no-op (#28228)
- 597ecf7516 lsp: re-add client.commands and mark private
- 94a904b453 lsp: reapplying already-applied hints #24114
- 4ecc71f6fc lsp: reduce diagnostics and add more types (#23948)
- bc7f86209d lsp: redundant vim.snippet.jumpable #28560
- ee156ca60e lsp: refactor escaping snippet text (#25611)
- 2ecba65b4b lsp: remove unknown LSP protocol property (#24345)
- 7311958e12 lsp: remove unnecessary file load/write when renaming (#27621)
- e14e750998 lsp: rename LspProgress data.result => data.params #28632
- f0e61e6d92 lsp: rename fails on missing parent directory #27291
- b413f5d048 lsp: rename undofile when renaming (#27684)
- d09957e0a0 lsp: rename: load and list new buffer if attached to window (#27408)
- 7668f89d5b lsp: replace @private with @nodoc for public client functions (#24415)
- 52823616bc lsp: replace bug-prone ternary operation #28627
- 5282d3299c lsp: restore marks after apply_text_edits() #14630
- cf5f1492d7 lsp: revert change to buf.clear_references() #24238
- 917172dd96 lsp: semantic token defer loading
- 3be2536ca0 lsp: send back diagnostic tags to the server
- a37d568082 lsp: send empty "added" list when removing workspace folder #24440
- 3c6d971e54 lsp: set extra info only when it has a value (#23868)
- 5785c32f11 lsp: set fallback client name properly
- 370232dbef lsp: track snippet deletion
- ca26ec3438 lsp: use only utf-16 in default client positionEncodings (#23903)
- b302da9ad2 lsp: use percentage format on lsp.status (#23971)
- 2c8f36a3b0 lsp: use plain loop for non-list-like table of protocol values
- 8addd27504 lsp: when renaming directory, check path prefix of buffer names (#27603)
- 597355deae lsp: wrong iterator in registerCapability handler (#24971)
- b2d471ab33 lua: allow nil values in serialized Lua arrays (#26329)
- 68f12e7fcb lua: annotate that TSNode functions can return nil (#24621)
- 4ffc20c951 lua: avoid internal error when :luado deletes lines (#27262)
- 3198038224 lua: correct return value for on_key with no arguments (#25911)
- 84bbe4b0ca lua: disallow vim.wait() in fast contexts
- 22eb2ba183 lua: do not schedule events if Nvim is exiting
- 7d279a09e0 lua: handle array with holes in luaeval() (#26630)
- c43c745a14 lua: improve annotations for stricter luals diagnostics (#24609)
- 2f779b94e7 lua: inspect_pos respect bufnr when get syntax info (#23098)
- e2e63bd045 lua: make highlight.on_yank use win-local highlight (#27349)
- b40170f7a3 lua: memory leak when using invalid syntax with exists() (#26530)
- 4ab9c5fa46 lua: not using global value in vim.opt_global (#25196)
- 20ec4c776a lua: only disable vim.schedule() when closing main loop (#26090)
- f150b62423 lua: only free luarefs when returning from API (#28373)
- 0190771713 lua: remove uri fragment from file paths (#27647)
- 5aa14e1231 lua: return after assert returns assert message (#27064)
- 5331d5772f lua: show error message when failing to set variable (#25321)
- 1294e221a2 lua: vim.fn.has('nvim-0.10') in fast context, used by vim.deprecate
- 37c58226a8 lua: vim.fs typing (#24608)
- 5db076c7cc lua: vim.region on linewise selection #25467
- 622b1ae38a lua: vim.split may trim inner empty items
- a7df0415ab lua2dox: filter out the entire `---@alias` block
- 32e69bd397 luarc.json: ignore test directory to save memory
- 6f936c9d85 man: make :Man with a range work (#25922)
- 59aadf33ef man: pass modifiers also to :tag (#27878)
- a9b4dc9614 man: set the nested flag for the BufReadCmd autocommand (#26285)
- c8d1d8b254 man.lua: don't continue on command error (#23009)
- a4c4b39d55 man.lua: hardwrapped manpage is not resized #25646
- 209ed16f57 man.lua: return support of all sections
- 3a7c30dc93 man.vim: q quits after jump to different tag in MANPAGER modified (#28495)
- 3c667d3e0f mappings: fix mapset() not replacing map with backslash (#26719)
- 0451391ec5 mark: properly init mark views (#22996)
- d432bba4e4 marks: handle switching buffer properly (#25763)
- 62306a29ad marktree: correct qsort usage
- 585549625d marktree: off-by-one error in `marktree_move`
- 34be915f6b marktree: preserve ordering in `marktree_move`
- b97d5038f1 marktree: some marks counted twice when checking for overlap
- ad5a155b1f mbyte: fix bugs in utf_cp_*_off() functions
- b028233991 memline: more curbuf stuff
- 91ef26dece messages: :map output with ext_messages (#26126)
- eabf9de1dc messages: allow more prompt in headless mode with UI (#27905)
- 60fb8a6a8b messages: avoid crash with :intro and ch=0 (#28343)
- 61a0aa6c51 messages: avoid passing negative length to strnlen() (#28753)
- ca258db156 messages: clear new lines when increasing 'cmdheight' (#27421)
- c9f47fca8b messages: ensure msg_grid is at top at more prompt (#23584)
- 2f17ef1fc4 messages: use "Vimscript" instead of "VimL" #24111
- 55dbf5c379 messages: validate msg_grid before using msg_grid_pos (#26189)
- 4db77017fb meta: add nil return types to lpeg functions
- 5198a2555d meta: cleanup lpeg operators
- dae6770b76 meta: include vim.json
- d31f7648ec mkspell: prevent Unicode character overflow (#23760)
- a8a93e517f mouse: avoid dragging after click label popupmenu callback (#26187)
- 6a2a37b1e1 mouse: avoid dragging when clicking next to popupmenu (#26201)
- 091eb4c8c7 mouse: click after eol with conceal and virtual text (#27897)
- 2b475cb5cc mouse: click on 'statuscolumn' with 'rightleft' (#25090)
- e25cf47ad3 mouse: click on empty line with 'foldcolumn'
- 84a4319545 mouse: cmdline click registered as statuscolumn (#23163)
- bf52fb7193 mouse: copy the line before syntax matching (#24320)
- 5fb4c397a1 mouse: drag vsep of window with 'statuscolumn' (#24462)
- dc394b9641 mouse: fix popup menu position check with winbar (#23456)
- 7c1921e9d6 mouse: fix popup_setpos position check with ext_multigrid (#23436)
- a3fba5cafc mouse: handle folded lines with virt_lines attached to line above (#23912)
- 64aa0f7d0b move: check for filler lines properly (#28307)
- 366d0c7887 move: check the correct buffer (#25698)
- 780509aedf move: fix using the wrong window (#28312)
- 60d1e3e471 msgpack: store grid line event as a value
- c52dfb6e84 normal: don't check conceal when pressing 'r' (#27892)
- 088cdf69e3 normal: make "g$" work properly with resized grid
- a1ded1b113 oldtest: always use a 64-bit int for swapfile block number
- 92c59c39c3 ops.c: remove duplicate u_save_cursor()
- 9d01385c6c options: `'modified'` showing incorrect value for scratch buffers
- c3e176f6e2 options: correct condition for calling did_set_option() (#25026)
- 9af03bcd47 options: do not change inccommand during preview (#25462)
- 796df966f3 options: don't update curswant for 'winhl' or 'winbl' (#27515)
- d956bc6379 options: setting 'scroll' with resized grid (#26628)
- c8a27bae3f options: use a union for def_val (#27169)
- 804c828e68 optionstr.c: incorrect use of curbuf/curwin
- a9df0c5ce6 osc52: do not use 'vim.iter' (#27218)
- 5d75d9aef2 osc52: enable OSC 52 by default in tmux sessions (#26072)
- 86c2213b5e osc52: use `p` for primary selection instead of `s` (#26076)
- 1045659097 osc52: use nvim_chan_send() to stderr for copying (#26690)
- e3bd04f2af pager: handle consecutive newlines properly (#27913)
- 1e7e9ee91f path: accept special characters on Windows (#25424)
- f064e72b9b path: check return value of append_path() (#28309)
- f5eabaa940 path: restore space separation in 'path' (#25571)
- 908f247c22 plines: count 'showbreak' for virtual text at eol
- a0cbf1d8d5 plines: cursor position with 'showbreak' and resized grid (#28067)
- 317038e7cb plines: don't return very large height on very long line (#24260)
- 7955c90621 plines: folded lines with virt_lines attached to line above
- 35c3275b48 plines: handle inline virtual text after last char (#24241)
- cbadb39d16 plines.c: initialize cts_max_head_vcol (#24855)
- fc14928719 printf: make positional %zd and %zu work (#24722)
- d0b3c87219 process: avoid potential data race on exit (#27769)
- 3e569d440b process: close handles and timer in pty_process_close() (#27760)
- 268066e014 process: start pty process eof timer on main thread (#27625)
- 49983387ff prompt: emit change event for prompt newline (#28260)
- 7bd6bd1ef7 provider: cannot detect python3.12 #25316
- 61ecb3e16c provider/pythonx: import the correct module (#25342)
- 540941ef83 pum: don't position too far with resized parent grid (#23442)
- f186224dfc pum: fix missing rightmost column with 'rightleft' (#23445)
- 8bc973c6f5 pum: fix missing scrollbar with 'rightleft' (#23448)
- a7550a20e0 pum: handle right-click menu repositioning with multigrid (#26975)
- fbaa278773 pum: make :popup position correctly with float border
- a3dfe1bc89 pum: position properly with ext_multigrid (#23336)
- c1331a65dd pum: show right-click menu above cmdline area (#23298)
- dd0e77d48a query_error: multiline bug
- 5ac2e47acc redo: make redo of Lua mappings in op-pending mode work (#23566)
- 60f69014a8 redraw: multibyte characters are wrapped at the end of a line (#23696)
- cb34d0ddd0 redraw: overwrite double-width char with virt_text properly (#23708)
- d184933cdc redraw: update Visual selection properly with splits (#27343)
- 54044e6dce release.sh: ze version is too big
- cce9460524 remote: make --remote-expr print to stdout (#23980)
- bde59e8147 remote: restore previous --remote-expr output formatting (#23988)
- 468292dcb7 rpc: "grid_line" event parsing crashes (#25581)
- 4d4092ac9e rpc: assertion failure due to invalid msgpack input
- 8921d56053 rpc: do not crash when no input is consumed
- c422722b2e rpc: fix hang with channel closed while waiting for response
- adb2258345 rplugin: dont create data dir if it's a broken symlink #25726
- 65dd3c1180 ruler: show ruler of curwin with no statusline in cmdline
- f5231d61a5 runtime: add commentstring for C# ftplugin (#23039)
- 3387dc4a46 runtime: add commentstring for D ftplugin (#25362)
- 615b48aca6 runtime: add more Nvim-only highlight groups to Vim syntax
- aee6f08ce1 runtime: do not allow breakcheck inside runtime path calculation
- df297e3c2b runtime: don't set gx mapping if already mapped (#24262)
- 9176b5e10a runtime: respect 'fileignorecase' when sourcing (#24344)
- dbb840da01 runtime: respect 'rtp' order for all runtime files (#24335)
- 70a0049296 runtime: source c ftplugins in correct order (#27377)
- d431a4d410 runtime: source old color scheme in bundled color schemes (#26641)
- 3ab6f60dc8 runtime: update 'vim' color scheme to use new tree-sitter groups
- 67fba9affa runtime/tutor: don't try to close fold when there is none (#24953)
- ee56daebb6 shada: update deleted marks (#24936)
- 517dfdf0fc shada: update marks when using delmarks! (#24978)
- 4d52b0cf67 showcmd: clear the rest properly (#28420)
- fcd9905291 sign: avoid deleting from sign map while looping over it (#27158)
- a84b454ebe sign: do not error when defining sign without attributes (#26106)
- a5ade3c63d snippet: correct indent with newline
- 4625394a76 snippet: do not add extra indent on newlines (#28538)
- a1bdf2852d snippet: remove misleading comment about TM_FILENAME_BASE (#26465)
- 8c044f0862 spell: always accept ':' as filename char in 'spellfile' (#27172)
- a803bff89c spell: extmark with spell=false should disable spell (#23400)
- eceb2dffce spell: splice extmarks on :spellrepall (#23929)
- aa65bd478a startup: "nvim -l foo.lua" may not set arg0 #24161
- 628f6cce80 startup: don't truncate when printing with -l (#24216)
- c0fa721ade startup: make recovery mode work without --headless (#24477)
- 8e739af064 startup: multiprocess startuptime #26790
- 8f10362cdc startup: only send one default_colors_set event during startup
- 559c4cfd52 startup: run embedded Nvim with real path (#24282)
- b21d960119 startup: set full_screen when in ex_mode
- 9637b7dae4 startup: stop TUI properly when quitting at swap dialog (#25337)
- d7359a8742 startup: trigger UIEnter for the correct channel (#25860)
- 01e273c340 statuscolumn: don't update clicks if current width is 0 (#24459)
- afd0c648a8 statuscolumn: force full redraw when signcolumn is invalid (#24859)
- dc6c11394b statuscolumn: update number hl for each screen line (#25277)
- a4b2400804 statusline: also allow right click when 'mousemodel' is "popup*" (#23258)
- 4ecf6fdfd8 statusline: bail out properly on negative row (#23535)
- 70da793c5e statusline: corrupted screen with minwid sign item in 'statuscolumn' (#23823)
- d7bb19e013 statusline: fill for double-width char after moving items (#24207)
- 54f5602038 statusline: fix uninitialized variable and possible overflow
- 9f15a18fa5 statusline: missing offset when showing 'keymap' (#27270)
- 7b973c71ea statusline: redraw when VIsual_mode changes (#23933)
- dbc0fa9bd6 stdpath: remove duplicate directories (#26653)
- 1907abb4c2 stream: do not close handle if it is already closing (#26537)
- 9dd48f7832 substitute: properly check if preview is needed (#23809)
- 9753cda591 syntax: use correct diagnostic group for checkhealth (#23538)
- 400b7842a9 termcap: escape escapes in passthrough sequence (#26301)
- e527842211 termcap: only call callback for requested capabilities (#26546)
- ffeb31c2f9 termcap: set 'nested' on TermResponse autocommand
- b7831c7f99 termcap: use tmux passthrough sequence when running in tmux (#26281)
- e6d3f87dfd termdebug: handle partial lines passed to callback (#22950)
- c413b42c45 termdebug: prompt mode breaks with &splitbelow set
- 8aad4b8425 termdebug: send SIGINT when interrupting prompt mode
- af78060b18 termdebug: trim suffixed "\r" in CommOutput
- 684e93054b terminal: assign channel to terminal earlier (#25771)
- 82b1a389ba terminal: avoid Insert mode in Terminal buffer (#25820)
- 99288ecc77 terminal: block input when there is pending TermRequest (#27589)
- f2ce31d3dc terminal: call validate_cursor() before screen update (#24425)
- e09adfdcff terminal: check if mouse on statusline/tabline/winbar/vsep (#26892)
- e115732465 terminal: check terminal size at end of screen update (#25480)
- 120c4ec855 terminal: disable reflow again
- c881092ffe terminal: don't lose focus on <MouseMove> (#25845)
- 16a416cb3c terminal: don't pass incomplete UTF-8 sequence to libvterm (#27922)
- d0d132fbd0 terminal: don't send unknown special keys to terminal (#24378)
- 74776dfb2a terminal: fix duplicate recording with mouse click (#28103)
- 21d466c1b9 terminal: forward horizontal mouse scrolling (#24552)
- d401b33314 terminal: handle horizontal scrolling in another window (#24828)
- 5e78fd7784 terminal: ignore $VIM and $VIMRUNTIME in pty jobs
- 0a7fda6fa0 terminal: include modifiers when forwarding mouse (#24549)
- d4c2fc6ff6 terminal: keep focus when scrolling number column of another window (#25848)
- 5ca6c9e046 terminal: make backslashes in 'shell' work on Windows
- aba954b662 terminal: never propagate $COLORTERM from outer env (#26440)
- b74262a336 terminal: send Shift-Home Shift-End Ctrl-Home Ctrl-End (#24418)
- 0fd8eb8aae terminal: set $COLORTERM unconditionally in :terminal (#24763)
- fa17a5ab49 terminal: use terminal buffer for TermRequest autocommand (#26974)
- 5999214c24 termkey: accept BEL (0x07) as OSC terminator
- ce2f770aaa termkey: do not sign extend mode value
- 50f5864dd2 termkey: include IO header on Windows
- 52e6059415 test: call separate_arguments() correctly to honor $BUSTED_ARGS (#26905)
- c5528e7fd8 test: clean up inline virtual text tests a little
- 380b634ac9 test: fix "indeterminism" warnings in UI tests
- f4c97da262 test: fix strings_spec.lua for AArch64
- 477458f7bf test: more tests for marktree
- d8e330bcec test: remove test/compat.lua
- a7bbda121d test: typing
- 8861ad83fd test/tui_spec: pass the expected NULL-sentinel to execl()
- f859d16aea tests: set SHELL=sh #24941
- 3d44340cea tests: use more global highlight definitions
- e9bfbe99cd textformat: remove unnecessary changed_bytes() (#26027)
- 255e547e18 timer: allow timer_info() to get info about current timer
- a8131aee9e tohtml: replace hex escape with digit escape (#27728)
- 0246f1a897 tohtml: set filetype of generated HTML to `html`
- ccc0980f86 treesitter: Use the correct replacement args for #gsub! directive (#23015)
- 71d9b7d15c treesitter: _trees may not be list-like
- a4743487b7 treesitter: `language.add` - only register parser if it exists
- 4a8bf24ac6 treesitter: adjust indentation in inspector highlights (#26302)
- ef64e225f6 treesitter: allow foldexpr without highlights (#23672)
- 6a264e0897 treesitter: allow optional directive captures (#28664)
- cf612c64b0 treesitter: allow passing lang to vim.treesitter.get_node() now correctly takes opts.lang (#26360)
- 32849d5667 treesitter: avoid # of nil in _query_linter
- 3fd7449d5a treesitter: check that buf is loaded in autocommands (#25679)
- e7f50f43c8 treesitter: clip end row early
- 6b19170d44 treesitter: correctly calculate bytes for text sources (#23655)
- bd5008de07 treesitter: correctly handle query quantifiers (#24738)
- fba18a3b62 treesitter: do not calc folds on unloaded buffers
- c30ebb17f6 treesitter: document more standard highlight groups
- 040369e1e4 treesitter: don't forcefully open folds
- 72ed99319d treesitter: don't invalidate parser when discovering injections
- 4607807f9f treesitter: don't update fold if tree is unchanged
- 26b5405d18 treesitter: enforce lowercase language names (#28546)
- 3a8265266e treesitter: escape "\" in :InspectTree #28613
- 369f58797d treesitter: escape quotes in :InspectTree view #24582
- 6e45567b49 treesitter: fix TSNode:tree() double free (#24796)
- 50a03c0e99 treesitter: fix another TSNode:tree() double free
- 7c6f9690f7 treesitter: fix indexing in foldexpr
- 01b91deec7 treesitter: fix parens stacking in inspector display (#26304)
- f40a109716 treesitter: fix trim predicate
- 1f551e068f treesitter: fixup for InspectTree
- 26cc946226 treesitter: foldexpr tweaks
- e85e7fc7bc treesitter: handle empty region when logging (#24173)
- 12faaf40f4 treesitter: highlight injections properly
- 6f75facb9d treesitter: improve vim.treesitter.foldexpr
- 6c8387067d treesitter: inspect-tree remember opts on buf change
- 8179d68dc1 treesitter: logger memory leak
- b6e339eb90 treesitter: make InspectTree correctly handle nested injections (#26085)
- 3af59a415c treesitter: make Visual hl work consistently with foldtext (#25484)
- c7e7f1d4b4 treesitter: make foldexpr work without highlighting (#24167)
- 0211f889b9 treesitter: make sure injections don't return empty ranges (#24595)
- 0df681a91d treesitter: make tests for memoize more robust
- 7fa292c52d treesitter: outdated highlight due to tree with outdated region
- 617d1b28d6 treesitter: prefix treesitter types with vim
- 90a12d4a16 treesitter: prepare highlight states for [s, ]s
- 7e5ce42977 treesitter: properly combine injection.combined regions
- 19a793545f treesitter: redraw added/removed injections properly (#23287)
- 7a76fb8547 treesitter: remove more double recursion
- e124672ce9 treesitter: reset cursor max_start_depth
- 7d97150084 treesitter: return correct match table in iter_captures()
- 3b29b39e6d treesitter: revert to using iter_captures in highlighter
- 315c711700 treesitter: set cursor position when opening inspector
- 48085e40bb treesitter: stop() should treat 0 as current buffer #24450
- 32dc484ec9 treesitter: support subfiletypes in get_lang (#23605)
- b6fdde5224 treesitter: text alignment in checkhealth vim.treesitter
- 0f85aeb478 treesitter: treecursor regression
- 26143d7a5c treesitter: update @markup default links
- 9ff59517cb treesitter: update c queries
- c44d819ae1 treesitter: update folds in all relevant windows (#24230)
- ffb340bf63 treesitter: update folds only once on InsertLeave
- edf9a897f0 treesitter: update highlights for query (#23699)
- b697c0cd4f treesitter: update lua parser and queries (#24148)
- ad95b36985 treesitter: update markdown parser and queries (#24429)
- 39a0e6bf3c treesitter: update parsers and queries
- 3d4eb9d544 treesitter: update queries
- c97de026e3 treesitter: update vimdoc and vimscript queries
- dc7ccd6bca treesitter: use 0 as initial value for computing maximum (#27837)
- 7bc5ee7f93 treesitter: use proper query syntax for inspector (#26274)
- 00e6651880 treesitter: use tree range instead of tree root node range
- 8c9dab3e0d treesitter: use vim.highlight.priorities instead of hardcoded 100 (#24052)
- 674f2513d4 treesitter: validate language alias for injections
- 2bf3e82676 treesitter: validate window before updating preview highlights
- ab2811746e treesitter playground: fix the wrong range of a node displayed i… (#23209)
- f85aa2e67f treesitter.c: improve comments on fenv usage
- c5b9fb2f25 treesitter.foldexpr: check for all insert submodes
- b3bda2f043 tui: `space_buf` overflow when clearing screen (#27352)
- cb2b5e2780 tui: disable DECRQM and DECRQSS queries for Terminal.app (#28453)
- 405bad5e08 tui: do not toggle cursor visibility when flushing the buffer (#26055)
- b76cc974b9 tui: don't forget to update cursor visibility (#26523)
- 911f3d9623 tui: don't overwrite an assertion faliure message on exit
- 168e69ae01 tui: don't set cursor color when there is none (#28236)
- 5a08b5be3c tui: don't set tty background if &bg was set before VimEnter (#23701)
- 00b7428b3b tui: don't use DECRQSS in screen or tmux (#28086)
- 846714ca3e tui: don't use tui->params[] for 'termsync' (#26565)
- 197827321a tui: grid_clear properly clears the screen
- 884a83049b tui: grow termkey's internal buffer for large escape sequences (#26309)
- ad867fee26 tui: handle cursor visibility properly (#26091)
- fd50185492 tui: initialize clear attrs with current terminal background
- c26b39a9aa tui: make :cquit work properly with remote TUI (#25313)
- 3ae62c4706 tui: make disabling title restore old title from stack (#23585)
- 4c31a1b807 tui: make setcellwidths() work for non-ambiwidth chars (#28322)
- 4f235e3caf tui: position cursor at bottom-left before stopping (#23369)
- 0f1b511f23 tui: redraw on SIGWINCH even if size didn't change
- 8e69716953 tui: restore title before exiting alternate screen (#23776)
- 999e167a52 tui: start flush earlier (#26463)
- 367e52cc79 tui: use buflen to calculate remaining buffer size (#26942)
- 3198598e69 tui: use uv_timer_t instead of TimeWatcher for input (#26435)
- 0ce065a332 tui: v:argv does not report the original argv[0] #24015
- bc6fc0123d tutor: Tutor steps don't work on Windows #25251
- bf5703042b tutor: don't use concealed text in expected lines #24316
- e34c23b701 tutor: set a value for ":syntax iskeyword" (#27833)
- 04232a19cc type: remove incorrect arguments from vim.rpc*
- 21152f7905 types: add more annotations to eval.lua
- b7d5b55f74 types: add some return/parameter type annotations (#24867)
- e6947bb1e8 types: make filetype.add parameters optional
- 191cca2566 types: move type annotation for `IterMod`
- 813dd36b72 types: rename win_get_config return type to win_config
- b3342171d5 typing: vim.fn.execute
- 1355861b92 typval: don't treat v:null as truthy (#23281)
- 0592fd5e17 ui: "resize -1" with cmdheight=0 #24758
- ab1c2220f0 ui: activating all ext capabilities without remote UI #28555
- 5b111a8f00 ui: adjust 'smoothscroll' for inner dimensions
- 389f5ca39d ui: adjust the cursor when inserting virtual text
- 046c9a83f7 ui: always use stl/stlnc fillchars when drawing statusline (#25267)
- 0c86828ac5 ui: avoid ambiguity about chunk that clears part of line (#24982)
- e778e01161 ui: avoid recursiveness and invalid memory access #28578
- 0ce3910868 ui: cursor pos with left gravity inline virt_text at eol (#24329)
- 91a4938edf ui: data corruption in remote_ui_raw_line
- 1de82e16c1 ui: delay win_viewport until screen update #24182
- a916523574 ui: doesn't trigger au event when enter is false
- b5a38530ba ui: don't force 'cmdheight' to zero with ext_messages
- fdc8e966a9 ui: don't send empty grid_line with redrawdebug=compositor (#23899)
- 13f55750e9 ui: empty line before the next message after :silent command
- d41b8d4758 ui: ext_cmdline should not move cursor to curwin
- a38d7f9984 ui: fix cursor position with multiple inline virtual text
- e0707d3529 ui: fix edge case around flushing
- 75f350aac6 ui: fix incorrect highlighting when virtual text next to match
- 332b70d2ed ui: fix incorrect highlighting when virtual text wraps with number
- 0c7fa3bdcc ui: fix multi-byte characters highlight in virtual text
- a37c990483 ui: fix overflowing nowrap virtual text not displaying if tab follows
- 5d7afb2e9f ui: fix tabs not being spaced properly after virtual text with no wrap
- 34d862942c ui: fix virtual text not displaying when two overlapping inlines (nowrap)
- c5bf838f8a ui: fix visual and search highlighting interfering with virtual text
- 1936285d98 ui: fixes incorrect rendering when virtual text is not visable and nowrap
- 64e8a3c4d1 ui: handle virtual text with multiple hl in more cases (#25304)
- 981acc2922 ui: propagate line wrapping state on grid_line events
- b8c1b36061 ui: set 'cmdheight' to zero for all open tabpages
- a8522f02e9 ui: startup intro message should be visible with ext_multigrid
- 1cd7824dd6 ui: trigger TabNewEntered after split new tab
- 7626f431d8 ui: update ext_ui widgets when attaching non-remote UI
- 128091a256 ui: wrong cursor position with left gravity inline virt text at eol
- a9418ef8cf ui: wrong display with 0-width inline virt_text at eol (#24854)
- e8b3ed74bc ui-ext: "scroll_delta" handle topfill and skipcol (#24249)
- 43d66c0ebb ui-ext: send title to newly-attached UI
- 519b9929e9 ui.open: some URLs fail on Windows
- 4d654472e6 ui_client: check return code of dup()
- 633bf61d3b ui_client: check return value of channel_job_start (#27729)
- 71ad771ea4 ui_compositor: only reset skipstart at first column (#24776)
- 840749d6c9 undo: fix crash caused by checking undolevels in wrong buffer
- c0a29931e2 unhide: close floating windows first (#25318)
- 9afbfb4d64 unittests: ignore __s128 and __u128 types in ffi
- 9e79f7433e usercmd: Fix buffer overflow in uc_list() (#23225)
- 9802de9334 userfunc: fix possible out of bound access
- 5a8fe0769c vim.deprecate: show deprecation warning in devel versions as well
- ca6dbf3558 vim.iter: use correct cmp function when truncating tail in `take` (#27998)
- e15991c811 vim.json: properly treat luanil options as booleans (#28622)
- fec5e3ab24 vim.region: handle multibyte inclusive selection properly (#26129)
- 2afb04758c vim.system: close check handle (#24270)
- 9b7cf4f0be vim.system: don't process non-fast events during wait() (#27300)
- a44521f46e vim.system: let on_exit handle cleanup after kill
- 6d5f12efd2 vim.system: make timeout work properly
- 57adf8c6e0 vim.ui: open() may wait indefinitely #28325
- e644e7ce0b vim.ui.open: return (don't show) error message
- fd085d9082 vim.ui.open: try wslview before explorer.exe #28424
- 5e4a5f1aaa vim.ui.open: use explorer.exe instead of wslview #26947
- 6cc76011ca watchfiles: skip Created events when poll starts (#23139)
- 9bd4a28079 window: :close crash if WinClosed from float closes window (#27794)
- 731e7f51ee window: :close crash with autocmd, floats and tabpage (#27793)
- 33dfb5a383 window: :close may cause Nvim to quit with autocmd and float
- 2cbfa4b9af window: don't go to unfocusable float when closing (#28455)
- a47be0b2d9 window: prevent win_size_restore from changing cmdheight
- 4bfc7802f0 windows: set stdout to binary mode for --api-info

PERFORMANCE
--------------------------------------------------------------------------------
- a9c551e5e3 cache breakindent/showbreak width in win_lbr_chartabsize
- b5653984e5 don't decode utf8 character multiple times in getvcol()
- cca8a78ea2 improve utf_char2cells() performance (#27353)
- 2f2f12122f remove loop for computing last position in getvcol()
- 32a4c9f4f9 remove redundant strlen in skipwhite (#26177)
- cdf848a314 reuse fast character size calculation algorithm from getvcol()
- 2289ca273c column: avoid counting when max signs are removed from a range
- 4a34da82c1 column: keep track of number of lines that hold up the 'signcolumn'
- f4001d27ef column: only invalidate lines affected by added sign
- 7f084770c2 diagnostic: avoid table copies to filter by severity (#28491)
- 1cb6040554 events: store autocommands in flat vectors (#23256)
- 9af2be292d extmarks: add metadata for efficient filtering of special decorations
- 929e1b7f1c extmarks: avoid unnecessary invalidations for virt_text (#27435)
- 19fb573ad9 extmarks: avoid unnecessary marktree traversal with folds (#24306)
- d44ed3a885 extmarks: better track whether namespace has extmarks (#28615)
- ef94fb69c6 extmarks: don't handle inline virt_text if there is none (#24322)
- 8bb67d64e2 fs: normalize path only once in fs.dir
- 40db569014 iter: make ListIter.totable more efficient (#23714)
- ef1801cc7c iter: reduce number of table allocations
- dcdefd0428 loader: use a quicker version of vim.fs.normalize
- 648f777931 lsp: load buffer contents once when processing semantic tokens responses (#23484)
- 2f4792943a lsp: only joinpath for dirs in watchdirs
- edf05b005f lsp: process semantic tokens response in a coroutine that yields every 5ms (#23375)
- 79a5b89d66 lsp: reduce polling handles for workspace/didChangeWatchedFiles (#23500)
- 4d3a04279d lsp: remove grouping logic from lsp.status (#24096)
- de28a0f84c lsp: replace file polling on linux with per dir watcher  (#26108)
- 7e97c773e3 lsp: use async fs_stat for file watching on linux (#26123)
- cdd87222c8 lua: avoid spairs in vim.validate happy path
- c5af5c0b9a lua: faster vim.deprecate() #28470
- c5990f2cdc os/env: os_getenv() allocation when there is no env var set
- 18e62c1bdb redraw: only redraw Visual area when cursor has moved (#27340)
- 94085cfce8 redraw: reduce redraw with undo and extmarks or 'spell' (#27442)
- 516b173780 rtp: reduce rtp scans (#24191)
- 0e11bf0e1a substitute: don't reallocate new_start every time (#24997)
- 4fd852b8cb treesitter: cache fold query (#24222)
- 07080f67fe treesitter: do not scan past given line for predicate match
- c0cb1e8e94 treesitter: filter out trees outside the visible range early
- 2b6c9bbe7f treesitter: incremental foldupdate
- 3ba930844c treesitter: insert/remove items efficiently (#23443)
- a76b689b47 ui-ext: approximate scroll_delta when scrolling too much (#24234)
- 0d1bc795f8 ui_client: skip some initialization not necessary for ui client
- 14a5813c20 vim.fs.normalize: use iterator

BUILD
--------------------------------------------------------------------------------
- c1ff216668 actually export symbols on mac
- 664f2749e6 add "ci" configure preset to reduce verbosity
- 1094d0c0db add CMAKE_C_FLAGS to --version output
- 1290121722 add CMakePresets for deps build to reduce verbosity
- ce6075f82a add check to clint to prevent non-defs header includes
- 624de849de add function add_target
- 82bb7bbc48 add luajit runtime files when installing (#23514)
- 831d662ac6 add sub-targets to the doc target
- 1bf29a0ae1 add system lua include dir for lpeg
- 4cc69f45b4 add ubsan default options
- 4880385809 adjust clang-tidy warning exclusion logic
- b80a8e2c16 adjust how find order is prioritized
- d561830a52 align .clang-format rules with uncrustify config
- c18d7941ef allow sccache as compiler cache
- cd097ab8cc allow using system rocks
- 54d357dce0 bump lpeg to 1.1.0 (#25016)
- 7840760776 bump minimum cmake version to 3.13
- 7a5effb0f9 bump required minimum libvterm version to 0.3.3
- 2835b0daad bump uncrustify to version 0.77
- 77c0d5415b bump uncrustify to version 0.78.1
- 87a45ad9b9 bump uncrustify to version 0.79.0 (#28756)
- 1798a4b5e9 bump uncrustify version
- 826b95203a bundle uncrustify
- 37bc73e9bc change dependency URLs to cache variables
- 1086016477 cmake cleanup
- 404fdb0f36 cmake fixes
- f8310beeed create BINARY_LIB_DIR directory before adding parser
- 9909668111 create a text file for specifying dependency information
- 5a7280ba68 create helper function for simplifying luarocks installation
- f936a962d0 create separate targets for nvim with and without runtime files
- bcaff309b6 disable UnusedIncludes from clangd
- 7a80e169c5 disable all compiler warnings from dependencies
- 8fdc84d0aa disable conversion warnings for GCC
- 310fb2efc3 disable conversion warnings for older GCC versions
- a1c2da56ec do not use GIT_REPOSITORY for local dependencies
- da2130934b don't allow Xcode as generator
- 543e0256c1 don't define FUNC_ATTR_* as empty in headers (#26317)
- 24b60b0f71 don't format deleted files
- c2e47e7bec don't print installed files locally
- f30844008b download busted from own neovim/deps repository
- 5abba97d77 download dependencies with unreliable mirrors from deps repo
- 71384129f7 download libiconv and gettext from `deps` repository
- 801ac2accb drop diff.exe from windows builds
- f0eb3ca916 eliminate semicolons from --version string
- 397b92e02d enable ASAN for MSVC
- 40139738eb enable IWYU on mac
- 25cfe3fd43 enable formatting during rebase
- 517f0cc634 enable lintlua for scripts/ dir #26391
- 45fe4d11ad enable lintlua for src/ dir #26395
- 59d117ec99 enable lintlua for test/ dir
- c3836e40a2 enable lintlua for test/unit/ dir #26396
- 03c3f7887d enforce PREFER_LUA
- 7cb29a572b ensure `make clean` doesn't remove source files
- 0a3645a723 find system luv on ubuntu
- 5bb17958c5 fix "make iwyu" not working (#24873)
- 12ccea5967 fix --luamod-dev not working properly (#24519)
- 75b80516d5 fix link error for `_BitScanForward64` (#28173)
- 3f188bc533 fix parser installation location
- 4fb1739e6f fix uncrustify
- 896b400bff fix universal mac builds
- 01e4a70d66 improve git-cliff CHANGELOG output
- ef92b5a994 include all dependency directories when generating headers
- 187ae67735 introduce variable DEPS_IGNORE_SHA for skipping dependency hash check
- 30a0299bc6 make dependency URL variables non-cached (#23577)
- b4da4783f9 make genappimage.sh work with existing CMAKE_INSTALL_PREFIX
- 9f9cef1b56 make lpeg an imported library
- c1a05f6112 make the vimdoc generation depend on the nvim target (#25876)
- 8b8e607284 move luarocks and rocks installation to main build
- d1bb9bffd5 remove BUSTED_PRG dead code (#23340)
- 8206954a67 remove LOG_DEBUG option
- c48f94d1f3 remove LOG_LIST_ACTIONS option and related code
- 353a4be7e8 remove PVS
- 88366641ad remove USE_BUNDLED_BUSTED option
- ca243f06dd remove `lintdoc` from `lint` target
- 675522af18 remove clint checks and style text covered by uncrustify
- 8be24fed8f remove config-specific find_package search for libuv
- c40872acbd remove duplicate include directories in --version output
- ebb10d6248 remove functionaltest-lua target
- 8ae39eb584 remove git requirement
- 9f8f287c61 remove luarocks
- 339011f59c remove uninstall target
- c8fd82b26d reorder compiler option setting
- 78239f0bbc reorganize cmake files
- 55793bcfa1 revert accidental permission changes (#23319)
- f31f260f0c rework --version generation
- a827003e30 rework IWYU mapping files
- e5d7003b02 rework formatting to use add_glob_target
- 1997ef134a set char to always be signed
- a75ef40f4c set deps default build type to Release (#27495)
- a1550dbf0a silence new clang-tidy warnings
- 383018dbb8 simplify policy-setting for dependencies
- 4788abf2da stop installing parser.h from treesitter
- 26033eee1d suppress bugprone-reserved-identifier warnings
- 34509bbea3 sync IWYU and clint to ignore the same headers (#26228)
- 0a8e66898d update builtin terminfo (#27272)
- a388c852c4 update libtermkey commit
- 706f871014 update uncrustify to 0.76
- f4136c9d42 use -O3 optimization for release builds
- 2c1e8f7e96 use `GIT_REPOSITORY` for local URLs
- e0d97d264f use built nvim artifact to generate eval files (#25875)
- 3d3717de4e use libvterm commit with generated *.inc files
- 4f526b9fd8 use neovim/libtermkey instead of neovim/deps for libtermkey
- 8405649f92 use neovim/libvterm instead of neovim/deps for libvterm
- 2a57613b9b use stylua with add_glob_target
- ae3eed53d6 various build improvements
- c8667c8756 various cmake fixes
- 5cefec7349 various cmake fixes
- bec2ebebda various cmake fixes
- c50951a4d0 various fixes
- 4c91194611 various fixes
- bf0be0f63e various improvements
- 404043e74c vendor libtermkey
- e38a053692 IWYU: export generated headers
- 71141e8cf5 IWYU: fix headers for arabic.h
- 8b428ca8b7 IWYU: fix includes for func_attr.h
- f4aedbae4c IWYU: fix includes for undo_defs.h
- 17d81ac2ab IWYU: map everything in the C99 specification
- c2a5105e88 IWYU: remove arabic_defs.h (#26235)
- 38a20dd89f IWYU: replace most private mappings with pragmas (#26247)
- 09541d514d IWYU: replace public-to-public mappings with pragmas (#26237)
- 39771b2238 Makefile: add nvim to oldtest phony target
- 6823fdb20b PVS: exclude build directory
- 5d387c3388 ci: ensure correct headers are used on macOS
- dcb11c1091 clint: don't allow INIT() in non-header files (#27407)
- c98ef2d7c6 clint: fix deprecation and linter warnings
- 7e2387f41b clint: more precise check for "defs" headers (#26236)
- cf8b2c0e74 iwyu: add a few more _defs.h mappings (#25435)
- 5f03a1eaab lint: remove unnecessary clint.py rules
- eecddd2416 lint: use stylua without add_glob_target
- 25e51d393a lua: vendor coxpcall
- 4dc86477b6 luarc.json: disable luadoc-miss-see-name #24108
- fd9ac5aa8e makefile: remove a phony target uninstall (#24349)
- 978962f9a0 release.sh: regenerate docs after changing NVIM_API_PRERELEASE (#28229)
- 9ca81b0259 release.sh: set VIMRUNTIME when regenerating docs (#28765)
- 4399c4932d release.sh: use git cliff, drop old script
- d0ae529861 scripts: allow a git ref for lsp_types #24377
- bfb81e1a85 snap: remove obsolete snapcraft.yaml
- 981301d11f terminfo: include user capabilities in comments (#28066)
- 6801befcc5 uninstall: don't build if installation manifest not found
- 345dcba629 windows: set longPathAware in manifest #28389
2024-05-16 14:34:32 +02:00
Justin M. Keyes
83a32e2d98
fix(test): failure after version bump #28771
Problem:
- The test for vim.deprecate() has a "mock" which is outdated because
  vim.deprecate() no longer uses that.
- The tests get confused after a version bump.

Solution:
Make the tests adapt to the current version.
2024-05-16 05:33:04 -07:00
zeertzjq
acaac07b64
vim-patch:9.1.0413: smoothscroll may cause infinite loop (#28763)
Problem:  smoothscroll may cause infinite loop, with
          very narrow windows
          (Jaehwang Jung, after v9.1.0280)
Solution: Check for width1 being negative, verify
          that win_linetabsize does not overflow

fixes: vim/vim#14750
closes: vim/vim#14772

eff20eb35d

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-05-16 05:36:24 +08:00
Riley Bruins
6a264e0897
fix(treesitter): allow optional directive captures (#28664) 2024-05-14 09:14:43 -05:00
dundargoc
a0a189a8ed
test: fix incorrect function import (#28735) 2024-05-14 08:39:37 +08:00
Justin M. Keyes
e3ec974324
refactor(lua): remove deprecated features #28725 2024-05-13 05:00:39 -07:00
Justin M. Keyes
97c7646501 refactor(api): nvim_win_xx_ns are EXPERIMENTAL
Problem:
The nvim_win_xx_ns function family introduced in ba0370b1d7
needs more bake-time. Currently it's narrowly defined for windows, but
other scopes ("buffer") and features are likely in the future.

Solution:
- Rename the API with double-underscore to mark it as EXPERIMENTAL.

TODO/FUTURE:
- Rename and change the signature to support more than just "window"
  scope, and for other flexibility.
- Open question: we could choose either:
  - "store scopes on namespaces", or
  - "store namespaces on scopes (w:/b:/…)"
2024-05-12 23:53:24 +02:00
Justin M. Keyes
8f0a166da4 refactor(api): rename nvim_win_remove_ns
Problem:
nvim_win_remove_ns does not follow `help dev-naming` API naming conventions.

Solution:
Rename it.
2024-05-12 23:41:00 +02:00
bfredl
d8b395b10f
Merge pull request #28717 from bfredl/rpcmsg
fix(ui): data corruption in remote_ui_raw_line
2024-05-12 19:22:45 +02:00
bfredl
91a4938edf fix(ui): data corruption in remote_ui_raw_line
This particular repro is quite niche but there could be other cases,
whenever the the second last cell plus the "fill" cell togheter are too
complex
2024-05-12 12:19:29 +02:00
zeertzjq
4e5c633ed4
fix(api): make getting explicit empty hl in virtual text work (#28697) 2024-05-12 05:39:33 +08:00
luukvbaal
e1a81c8d8b
vim-patch:9.1.0407: Stuck with long line and half-page scrolling (#28704)
Problem:  No scrolling happens with half-page scrolling with line
          filling entire window when 'smoothscroll' is disabled.
          (Mathias Rav, after v9.1.0285)
Solution: Adjust amount to move cursor by so that it is moved the same
          number of lines as was scrolled, even when scrolling different
          number of lines than requested with 'nosmoothscroll'.

58448e09be
2024-05-11 18:17:57 +08:00
zeertzjq
14693353d5
vim-patch:9.1.0406: Divide by zero with getmousepos() and 'smoothscroll' (#28701)
Problem:  Divide by zero with getmousepos() and 'smoothscroll'.
Solution: Don't compute skip_lines when width1 is zero.
          (zeertzjq)

closes: vim/vim#14747

031a745608
2024-05-11 17:46:22 +08:00
Christian Clason
a6873450b9 vim-patch:9.1.0402: filetype: mdd files detected as zsh filetype
Problem:  filetype: mdd files detected as zsh filetype
Solution: detect '*.mdd' files as sh filetype, add links
          to reference documentation (Wu, Zhenyu)

closes: vim/vim#14741

63f2a5b8ad

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-05-11 09:13:57 +02:00
Christian Clason
a9fd17e232 vim-patch:9.1.0401: filetype: zsh module files are not recognized
Problem:  filetype: zsh module files are not recognized
Solution: Detect '*.mdh' and '*.epro' as C filetype, '*.mdd' as zsh
          filetype, determine zsh-modules '*.pro' from from it's content
          (Wu, Zhenyu)

closes: vim/vim#14737

887a38cee7

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-05-11 09:13:57 +02:00
bfredl
a2c158ad06
Merge pull request #28676 from luukvbaal/tuiflush
fix(tui): initialize clear attrs with current terminal background
2024-05-10 20:01:17 +02:00
Lewis Russell
c1a95d9653 fix(lsp): disable didChangeWatchedFiles on Linux
Problem:

The file watcher backends for Linux have too many limitations and
doesn't work reliably.

Solution:

disable didChangeWatchedFiles on Linux

Ref: #27807, #28058, #23291, #26520
2024-05-10 14:59:44 +01:00
Luuk van Baal
fd50185492 fix(tui): initialize clear attrs with current terminal background
Problem:  Invalidated regions that are flushed during startup are
          cleared with unitialized "clear_attrs", which is perceived as
          flickering.
Solution: Initialize "clear_attrs" with current terminal background color.
2024-05-10 14:13:02 +02:00
Gregory Anders
d3fa88b70f
vim-patch:9.1.0396: filetype: jj files are not recognized (#28672)
Problem:  jj files are not recognized
Solution: recognize '*.jjdescription' files as jj filetype
          (Gregory Anders)

See: https://github.com/martinvonz/jj

closes: vim/vim#14733

6a4ea471d2
2024-05-08 18:39:18 -05:00
zeertzjq
e4e230a0cd
vim-patch:9.1.0397: Wrong display with 'smoothscroll' when changing quickfix list (#28674)
Problem:  Wrong display with 'smoothscroll' when changing quickfix list.
Solution: Reset w_skipcol when replacing quickfix list (zeertzjq).

closes: vim/vim#14730

c7a8eb5ff2
2024-05-09 06:11:56 +08:00
James Trew
93940af1d4 docs(luacats): support backtick captured generic type
Problem:
While LuaCATS's generics system are still considered WIP by luals, they
currently support type captured generics.

See "Capture with Backtick" example:
https://luals.github.io/wiki/annotations/#generic

Solution:
Add support for it in the LuaCATS grammar
2024-05-07 14:33:14 +01:00
zeertzjq
e15991c811
fix(vim.json): properly treat luanil options as booleans (#28622)
Note: Upstream doesn't have this. It's an Nvim addition.
2024-05-03 19:26:56 +08:00
Justin M. Keyes
40ce857797
fix(vim.ui)!: change open() to return result|nil, errmsg|nil #28612
reverts e0d92b9cc2 #28502

Problem:
`vim.ui.open()` has a `pcall()` like signature, under the assumption
that this is the Lua idiom for returning result-or-error. However, the
`result|nil, errmsg|nil` pattern:
- has precedent in:
  - `io.open`
  - `vim.uv` (`:help luv-error-handling`)
- has these advantages:
  - Can be used with `assert()`:
    ```
    local result, err = assert(foobar())
    ```
  - Allows LuaLS to infer the type of `result`:
    ```
    local result, err = foobar()
    if err then
      ...
    elseif result then
      ...
    end
    ```

Solution:
- Revert to the `result|nil, errmsg|nil` pattern.
- Document the pattern in our guidelines.
2024-05-03 03:20:03 -07:00
zeertzjq
d44ed3a885
perf(extmarks): better track whether namespace has extmarks (#28615)
This avoids redraw when adding/removing an empty namespace for a window.

This also avoids marktree traversal when clearing a namespace that has
already been cleared, which is added as a benchmark.
2024-05-03 18:02:25 +08:00
luukvbaal
cf9f002f31
fix(api): use correct buffer for "range" in nvim__redraw (#28614) 2024-05-03 10:35:32 +08:00
Justin M. Keyes
e5c69df679
Merge #28101 nvim__redraw 2024-05-02 07:49:07 -07:00
Yi Ming
350d818564
feat(lsp): inlay_hint.is_enabled({filter}) #28523
vim.diagnostic.enable and vim.diagnostic.is_enabled() use the same pattern.
2024-05-02 07:26:07 -07:00
Luuk van Baal
037ea6e786 feat(api): add nvim__redraw for more granular redrawing
Experimental and subject to future changes.
Add a way to redraw certain elements that are not redrawn while Nvim is waiting
for input, or currently have no API to do so. This API covers all that can be
done with the :redraw* commands, in addition to the following new features:
- Immediately move the cursor to a (non-current) window.
- Target a specific window or buffer to mark for redraw.
- Mark a buffer range for redraw (replaces nvim__buf_redraw_range()).
- Redraw the 'statuscolumn'.
2024-05-02 15:57:06 +02:00
Yi Ming
d5063f4b29
feat(lsp): vim.lsp.inlay_hint.enable(nil) applies to all buffers #28543
Problem:
Inlay hints `enable()` does not fully implement the `:help dev-lua` guidelines:

    Interface conventions ~
    - When accepting a buffer id, etc., 0 means "current buffer", nil means "all
      buffers".  Likewise for window id, tabpage id, etc.
      - Examples: |vim.lsp.codelens.clear()| |vim.diagnostic.enable()|

Solution:
Implement globally enabling inlay hints.
* refactor(lsp): do not rely on `enable` to create autocmds
* refactor(lsp): make `bufstates` a defaulttable
* refactor(lsp): make `bufstate` inherit values from `globalstate`
* feat(lsp): `vim.lsp.inlay_hints` now take effect on all buffers by default
* test(lsp): add basic tests for enable inlay hints for all buffers
* test(lsp): add test cases cover more than one buffer
2024-05-02 06:16:20 -07:00
Christian Clason
2becec289c vim-patch:9.1.0390: filetype: inko files are not recognized
Problem:  filetype: inko files are not recognized
Solution: Detect '*.inko' as ink filetype
          (Yorick Peterse)

See:
- https://github.com/inko-lang/inko.vim
- https://inko-lang.org/

closes: vim/vim#14699

a01968448a

Co-authored-by: Yorick Peterse <git@yorickpeterse.com>
2024-05-02 14:14:56 +02:00
Christian Clason
ebf8237af8 vim-patch:9.1.0389: filetype: templ files are not recognized
Problem:  filetype: templ files are not recognized
Solution: Detect '*.templ' files as filetype templ
          (Tristan Knight)

See:
- https://github.com/a-h/templ
- https://templ.guide/

closes: vim/vim#14697

54e79157c5

Co-authored-by: tris203 <admin@snappeh.com>
2024-05-02 14:14:56 +02:00
zeertzjq
c4627676f9
vim-patch:9.1.0388: cursor() and getregion() don't handle v:maxcol well (#28602)
Problem:  cursor() and getregion() don't handle v:maxcol well.
Solution: Add special handling for v:maxcol like setpos() does.
          (zeertzjq)

closes: vim/vim#14698

2ffdae7948
2024-05-02 19:33:54 +08:00
Christian Clason
9e2f378b6d vim-patch:9.1.0386: filetype: stylus files not recognized
Problem:  filetype: stylus files not recognized
Solution: Detect '*.styl' and '*.stylus' as stylus filetype,
          include indent, filetype and syntax plugin
          (Philip H)

closes: vim/vim#14656

2d919d2744

Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com>
2024-05-02 00:37:16 +02:00
luukvbaal
e778e01161
fix(ui): avoid recursiveness and invalid memory access #28578
Problem:  Calling :redraw from vim.ui_attach() callback results in
          recursive cmdline/message events.
Solution: Avoid recursiveness where possible and replace global "call_buf"
          with separate, temporary buffers for each event so that when a Lua
          callback for one event fires another event, that does not result
          in invalid memory access.
2024-05-01 13:51:06 -07:00
Gregory Anders
0b8a72b739
revert: "feat(extmarks): subpriorities (relative to declaration order) (#27131)" (#28585)
This reverts commit 15e77a56b7.

Subpriorities were added in https://github.com/neovim/neovim/pull/27131
as a mechanism for enforcing query order when using iter_matches in the
Tree-sitter highlighter. However, iter_matches proved to have too many
complications to use in the highlighter so we eventually reverted back
to using iter_captures (https://github.com/neovim/neovim/pull/27901).
Thus, subpriorities are no longer needed and can be removed.
2024-05-01 08:08:22 -05:00
Christian Clason
b5583acc48 vim-patch:9.1.0383: filetype: .out files recognized as tex files
Problem:  filetype: .out files recognized as tex files
Solution: Do not set an explicit filetype until it is clear what this
          should be (shane.xb.qian)

closes: vim/vim#14670

e35478bc9d

Co-authored-by: shane.xb.qian <shane.qian@foxmail.com>
2024-05-01 10:34:03 +02:00
Christian Clason
e7ae913953 vim-patch:9.1.0382: filetype: Kbuild files are not recognized
Problem:  Kbuild files are not recognized.
Solution: Detect Kbuild files as make files.
          (Bruno Belanyi)

closes: vim/vim#14676

5cbc9a69e5

Co-authored-by: Bruno BELANYI <bruno@belanyi.fr>
2024-05-01 10:34:03 +02:00
Lewis Russell
ee41153a94 feat(diagnostic): revert default behaviour of goto_next/prev()
Follow-up to #28490

Problem:

The new behaviour of goto_next/prev() of navigating to the next highest
severity doesn't work well when diagnostic providers have different
interpretations of severities. E.g. the user may be blocked from
navigating to a useful LSP warning, due to some linter error.

Solution:

The behaviour of next highest severity is now a hidden option
`_highest = true`. We can revisit how to integrate this behaviour
during the 0.11 cycle.
2024-04-30 13:39:27 +01:00
Justin M. Keyes
0330dd9e69
fix(api): mark nvim__complete_set as experimental #28579
Problem:
nvim_complete_set was added in 5ed55ff14c
but needs more bake time.

Solution:
Rename it, mark it as experimental.
2024-04-30 05:12:51 -07:00
zeertzjq
efaf37a2b9
test(old): restore default 'grepprg' and 'grepformat' (#28574)
This prevents test failure when "rg" is executable.
2024-04-30 07:44:25 +08:00
dundargoc
234b5f6701
docs: various fixes (#28208)
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Co-authored-by: Famiu Haque <famiuhaque@proton.me>
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: Guilherme Soares <guilhermesoares1970@gmail.com>
Co-authored-by: Jannik Buhr <jannik.m.buhr@gmail.com>
Co-authored-by: thomaswuhoileong <72001875+thomaswuhoileong@users.noreply.github.com>
Co-authored-by: tom-anders <13141438+tom-anders@users.noreply.github.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2024-04-30 07:04:42 +08:00
zeertzjq
f59db07cdc
vim-patch:9.1.0381: cbuffer and similar commands don't accept a range (#28571)
Problem:  cbuffer and similar quickfix and locationlist commands don't
          accept a range, even so it is documented they should
          (ilan-schemoul, after 8.1.1241)
Solution: Define ex commands with ADDR_LINES instead of ADDR_OTHER

fixes: vim/vim#14638
closes: vim/vim#14657

652c821366

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-04-30 06:02:38 +08:00
Maria José Solano
bc7f86209d
fix(lsp): redundant vim.snippet.jumpable #28560 2024-04-29 13:45:53 -07:00
bfredl
0df681a91d fix(treesitter): make tests for memoize more robust
Instead of painfully messing with timing to determine if queries were
reparsed, we can simply keep a counter next to the call to ts_query_new

Also memoization had a hidden dependency on the garbage collection of
the the key, a hash value which never is kept around in memory. this was
done intentionally as the hash does not capture all relevant state for the
query (external included files) even if actual query objects still
would be reachable in memory. To make the test fully deterministic in
CI, we explicitly control GC.
2024-04-29 16:20:46 +02:00
luukvbaal
ab1c2220f0
fix(ui): activating all ext capabilities without remote UI #28555 2024-04-28 17:51:33 -07:00
Christian Clason
26b5405d18
fix(treesitter): enforce lowercase language names (#28546)
* fix(treesitter): enforce lowercase language names

Problem: On case-insensitive file systems (e.g., macOS), `has_parser`
will return `true` for uppercase aliases, which will then try to inject
the uppercase language unsuccessfully.

Solution: Enforce and assume parser names to be lowercase when
resolving language names.
2024-04-28 16:27:47 +02:00
Mathias Fußenegger
4625394a76
fix(snippet): do not add extra indent on newlines (#28538)
Reverts parts of https://github.com/neovim/neovim/pull/27674

LSP snippets typically do include tabs or spaces to add extra
indentation and don't rely on the client using `autoindent`
functionality.

For example:

    public static void main(String[] args) {\n\t${0}\n}

Notice the `\t` after `{\n`

Adding spaces or tabs independent of that breaks snippets for languages
like Haskell where you can have snippets like:

    ${1:name} :: ${2}\n${1:name} ${3}= ${0:undefined}

To generate:

    name ::
    name = undefined
2024-04-28 12:49:25 +02:00
Raphael
96f59e1b99
fix(diagnostic): invalid col number compare in next_diagnostic (#28397)
Problem: when line is blank link then there will got an invalid column number in math.min compare.

Solution: make sure the min column number is 0 not an illegal number.
2024-04-27 16:05:41 -05:00
Justin M. Keyes
158e329725
Merge #28522 handle ui_attach side effects 2024-04-27 06:37:40 -07:00
zeertzjq
41ceadd458
vim-patch:9.1.0375: tests: 1-second delay after Test_BufEnter_botline() (#28534)
Problem:  tests: 1-second delay after Test_BufEnter_botline()
          (after v9.1.0374)
Solution: Wipe the created buffers (zeertzjq).

closes: vim/vim#14647

340643e977
2024-04-27 18:02:18 +08:00
Luuk van Baal
b8c1b36061 fix(ui): set 'cmdheight' to zero for all open tabpages
Problem:  Enabling ext_messages claims to set 'cmdheight' to zero, but
only does so for the current tabpage.
Solution: Set stored 'cmdheight' value to zero for all tabpages.
2024-04-27 01:00:55 +02:00
zeertzjq
435dee74bb
vim-patch:9.1.0374: wrong botline in BufEnter (#28530)
Problem:  When :edit an existing buffer, line('w$') may return a
          wrong result.
Solution: Reset w_valid in curwin_init() (Jaehwang Jung)

`do_ecmd()` reinitializes the current window (`curwin_init()`) whose
`w_valid` field may have `VALID_BOTLINE` set. Resetting `w_botline`
without marking it as invalid makes subsequent `validate_botline()`
calls a no-op, thus resulting in wrong `line('w$')` value.

closes: vim/vim#14642

eb80b8304e

Co-authored-by: Jaehwang Jung <tomtomjhj@gmail.com>
2024-04-27 06:32:25 +08:00
Brian Cao
3a7c30dc93
fix(man.vim): q quits after jump to different tag in MANPAGER modified (#28495) 2024-04-26 13:14:45 -05:00
Justin M. Keyes
9b028bd64f
refactor(vim.iter)!: rename xxback() => rxx() #28503
Problem:
vim.iter has both `rfind()` and various `*back()` methods, which work
in "reverse" or "backwards" order. It's inconsistent to have both kinds
of names, and "back" is fairly uncommon (rust) compared to python
(rfind, rstrip, rsplit, …).

Solution:
- Remove `nthback()` and let `nth()` take a negative index.
  - Because `rnth()` looks pretty obscure, and because it's intuitive
    for a function named `nth()` to take negative indexes.
- Rename `xxback()` methods to `rxx()`.
  - This informally groups the "list-iterator" functions under a common
    `r` prefix, which helps discoverability.
- Rename `peekback()` to `pop()`, in duality with the existing `peek`.
2024-04-26 08:43:29 -07:00
Luuk van Baal
7626f431d8 fix(ui): update ext_ui widgets when attaching non-remote UI
Problem:  Updating internalized UI capabilities is postponed until a
          remote UI attaches.
Solution: Always update active UI widgets in ui_refresh().
2024-04-26 16:42:08 +02:00
Raphael
af8500af64
fix(completion): improve popup window position (#26739) 2024-04-25 21:36:18 +08:00
Gregory Anders
b13e63db1d
feat(diagnostic): goto functions jump to highest severity (#28490)
When the "severity" option is nil, vim.diagnostic.goto_next() and
vim.diagnostic.goto_prev() jump to the next diagnostic with the highest
severity.
2024-04-25 08:07:44 -05:00
Justin M. Keyes
e0d92b9cc2
fix(vim.ui)!: change open() to return pcall-like values #28502
Problem:
`vim.ui.open` unnecessarily invents a different success/failure
convention. Its return type was changed in 57adf8c6e0, so we might as
well change it to have a more conventional form.

Solution:
Change the signature to use the `pcall` convention of `status, result`.
2024-04-25 04:15:58 -07:00
bfredl
2b9df3f795
Merge pull request #28492 from bfredl/hotfix
fix(lua): vim.fn.has('nvim-0.10') in fast context, used by vim.deprecate
2024-04-25 08:58:58 +02:00
bfredl
1294e221a2 fix(lua): vim.fn.has('nvim-0.10') in fast context, used by vim.deprecate 2024-04-25 08:37:18 +02:00
Gregory Anders
38b9c322c9
feat(fs): add vim.fs.root (#28477)
vim.fs.root() is a function for finding a project root relative to a
buffer using one or more "root markers". This is useful for LSP and
could be useful for other "projects" designs, as well as for any plugins
which work with a "projects" concept.
2024-04-24 21:43:46 -05:00
Will Hopkins
16513b3033
feat(api): allow floats to be opened in non-current tabpage (#28480)
\
2024-04-25 09:14:05 +08:00
Mathias Fußenegger
c81b7849a0
refactor(lsp): merge subtypes and supertypes into typehierarchy (#28467)
Both methods had pretty much the same documentation and shared the
implementation.
2024-04-23 19:05:01 +02:00
dundargoc
052498ed42 test: improve test conventions
Specifically, functions that are run in the context of the test runner
are put in module `test/testutil.lua` while the functions that are run
in the context of the test session are put in
`test/functional/testnvim.lua`.

Closes https://github.com/neovim/neovim/issues/27004.
2024-04-23 18:17:04 +02:00
Evgeni Chasnovski
c5af5c0b9a
perf(lua): faster vim.deprecate() #28470
Problem: `vim.deprecate()` can be relatively significantly slower than
  the deprecated function in "Nvim" plugin.
Solution: Optimize checks for "Nvim" plugin. This also results into not
  distinguishing "xxx-dev" and "xxx" versions when doing checks, which
  is essentially covered by the deprecation logic itself.

With this rewrite I get the times from #28459: `{ 0.024827, 0.003797, 0.002024, 0.001774, 0.001703 }`.
For quicker reference:
    -  On current Nightly it is something like `{ 3.72243, 0.918169, 0.968143, 0.763256, 0.783424 }`.
    - On 0.9.5: `{ 0.002955, 0.000361, 0.000281, 0.000251, 0.00019 }`.
2024-04-23 08:23:45 -07:00
Raphael
a4fc3bb0e6
fix(diagnostic): vim.diagnostic.get(…,{lnum=…}) on multi-line diagnostic #28273
Problem:
vim.diagnostic.get(…,{lnum=…}) does not match multi-line diagnostics.

Solution: add end_lnum support.
2024-04-23 04:13:58 -07:00
Raphael
ad76b050eb
fix(diagnostic): open_float on multi-line diagnostics #28301
Problem: when diagnostic have a range of line, open_float not work.

Solution: filter diagnostic by line number range.
2024-04-23 04:06:41 -07:00
Christian Clason
aef120d1e9 vim-patch:9.1.0366: filetype: ondir files are not recognized
Problem:  filetype: ondir files are not recognized
Solution: Detect '.ondirrc' as ondir filetype
          (Jon Parise)

closes: vim/vim#14604

ea999037a4

Co-authored-by: Jon Parise <jon@indelible.org>
2024-04-23 09:38:46 +02:00
zeertzjq
3305bb9e41
vim-patch:9.1.0364: tests: test_vim9_builtin is a bit slow (#28466)
Problem:  tests: test_vim9_builtin is a bit slow
Solution: source tests from a buffer instead of
          writing and sourcing a file (Yegappan Lakshmanan)

closes: vim/vim#14614

22697b6179

N/A patch:
vim-patch:9.1.0299: Vim9: return type not set for a lambda assigned to script var

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2024-04-23 08:28:51 +08:00
zeertzjq
d0ab67410c
vim-patch:9.1.0365: Crash when typing many keys with D- modifier (#28464)
Problem:  Crash when typing many keys with D- modifier (after 9.1.0227).
Solution: Don't treat a 0x80 byte inside a special sequence as the start
          of a special sequence (zeertzjq).

closes: vim/vim#14613

6b13e3d4e4
2024-04-23 08:18:42 +08:00
luukvbaal
ea1c9f60e0
vim-patch:9.1.0357: Page scrolling should place cursor at window boundaries (#28429)
Problem:  Page scrolling does not always place the cursor at the top or
          bottom of the window (Mathias Rav)
Solution: Place the cursor at the top or bottom of the window.
          (Luuk van Baal)

4b6b0c4024
2024-04-22 21:24:32 +08:00
zeertzjq
783b0aba41
fix(completion): check that healthcheck name is string (#28458) 2024-04-22 19:35:02 +08:00
bfredl
f2db5521eb
Merge pull request #28434 from glepnir/23120
fix(float): wrong position when bufpos is out of range
2024-04-22 13:31:41 +02:00
zeertzjq
2cbfa4b9af
fix(window): don't go to unfocusable float when closing (#28455) 2024-04-22 17:57:49 +08:00
Justin M. Keyes
9912a4c81b refactor(lua): deprecate tbl_flatten
Problem:
Besides being redundant with vim.iter():flatten(), `tbl_flatten` has
these problems:

- Has `tbl_` prefix but only accepts lists.
- Discards some results! Compare the following:
  - iter.flatten():
    ```
    vim.iter({1, { { a = 2 } }, { 3 } }):flatten():totable()
    ```
  - tbl_flatten:
    ```
    vim.tbl_flatten({1, { { a = 2 } }, { 3 } })
    ```

Solution:
Deprecate tbl_flatten.

Note:
iter:flatten() currently fails ("flatten() requires a list-like table")
on this code from gen_lsp.lua:

    local anonym = vim.iter({ -- remove nil
      anonymous_num > 1 and '' or nil,
      '---@class ' .. anonymous_classname,
    }):flatten():totable()

Should we enhance :flatten() to work for arrays?
2024-04-22 02:11:23 +02:00
zeertzjq
35e38833c5
vim-patch:9.1.0363: tests: test_winfixbuf is a bit slow (#28446)
Problem:  tests: test_winfixbuf is a bit slow
Solution: use defer if possible, reset hidden option, use --not-a-term
          when starting Vim using system() (Yegappan Lakshmanan)

closes: vim/vim#14611

4baf908d60

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2024-04-22 06:24:22 +08:00
Justin M. Keyes
5c8dfb0e37 refactor(lua): rename tbl_isarray => isarray
tbl_isarray was not released yet, so it will not go through
a deprecation cycle.

ref #24572
2024-04-21 17:42:17 +02:00
Justin M. Keyes
d9d890562e refactor(lua): rename tbl_islist => islist
ref #24572
2024-04-21 17:08:07 +02:00
bfredl
f42ab1dc48
Merge pull request #27872 from luukvbaal/cmdheight
fix(ui): don't force 'cmdheight' to zero with ext_messages
2024-04-21 09:31:24 +02:00
glepnir
5f18dd3013 fix(float): wrong position when bufpos is set
Problem: when lnum in bufpos is out of range the position of float is wired.

Solution: avoid the height value out of buffer line range.
2024-04-21 15:25:46 +08:00
luukvbaal
344906a08f
fix(api): do not update grid position in nvim_win_set_cursor (#28235)
Revert commit c971f538ab.
Forcing grid cursor position will need a new API like originally proposed in #27858.
2024-04-21 08:15:18 +08:00
Riley Bruins
5e6240ffc2 feat(treesitter): handle quantified fold captures 2024-04-20 22:11:45 +02:00
Justin M. Keyes
8886b1807c
refactor(lua): "module" => "M" #28426
Most of the codebase uses the `M` convention for Lua module.
Update the last remaining cases.
2024-04-20 09:06:49 -07:00
Luuk van Baal
b5a38530ba fix(ui): don't force 'cmdheight' to zero with ext_messages
Remove remaining code that prevents non-zero 'cmdheight' with ext_messages.
2024-04-20 15:44:12 +02:00
Yinzuo Jiang
f190f758ac
feat(lsp): add vim.lsp.buf.subtypes(), vim.lsp.buf.supertypes() (#28388)
Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
Co-authored-by: Maria José Solano <majosolano99@gmail.com>
2024-04-20 15:40:01 +02:00
Justin M. Keyes
fd085d9082
fix(vim.ui.open): try wslview before explorer.exe #28424
Problem:
explorer.exe is unreliable on WSL.

Solution:
Try wslview before explorer.exe.

fix #28410
2024-04-20 05:47:08 -07:00
zeertzjq
4d52b0cf67
fix(showcmd): clear the rest properly (#28420) 2024-04-20 08:12:45 +08:00
Christian Clason
52d2851ca4 vim-patch:9.1.0355: filetype: flake.lock files are not recognized
Problem:  filetype: flake.lock files are not recognized
Solution: Detect 'flake.lock' as json filetype
          (Riley Bruins)

closes: vim/vim#14589

ce736033ae

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2024-04-19 16:09:41 +02:00
zeertzjq
8d77061051
vim-patch:9.1.0354: runtime(uci): No support for uci file types (#28409)
Problem:  runtime(uci): No support for uci file types
          (Wu, Zhenyu)
Solution: include basic uci ftplugin and syntax plugins
          (Colin Caine)

closes: vim/vim#14575

4b3fab14db

Co-authored-by: Colin Caine <complaints@cmcaine.co.uk>
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-19 14:50:12 +08:00
zeertzjq
13ebfafc95
vim-patch:9.1.0351: No test that completing a partial mapping clears 'showcmd' (#28406)
Problem:  No test that completing a partial mapping clears 'showcmd'.
Solution: Complete partial mappings in Test_showcmd_part_map() instead
          of using :echo.  Adjust some comments (zeertzjq).

closes: vim/vim#14580

094c4390bd
2024-04-19 05:45:25 +08:00
Justin M. Keyes
f1dfe32bf5
feat(lua): enable(enable:boolean, filter:table) #28374
Problem:
We need to establish a pattern for `enable()`.

Solution:
- First `enable()` parameter is always `enable:boolean`.
- Update `vim.diagnostic.enable()`
- Update `vim.lsp.inlay_hint.enable()`.
    - It was not released yet, so no deprecation is needed. But to help
      HEAD users, it will show an informative error.
- vim.deprecate():
    - Improve message when the "removal version" is a *current or older* version.
2024-04-18 07:57:58 -07:00
Mathias Fußenegger
97323d821b
refactor(lsp): merge rpc.domain_socket_connect into rpc.connect (#28398)
See discussion in https://github.com/neovim/neovim/pull/26850
2024-04-18 15:34:10 +02:00
zeertzjq
e1ca7a7bfc
test: 'showcmd' with ext_messages and Visual selection (#28393)
Also slightly reorder some code to make comments look less out-of-place.
2024-04-18 08:33:08 +08:00
zeertzjq
562719033e
vim-patch:9.1.0343: 'showcmd' wrong for partial mapping with multibyte (#28392)
Problem:  'showcmd' is wrong for partial mapping with multibyte char,
          and isn't very readable with modifyOtherKeys.
Solution: Decode multibyte char and merge modifiers into the char.
          (zeertzjq)

This improves the following situations:
- Multibyte chars whose individual bytes are considered unprintable are
  now shown properly in 'showcmd' area.
- Ctrl-W with modifyOtherKeys now shows ^W in 'showcmd' area.

The following situation may still need improvement:
- If the char is a special key or has modifiers that cannot be merged
  into it, internal keycodes are shown in 'showcmd' area like before.
  This applies to keys typed in Normal mode commands as well, and it's
  hard to decide how to make it more readable due to the limited space
  taken by 'showcmd', so I'll leave it for later.

closes: vim/vim#14572

acdfb8a979
2024-04-18 06:23:11 +08:00
zeertzjq
de6eb96fc9
vim-patch:9.1.0344: Cursor wrong after using setcellwidth() in terminal (#28391)
Problem:  Cursor wrong after using setcellwidth() in terminal
          (mikoto2000)
Solution: output additional spaces, so the behaviour matches the GUI
          (mikoto2000)

fixes: vim/vim#14539
closes: vim/vim#14540

Fix CUI `setcellwidths` characters draw behavior to same GUI behavior.

e20fa59903

This is already fixed and tested in Nvim in #28322.

Co-authored-by: mikoto2000 <mikoto2000@gmail.com>
2024-04-18 05:41:19 +08:00
zeertzjq
2f371ad7d0
vim-patch:9.1.0341: Problem: a few memory leaks are found (#28382)
Problem:  a few memory leaks are found
          (LuMingYinDetect )
Solution: properly free the memory

Fixes the following problems:
- Memory leak in f_maplist()
  fixes: vim/vim#14486

- Memory leak in option.c
  fixes: vim/vim#14485

- Memory leak in f_resolve()
  fixes: vim/vim#14484

- Memory leak in f_autocmd_get()
  related: vim/vim#14474

- Memory leak in dict_extend_func()
  fixes: vim/vim#14477
  fixes: vim/vim#14238

closes: vim/vim#14517

29269a71b5

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-04-17 06:52:29 +08:00
zeertzjq
0b2b1b0185
vim-patch:9.1.0340: Problem: Error with matchaddpos() and empty list (#28381)
Problem:  Error with matchaddpos() and empty list
          (@rickhow)
Solution: Return early for an empty list

fixes: vim/vim#14525
closes: vim/vim#14563

f7d31adcc2

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-04-17 06:49:23 +08:00
zeertzjq
329fc0e5b7
test: API can return Lua function to Lua code (#28380) 2024-04-17 06:34:10 +08:00
zeertzjq
f150b62423
fix(lua): only free luarefs when returning from API (#28373) 2024-04-17 05:44:06 +08:00
Famiu Haque
8e5c48b08d
feat(lua): vim.fs.normalize() resolves ".", ".." #28203
Problem:
`vim.fs.normalize` does not resolve `.` and `..` components. This makes
no sense as the entire point of normalization is to remove redundancy
from the path. The path normalization functions in several other
languages (Java, Python, C++, etc.) also resolve `.` and `..`
components.

Reference:
- Python: https://docs.python.org/3/library/os.path.html#os.path.normpath
- Java: https://docs.oracle.com/javase/8/docs/api/java/nio/file/Path.html#normalize--
- C++: https://en.cppreference.com/w/cpp/filesystem/path/lexically_normal

Solution:
Resolve "." and ".." in `vim.fs.normalize`.

    Before:
    "~/foo/bar/../baz/./" => "~/foo/bar/../baz/."
    After:
    "~/foo/bar/../baz/./" => "~/foo/baz"
2024-04-16 12:13:44 -07:00
zeertzjq
5cfdaaaeac
fix(api): ignore 'autochdir' when renaming other buf (#28376)
Problem:  Renaming non-current buffer changes working directory when
          'autochdir' is set.
Solution: Temporarily disable 'autochdir'.  Add more tests for the
          win_set_buf change.
2024-04-16 20:57:01 +08:00
Raphael
2fc2343728
fix(api): ignore 'autochdir' when setting buf in other win (#28371)
Problem:  Wrong working directory when setting buffer in another window with
          'autochdir' enabled.
Solution: Temporarily disable 'autochdir'.
2024-04-16 19:49:56 +08:00
Justin M. Keyes
3065e2fa5d
Merge #28227 feat(diagnostic): is_enabled, enable(…, enable:boolean) 2024-04-16 04:37:54 -07:00
zeertzjq
7fa24948a9
test: make mapping tests more consistent (#28368)
- Test maparg() and maplist() in the same test.
- Use matches() instead of string.match().
- Avoid overlong lines and strange spacing in exec_lua().
- Revert code change from last PR as the variable may be needed.
2024-04-16 14:05:09 +08:00
zeertzjq
47ba96a6b3
test: getting autocmd Lua callback in Vimscript (#28367)
Also remove unnecessary variable in API converter.
2024-04-16 11:59:55 +08:00
zeertzjq
60fb8a6a8b
fix(messages): avoid crash with :intro and ch=0 (#28343)
This just copies code from msg_start() to wait_return().  Not sure if
there is a better place to put such a block.
2024-04-16 10:38:17 +08:00
zeertzjq
e3c083832c
vim-patch:9.1.0335: String interpolation fails for List type (#28364)
Problem:  String interpolation fails for List type
Solution: use implicit string(list) for string interpolation and :put =
          (Yegappan Lakshmanan)

related: vim/vim#14529
closes: vim/vim#14556

bce51d9005

Cherry-pick eval_to_string_eap() from patch 8.2.1914.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2024-04-16 10:18:24 +08:00
zeertzjq
b1e8b799a5
vim-patch:9.1.0332: tests: some assert_equal() calls have wrong order of args (#28363)
Problem:  tests: some assert_equal() calls have wrong order of args
Solution: Correct the order (zeertzjq).

closes: vim/vim#14555

757f32141b
2024-04-16 10:00:48 +08:00
zeertzjq
fb7ffac69f
vim-patch:9.1.0326: filetype: some requirements files are not recognized (#28360)
Problem:  filetype: some requirements files are not recognized
Solution: Detect '*-requirements.txt', 'constraints.txt',
          'requirements.in', 'requirements/*.txt' and 'requires/*.txt'
          as requirements filetype, include pip compiler, include
          requirements filetype and syntax plugin
          (Wu, Zhenyu, @raimon49)

closes: vim/vim#14379

f9f5424d3e

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Co-authored-by: raimon <raimon49@hotmail.com>
2024-04-16 09:33:33 +08:00
zeertzjq
07661009c5
vim-patch:9.1.0325: CMakeCache.txt files not recognized (#28359)
vim-patch:9.1.0325: filetype: CMakeCache.txt files not recognized

Problem:  filetype: CMakeCache.txt files not recognized
Solution: Detect 'CMakeCache.txt' files as cmakecache filetype,
          include basic syntax script for cmakecache
          (Wu, Zhenyu, @bfrg)

closes: vim/vim#14384

62c09e032c

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Co-authored-by: bfrg <bfrg@users.noreply.github.com>
2024-04-16 09:33:16 +08:00
zeertzjq
14fb2ef4fb
vim-patch:8.2.3415: Vim9: not all function argument types are properly checked (#28362)
Problem:    Vim9: Not all function argument types are properly checked.
Solution:   Add and improve argument type checks. (Yegappan Lakshmanan,
            closes vim/vim#8839)

fc3b775055

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2024-04-16 09:32:36 +08:00
zeertzjq
ca2f24cbbd vim-patch:9.1.0324: filetype: some json files are not recognized
Problem:  filetype: some json files are not recognized
Solution: Detect '.jscsrc' and '.vsconfig' as jsonc filetype
          (Wu, Zhenyu)

See:
- https://github.com/microsoft/PowerToys/blob/main/.vsconfig
- https://jscs-dev.github.io/

closes: vim/vim#14452

c59a8648b2

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-16 08:32:08 +08:00
zeertzjq
6717cc5b41 vim-patch:9.1.0322: filetype: some mail tools not recognized
Problem:  filetype: some mail tools not recognized
Solution: Detect '.mbsncrc' as conf, '.msmtprc' as msmtp
          and '.notmuch-config' as ini filetype
          (Shane-XB-Qian)

closes: vim/vim#14533

a7a9a476cf

Co-authored-by: shane.xb.qian <shane.qian@foxmail.com>
2024-04-16 08:19:17 +08:00
zeertzjq
b35f08ddb1
vim-patch:9.1.0334: No test for highlight behavior with 'ambiwidth' (#28354)
Problem:  No test for highlight behavior with 'ambiwidth'.
Solution: Add a screendump test for 'ambiwidth' with 'cursorline'.
          (zeertzjq)

closes: vim/vim#14554

a59e031aa0
2024-04-16 06:50:23 +08:00
Justin M. Keyes
5ed9916a28 feat(diagnostic): enable(…, opts)
Problem:
vim.diagnostic.enable() does not match the signature of vim.lsp.inlay_hint.enable()

Solution:
- Change the signature so that the first 2 args are (bufnr, enable).
- Introduce a 3rd `opts` arg.
    - Currently it only supports `opts.ns_id`.
2024-04-15 21:32:31 +02:00