Commit Graph

29946 Commits

Author SHA1 Message Date
bfredl
7e194f0d0c NVIM 0.10.1
This is a maintenance release.

FEATURES
--------------------------------------------------------------------------------
- ebc6c38cde lsp: update LSP healthcheck format (#28988)

BUILD
--------------------------------------------------------------------------------
- ba90b54301 deps: drop unused bundled bash, python parsers and queries
- 803cc08c17 deps: bump tree-sitter-c to v0.21.3
- 91e337a477 deps: bump tree-sitter-query to v0.4.0
- 978b63a9f1 deps: bump tree-sitter-vimdoc to v3.0.0
- b322c3560b "popcount" name conflict on NetBSD #28983
- b397b5672c remove -O2 from gen_cflags
- f77db12995 reuse code for deps.txt for both deps and main build
- 46d2906332 macos: disable deduplication in link step

FIXES
--------------------------------------------------------------------------------
- 70f7708cdf assert failure in VimL expression parser
- 28f03205be show swapfile warning as a warning (#28972)
- 0d293e4315 api: alloc and draw cursor window in nvim__redraw
- e1b6187801 colorscheme: underline StatusLineNC with 'notermguicolors' #28810
- aa1321801d column: clamp line number for legacy signs
- df6ce8377f column: crash with 'signcolumn' set to "number" (#29003)
- 97be9d8563 column: modifying a sign should update placed signs (#29750)
- 21b21b94e6 comment: fall back to using trimmed comment markers (#28950)
- 0827279ff5 defaults: default @/Q broken when 'ignorecase' is set (#29343)
- 5d9f2d7ecc drawline: don't draw beyond end of window (#29035)
- eadc4e03a2 drawline: don't draw beyond end of window with 'rnu' (#29406)
- bec397edda extmarks: issues with revalidating marks #28961
- 1fe1f8556e filetype: fix typos in filetype detection
- ad55ec350c float: handle error in win_float_create() (#29742)
- bf16fe3f01 fs: make vim.fs.root work for relative paths and unnamed buffers (#28973)
- 5eaae797af health: broken ruby detect #28804
- 24ee2e7c74 health: fix fetching url with python in provider health (#29594)
- 7582d4a7b5 input: handle vim.on_key() properly with ALT and K_SPECIAL (#29677)
- 4f0c4c3921 lsp: add textDocument/documentLink to capability map (#28838)
- 2d7aab623e lsp: avoid vim.keymap.del error when stopping a client (#29478)
- bdd5871dc5 lsp: check if buffer was detached in on_init callback (#28942)
- d8ff216040 lsp: clear lsp client diagnostics (#29091)
- 3a727beafd lsp: detach all clients on_reload to force buf_state reload (#28898)
- e98637e8c0 lsp: do not detach from buffer if there are uninitialized clients (#29043)
- 0ee3147bc7 lsp: do not reset buf version when detaching client (#29273)
- 24fa65a500 lsp: don't show codelens for buffers that don't support it (#29690)
- 4efca7cda5 lsp: handle nil root_dir in health check (#29010)
- efe8a0a520 lsp: hide layout in codelenses in virtual text (#28794) (#28895)
- 2fb69ccaf7 lsp: inlay hints are rendered in the correct order (#29707)
- dfff482efe lsp: remove superfluous on_detach callback from semantic tokens module (#29188)
- 10a16c1311 lsp: trigger LspDetach on buffer delete
- 33121f1eae lua: change some vim.fn.expand() to vim.fs.normalize() (#29583)
- ffc457a1dc marks: revalidate marks whose position did not change
- f82d7b8200 mouse: early return when clicking in padded 'statuscolumn' (#29394)
- d6756fc0a5 move: half-page scrolling with resized grid at eob (#28821)
- 0cf7e2570c path: avoid chdir() when resolving path (#28799)
- 63ff7338ea quickfix: make shortmess+=O work with cmdheight=0 (#29609)
- 46c2962b3a runtime: add commentstring for glsl ftplugin
- b98aa783f3 runtime: source c ftplugin properly for cpp on Windows (#29053)
- 039121f5a3 snippet: cancel snippet session when leaving the buffer (#29044)
- 84d7bfcf16 snippet: don't override unnamed register on tabstop select (#29008)
- e13f03af85 snippet: modify base indentation when there's actually whitespace (#29670)
- 9fd6664ba7 tohtml: extmark text may be out of bounds
- 8c88f402e1 tohtml: ignore lsp inlay hints
- 5cdf0c22bd tohtml: properly handle multiple hl groups #29012
- 3d319092d5 tohtml: replace ipairs with pairs
- 4150e5e6fd tohtml: show how many warnings are hidden
- 0389472961 tohtml: support ranges again
- ab2d243fd0 treesitter: display fields for anonymous nodes in :InspectTree
- 35f6425207 treesitter: do not modify highlight state for _on_spell_nav
- 356ddb1305 treesitter: ensure syntaxset augroup exists (#29542)
- eb53aba5af treesitter: recognize aliased parsers in omnifunc, query linter
- b6b2272573 tui: move $COLORTERM check to _defaults.lua (#29206)
- 89f29fcc92 tui: remove duplicate disabling of synchronized output (#28884)
- a784b901be tui: skip TUI in ui_rgb_attached (#29096)
- 19787d6057 ui: avoid ambiguity about last chunk when flushing halfway (#29718)
- 89fa1ee822 ui: flush ext_cmdline events before doing cmdpreview (#29062)
- 7055cd1238 ui: superfluous showmode / excessive grid_cursor_goto #29089
- 6802db7aa1 version: fix vim.version().prerelease
- 728f6c7c83 vim.text: remove assert from vim.text.hexdecode
- c3aef56199 win-msi: add bin to PATH per-machine after installation (#29099)

VIM PATCHES
--------------------------------------------------------------------------------
- fdf769fa86 0b74eec: runtime(stylus): remove remaining css code (vim/vim#14866)
- 29fd7432fd 74703f1: runtime(doc): remove obsolete Ex insert behavior (#29702)
- 891cc78179 7a85e34: runtime(doc): fix inconsistencies in :h file-searching (#29652)
- 704d33634e 8.2.0083: text properties wrong when tabs and spaces are exchanged
- 571e54e12c 8.2.0109: corrupted text properties when expanding spaces
- 7c055bd74b 8.2.3388: fnamemodify('path/..', ':p') differs from using 'path/../' (#29667)
- 9c91233a38 9.1.0414: Unable to leave long line with 'smoothscroll' and 'scrolloff'
- 34cc49bd72 9.1.0498: getcmdcompltype() interferes with cmdline completion (#29397)
- 259a620eb8 9.1.0512: Mode message for spell completion doesn't match allowed keys (#29437)
- f89d4ee6ce 9.1.0526: Unwanted cursor movement with pagescroll at start of buffer (#29569)
- 4ce293c2c3 9.1.0565: Stop directory doesn't work properly in 'tags'
- c467bfeb93 9.1.0566: Stop dir in findfile() doesn't work properly w/o trailing slash
- 576363a0fb 9.1.0567: Cannot use relative paths as findfile() stop directories
- ceb82a9396 9.1.0569: fnamemodify() treats ".." and "../" differently (#29673)
- 07de890de6 9.1.0580: :lmap mapping for keypad key not applied when typed in Select mode (#29693)
- b01202df15 9.1.0594: Unnecessary redraw when setting 'winfixbuf' (#29775)
- 804a94d300 9.1.0601: Wrong cursor position with 'breakindent' when wide char doesn't fit (#29793)
- a03cc83bfb df62c62: runtime(doc): grammar fixes in options.txt (#29729)
- fde5718e62 partial:9.0.0323: using common name in tests leads to flaky tests

REDACTOR
--------------------------------------------------------------------------------
- c35e040b7e replace deprecated vim.loop with vim.uv
- 3a354bfcaa lsp: reuse buf_detach_client logic in on_detach (#28939) (#29024)
- dffadc392e path.c: add nonnull attributes (#28829)
- db65017e60 tests: more global highlight definitions
- 3725db69ef tests: use more global highlight definitions

CI
--------------------------------------------------------------------------------
- 7400f9dfe5 adjust workflows to enable required checks
- 575136c178 always add `target:release` label when backporting
- 410f43c0ae bump backport action to version 3
- 9a2760a01f change label `backport` to `target:release`
- b94b341ef2 run workflows on release branches
- 0e81c62405 skip lintcommit workflow on release branches

TESTING
--------------------------------------------------------------------------------
- f03348472d add a test for #29119
- 18a36d3d9f do not set termguicolors in test runner
- 68513c2a89 fix reporting "no flush received" too early (#29735)
- 981548b7f7 remove checks for failed tests on Windows
- 65776124b1 starting and stopping treesitter highlight (#29546)

DOCUMENTATION
--------------------------------------------------------------------------------
- 891b235df0 document 'list' behavior when 'listchars' excludes "tab" (#29360)
- 8c00651131 fix more treesitter parsing errors
- 777e15fa61 update LSP quickstart (#28989)
- 6136326d63 lpeg: merge upstream changes
- f7d8650616 lsp: format the handwritten part #29295
2024-07-24 09:20:05 +02:00
Rustum Zia
70f7708cdf fix: assert failure in VimL expression parser
(cherry picked from commit 6720bd440f)
2024-07-21 16:49:52 +02:00
Luuk van Baal
0d293e4315 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.
(cherry picked from commit 89f9f168a5)
2024-07-21 16:37:50 +02:00
Luuk van Baal
ffc457a1dc 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.
(cherry picked from commit 012db2b0f5)
2024-07-21 16:31:33 +02:00
dundargoc
575136c178 ci: always add target:release label when backporting
Previously the label was not added if the backport PR was created
manually. The new code is also easier to maintain as it's close to other
label-related code.

(cherry picked from commit 4c788b1757)
2024-07-21 16:03:10 +02:00
dundargoc
f77db12995 build: reuse code for deps.txt for both deps and main build
(cherry picked from commit f09f5c45fa)
2024-07-21 14:56:57 +02:00
zeertzjq
18a9ae169e
Merge pull request #29797 from neovim/backport-29793-to-release-0.10
vim-patch:9.1.0601: Wrong cursor position with 'breakindent' when wide char doesn't fit
2024-07-19 12:14:33 +08:00
zeertzjq
804a94d300 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
(cherry picked from commit 35b35cb93c)
2024-07-19 03:55:46 +00:00
altermo
0389472961 fix(tohtml): support ranges again 2024-07-18 09:44:52 +02:00
altermo
9fd6664ba7 fix(tohtml): extmark text may be out of bounds 2024-07-18 09:44:52 +02:00
Riley Bruins
5cdf0c22bd 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-07-18 09:44:52 +02:00
altermo
4150e5e6fd fix(tohtml): show how many warnings are hidden 2024-07-18 09:44:52 +02:00
altermo
8c88f402e1 fix(tohtml): ignore lsp inlay hints 2024-07-18 09:44:52 +02:00
altermo
3d319092d5 fix(tohtml): replace ipairs with pairs 2024-07-18 09:44:52 +02:00
zeertzjq
6527f5e2d2
Merge pull request #29783 from neovim/backport-29742-to-release-0.10
fix(winfloat): error handle in float create
2024-07-18 13:24:09 +08:00
glepnir
ad55ec350c fix(float): handle error in win_float_create() (#29742)
Problem: Missing error handling in win_float_create() function.
Solution: Add an inline function for error handling.
(cherry picked from commit 8ddcf9d939)
2024-07-18 05:00:31 +00:00
zeertzjq
125b253e7b
Merge pull request #29782 from neovim/backport-29775-to-release-0.10
vim-patch:9.1.0594: Unnecessary redraw when setting 'winfixbuf'
2024-07-18 12:46:13 +08:00
zeertzjq
b01202df15 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
(cherry picked from commit bbe51ef016)
2024-07-18 04:26:17 +00:00
zeertzjq
d6437e2ca5
Merge pull request #29781 from neovim/backport-29750-to-release-0.10
fix(column): modifying a sign should update placed signs
2024-07-18 12:24:10 +08:00
luukvbaal
97be9d8563 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.
(cherry picked from commit f9a49fab0c)
2024-07-18 04:09:26 +00:00
Amit Singh
2fb69ccaf7 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 17:56:04 +02:00
dundargoc
0e81c62405 ci: skip lintcommit workflow on release branches
Since lintcommit is a required check, it will always need to be run.
However, the lintcommit script is not designed to work on PRs that
doesn't target master branch (and it's not clear whether it's even
desirable).

To circumvent this we create a "dummy" lintcommit check that is run on
release branches that always passes, thus fulfilling the condition of
the required check.

(cherry picked from commit 0500804df5)
2024-07-17 17:29:18 +02:00
zeertzjq
68513c2a89 test: fix reporting "no flush received" too early (#29735)
(cherry picked from commit bc2bd25f8e)
2024-07-17 23:06:02 +08:00
Riley Bruins
eb53aba5af fix(treesitter): recognize aliased parsers in omnifunc, query linter
**Problem:** A query file for something like `html_tags` will not be
given html node completion

**Solution:** Check for parser aliases before offering completions

Co-authored-by: Lewis Russell <me@lewisr.dev>
(cherry picked from commit 05dcda8f9b)
2024-07-17 12:37:42 +02:00
Maria José Solano
e13f03af85 fix(snippet): modify base indentation when there's actually whitespace (#29670)
(cherry picked from commit 5fe4ce6678)
2024-07-17 11:42:03 +02:00
Riley Bruins
24fa65a500 fix(lsp): don't show codelens for buffers that don't support it (#29690)
(cherry picked from commit 1f2f460b4a)
2024-07-17 11:41:53 +02:00
dundargoc
b94b341ef2 ci: run workflows on release branches
Github doesn't allow workflows to be run from the `github-actions`
account, which is the default account. This caused the CI on backport
PRs to not be run. The way to circumvent this is to use a token that
essentially "pretends" to be another user, which in turn triggers the CI
as desired.

Also run lintcommit on release branches as that is now a required check,
meaning it must always be run.
2024-07-16 20:12:13 +02:00
dundargoc
410f43c0ae ci: bump backport action to version 3 2024-07-16 20:12:13 +02:00
zeertzjq
677eb23c38
Merge pull request #29731 from neovim/backport-29729-to-release-0.10
vim-patch:df62c62: runtime(doc): grammar fixes in options.txt
2024-07-16 06:47:16 +08:00
zeertzjq
a03cc83bfb vim-patch:df62c62: runtime(doc): grammar fixes in options.txt (#29729)
closes: vim/vim#15265

df62c62177

Co-authored-by: Dominique Pellé <dominique.pelle@gmail.com>
(cherry picked from commit c2b51e6c41)
2024-07-15 22:32:55 +00:00
zeertzjq
a333847f6b
Merge pull request #29730 from neovim/backport-29727-to-release-0.10
docs(lpeg): merge upstream changes
2024-07-16 06:30:15 +08:00
Maria José Solano
6136326d63 docs(lpeg): merge upstream changes
(cherry picked from commit 8703e7bd12)
2024-07-15 22:16:53 +00:00
dundargoc
7400f9dfe5 ci: adjust workflows to enable required checks
Auto-merging is a useful feature by github, but it requires required
checks which requires a few adjustments. The primary change is that
required checks can't use `paths` or `paths-ignore` as that risks not
running the job, and required checks must always be run.

A workaround for this is to introduce a dummy workflow which is used for
every path not used in the real workflow. That way the required job is
"always" run as far as github is concerned. The workaround is unweildly
so it's only useful to do it for costly workflows where the potential
benefits are big. If not it's better to simply remove any `paths` or
`paths-ignore` from a workflow instead.

(cherry picked from commit 3c803483ac)
2024-07-15 18:16:57 +02:00
zeertzjq
2ae8bb7b96
Merge pull request #29720 from neovim/backport-29718-to-release-0.10
fix(ui): avoid ambiguity about last chunk when flushing halfway
2024-07-15 18:49:07 +08:00
zeertzjq
19787d6057 fix(ui): avoid ambiguity about last chunk when flushing halfway (#29718)
(cherry picked from commit 594c7f3d77)
2024-07-15 10:35:38 +00:00
github-actions[bot]
f654a30093
docs: misc (#29714)
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: dundargoc <33953936+dundargoc@users.noreply.github.com>
2024-07-15 07:09:47 +08:00
github-actions[bot]
29fd7432fd
vim-patch:74703f1: runtime(doc): remove obsolete Ex insert behavior (#29702)
related: vim/vim#15120
closes: vim/vim#15228

74703f1086

Nvim only supports Vim Ex mode, so this is long obsolete in Nvim.

Co-authored-by: Mohamed Akram <mohd.akram@outlook.com>
2024-07-14 15:08:13 +08:00
zeertzjq
b2587a0665
Merge pull request #29701 from neovim/backport-29652-to-release-0.10
vim-patch:7a85e34: runtime(doc): fix inconsistencies in :h file-searching
2024-07-14 15:02:51 +08:00
zeertzjq
891cc78179 vim-patch:7a85e34: runtime(doc): fix inconsistencies in :h file-searching (#29652)
closes: vim/vim#15201

7a85e343d2
(cherry picked from commit 15f6cf0c8f)
2024-07-14 06:46:36 +00:00
zeertzjq
94aacc2695
Merge pull request #29700 from neovim/backport-29673-to-release-0.10
vim-patch:9.1.0569: fnamemodify() treats ".." and "../" differently
2024-07-14 14:45:36 +08:00
zeertzjq
ceb82a9396 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
(cherry picked from commit 028dd3c5c4)
2024-07-14 06:33:01 +00:00
zeertzjq
bddbbd874c
Merge pull request #29699 from neovim/backport-29668-to-release-0.10
vim-patch:9.1.{0562,0565,0566,0567}: file search fixes
2024-07-14 14:31:02 +08:00
zeertzjq
576363a0fb 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
(cherry picked from commit 80818641f3)
2024-07-14 06:14:50 +00:00
zeertzjq
c467bfeb93 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
(cherry picked from commit 091a130804)
2024-07-14 06:14:50 +00:00
zeertzjq
4ce293c2c3 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
(cherry picked from commit 50feb85b0c)
2024-07-14 06:14:50 +00:00
zeertzjq
fde5718e62 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>
(cherry picked from commit 2c9e82e193)
2024-07-14 06:14:50 +00:00
zeertzjq
a430944ea7
Merge pull request #29698 from neovim/backport-29667-to-release-0.10
vim-patch:8.2.3388: fnamemodify('path/..', ':p') differs from using 'path/../'
2024-07-14 14:12:30 +08:00
zeertzjq
7c055bd74b 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>
(cherry picked from commit 31d53cbb0f)
2024-07-14 05:59:59 +00:00
zeertzjq
113e5a91de
Merge pull request #29694 from neovim/backport-29693-to-release-0.10
vim-patch:9.1.0580: :lmap mapping for keypad key not applied when typed in Select mode
2024-07-14 07:09:29 +08:00
zeertzjq
07de890de6 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
(cherry picked from commit 49ba36becd)
2024-07-13 22:53:52 +00:00