Commit Graph

29888 Commits

Author SHA1 Message Date
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
Christian Clason
3d43bdc81e vim-patch:802fc04: runtime(rescript): include basic rescript ftplugin file (vim/vim#14822)
Reference: https://rescript-lang.org/docs/manual/latest/overview#comments

802fc04a78

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2024-05-22 23:48:32 +02: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
dundargoc
e8f7025de1 docs: move vim.health documentation to lua.txt
`vim.health` is not a "plugin" but part of our Lua API and the
documentation should reflect that. This also helps make the
documentation maintenance easier as it is now generated.
2024-05-22 20:15:17 +02:00
Ilia Choly
339129ebc9 refactor(lsp): use supports_method where applicable 2024-05-22 09:54:16 +01: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
Gregory Anders
d6be78cc98
vim-patch:d1d9316: runtime(zig): refactor zig ftplugin, remove auto format (#28904)
Refactored zig ftplugin, removed upstream comment, aucmd and
auto formatting support. Updated documentation for zig configuration
settings and added new maintainer.

closes: vim/vim#13803

d1d9316c66

Co-authored-by: Tiseno <mathias.lindgren@stabelo.se>
2024-05-21 18:51:51 -05: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
2d8cb1bc9b
Merge pull request #28905 from zeertzjq/vim-9.1.0426
vim-patch:9.1.{0426,0428}: too many strlen() calls in search.c
2024-05-22 06:54:09 +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
Ilia Choly
879d17ea8d
fix(lsp): detach all clients on_reload to force buf_state reload (#28875)
Problem:  The changetracking state can de-sync when reloading a buffer
          with more than one LSP client attached.
Solution: Fully detach all clients from the buffer to force buf_state to
          be re-created.
2024-05-21 20:02:48 +02:00
Jongwook Choi
56b7a18995
docs: how to get core dump files #28826
Problem: Docs about how to obtain backtraces on Linux is not very
beginner-friendly; some users used to have difficulties in getting
stacktrace against Nvim crash.

For instance, the `core` dump file might not appear in the current
directory on Ubuntu systems with apport, and the current docs do not
fully cover such cases.

Solution: Add more hints about where core dump files can be found. For
example, on Ubuntu where apport is managing core dump files, users would
want to find them in `/var/lib/apport/coredump`.
2024-05-21 09:31:28 -07: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
Mango The Fourth
d9a2acdab3
fix(lsp): hide layout in codelenses in virtual text (#28794) (#28807)
Problem: layout i.e. whitespace that is part of codelenses is currently
displayed as weird symbols and large amounts of spaces

Solution: replace all consecutive whitespace symbols with a single space
character when trying to display codelenses as virtual text
2024-05-21 18:23:37 +02: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
Ilia Choly
8263ed4670
fix(lsp): add textDocument/documentLink to capability map (#28838) 2024-05-21 18:16:53 +02:00
Jongwook Choi
7aaa4a51b7
build(vim-patch.sh): include commit subject #28767
Problem: vim-patch commits lack an informative title and summary in the
very first line of the commit message when the vim-revision is a Git SHA
hash, unlike when is a Vim version. This makes it difficult to discern
at a glance what changes are introduced by such vim-patch commits (in
git log, PR title, changelog generated by git-cliff, etc.).

BEFORE:

    vim-patch:abcdef123456

    runtime(vim): improve performance

    <some details>
    ...

Solution: Repeat the title of the upstream commit message, to improve
the clarity and visibility of the commit message.

AFTER:

    vim-patch:abcdef123456: runtime(vim): improve performance

    <some details>
    ...

Note: the `vim-patch:<hash>` token is still needed by `vim-patch.sh`
(but not necessarily in the very first line of the commit message) to
determine which vim patches have been applied. `<hash>` is internally
normalized to 7 hex digits.
2024-05-21 09:10:39 -07:00
zeertzjq
47c741e30c
fix(tui): remove duplicate disabling of synchronized output (#28884)
Synchronized output is enabled and disabled inside flush_buf().
2024-05-21 20:54:20 +08:00
Christian Clason
14f9aacc9d vim-patch:8cf29e4c4a2a
runtime(matchit): update matchit plugin to v1.20

fixes: vim/vim#14814

8cf29e4c4a

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-05-21 08:46:38 +02:00
zeertzjq
b7782daace
vim-patch:8.2.1520: Vim9: CTRL-] used in :def function does not work (#28880)
Problem:    Vim9: CTRL-] used in :def function does not work.
Solution:   Omit count or prepend colon. (closes vim/vim#6769)

b3ea36c5bc

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-05-21 07:45:59 +08:00
Christian Clason
666911be91 vim-patch:69dff00dfb37
runtime(verilog): set commentstring option

closes: vim/vim#14810

69dff00dfb

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2024-05-20 22:58:05 +02: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
36a9da6547
Merge pull request #28854 from zeertzjq/vim-9.1.0394
vim-patch:9.1.{0394,0395,0423}: getregionpos()
2024-05-20 21:17:21 +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
3383603c13 vim-patch:9.1.0395: getregionpos() may leak memory on error
Problem:  regionpos may leak memory on error, coverity
          complains about dereferencing Null pointer
Solution: free all list pointers (after v9.1.394),
          return early if buflist_findnr() returns NULL

closes: vim/vim#14731

b8ecedce79

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-05-20 20:50:08 +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
6745cd8d72 vim-patch:f295050fa524
runtime(nim): basic nim ftplugin file for comments (vim/vim#14812)

Reference: https://nim-by-example.github.io/comments/#:~:text=Comments%20in%20Nim%20begin%20with%20the%20hash%20character.&text=Multiline%20or%20block%20comments%20begin,line%20comments%20can%20be%20nested.

f295050fa5

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2024-05-20 14:43:12 +02:00
Christian Clason
2dfce05ec9 vim-patch:957d903cb7af
runtime(arduino): Add Arduino ftplugin and indent files (vim/vim#14811)

We already have Arduino syntax file, but we didn't have ftplugin and
indent files.

This commit adds a basic ftplugin file and a basic indent file.
Both of them are derived from {ftplugin,indent}/c.vim.

957d903cb7

Co-authored-by: K.Takata <kentkt@csc.jp>
2024-05-20 14:43:12 +02:00
Christian Clason
7d6a8438c9 vim-patch:c3d5c2fc8721
runtime(typst): include basic typst ftplugin file (vim/vim#14809)

Reference: https://typst.app/docs/reference/syntax/#comments

c3d5c2fc87

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2024-05-20 14:43:12 +02:00
Christian Clason
27a3e92a87 vim-patch:9c4d14dbb4ba
runtime(prisma): include basic prisma ftplugin file (vim/vim#14807)

Reference: https://www.prisma.io/docs/orm/prisma-schema/overview#comments

9c4d14dbb4

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2024-05-20 14:43:12 +02:00
Christian Clason
31ca341d92 vim-patch:1b5e3d21f6f3
runtime(v): include basic v ftplugin for comment support (vim/vim#14806)

1b5e3d21f6

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2024-05-20 14:43:12 +02:00
zeertzjq
0e187fe038
vim-patch:9.1.0409: too many strlen() calls in the regexp engine (#28857)
Problem:  too many strlen() calls in the regexp engine
Solution: refactor code to retrieve strlen differently, make use
          of bsearch() for getting the character class
          (John Marriott)

closes: vim/vim#14648

82792db631

Cherry-pick keyvalue_T and its comparison functions from patch 9.1.0256.

vim-patch:9.1.0410: warning about uninitialized variable
vim-patch:9.1.0412: typo in regexp_bt.c in DEBUG code

Co-authored-by: John Marriott <basilisk@internode.on.net>
2024-05-20 12:42:57 +08: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
Christian Clason
ee3c49a44e vim-patch:4d7892bfb1db
runtime(dart): add basic dart ftplugin file

fixes vim/vim#14793
closes vim/vim#14802

4d7892bfb1

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2024-05-20 00:13:40 +02:00
Christian Clason
ac19c7c8af vim-patch:36e974fdf3f5
runtime(graphql): basic ftplugin file for graphql

closes: vim/vim#14801

36e974fdf3

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2024-05-20 00:13:40 +02:00
Christian Clason
8b07a18947 vim-patch:df859a36d390
runtime(sql): set commentstring for sql files in ftplugin

closes: vim/vim#14800

df859a36d3

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2024-05-20 00:13:40 +02:00
Jongwook Choi
9a43ec13e6 fix(diagnostic): show backtrace for deprecation warnings
Problem: On nvim 11.0-dev, deprecation warnings due to an use of
hard-deprecated APIs such as:
- `vim.diagnostic.disable()`
- `vim.diagnostic.is_disabled()`
etc. are not accompanied by backtrace information. It makes difficult
for users to figure out which lines or which plugins are still using
deprecated APIs.

Solution: use `backtrace = true` in vim.deprecate() call.
2024-05-20 00:02:51 +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
63e3a63d2f
refactor(path.c): add nonnull attributes (#28829)
This possibly fixes the coverity warning.
2024-05-19 05:38:31 +08:00
zeertzjq
48c2ad5d2d
vim-patch:94043780196c (#28831)
runtime(matchparen): fix :NoMatchParen not working (vim/vim#14797)

fixes: neovim/neovim#28828

9404378019
2024-05-18 15:53:26 +08:00
Christian Clason
b3e0457403 vim-patch:cf78d0df51f2
runtime(sshdconfig): add basic ftplugin file for sshdconfig (vim/vim#14790)

cf78d0df51

Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
2024-05-18 08:57:07 +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
dundargoc
512d228111 ci: change label backport to target:release
`backport` is too similar `ci:backport release-x.y` and causes
confusion.
2024-05-17 22:46:20 +02: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