Commit Graph

29775 Commits

Author SHA1 Message Date
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
bfredl
fc2429962a
Merge pull request #29063 from bfredl/noapifile
refactor(fileio): remove useless use of FileDescriptor
2024-05-28 19:42:00 +02: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
ff7f22c28b refactor(fileio): remove useless use of FileDescriptor
FileDescriptor is used to buffer togheter many small writes to fewer
syscalls. if the data to write already is in a single buffer, it is
perfectly fine to just use os_write directly (which will take care of
the reverse problem: splitting a too big write into many syscalls)
2024-05-28 13:06:35 +02:00
Justin M. Keyes
90a4b1a59c
refactor: deprecate vim.region() #28416
Problem:
`vim.region()` is redundant with `getregionpos()`.

Solution:
Deprecate `vim.region()`.
2024-05-28 03:07:13 -07: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
c272f30b1f
Merge pull request #29057 from zeertzjq/vim-0b74eeceb856
vim-patch:0b74eec: runtime(stylus): remove remaining css code (vim/vim#14866)
2024-05-28 14:59:48 +08:00
zeertzjq
4e2c8dc374 vim-patch:0b74eec: runtime(stylus): remove remaining css code (vim/vim#14866)
This seems to be a forgotten fixup in 2d919d2744 (r141568461)

0b74eeceb8
2024-05-28 14:40:26 +08: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
dundargoc
6e8a728e3d refactor: fix luals type warnings 2024-05-27 20:48:46 +02:00
dundargoc
f70af5c3ca ci: bump backport action to version 3 2024-05-27 19:47:49 +02:00
Maria José Solano
608543f8a9
fix(snippet): cancel snippet session when leaving the buffer (#29031) 2024-05-27 17:18:10 +02: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
zeertzjq
8893b7b340
vim-patch:393708c: runtime(vim): re-generate vim syntax from generator (#29041)
related: vim/vim#14861

393708cff6

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-05-27 22:38:10 +08: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
Malte Dehling
104800ce2e
build: "popcount" name conflict on NetBSD #28983
Problem:
    NetBSD's libc already has a function by the same name.

Solution:
    Rename popcount to xpopcount and add #if defined(__NetBSD__) to
prefer NetBSD's own implementation.  This fixes #28983.
2024-05-27 04:14:57 -07:00
zeertzjq
9a0239fdc8
fix(drawline): don't draw beyond end of window (#29035) 2024-05-27 14:37:22 +08:00
Christian Clason
ffbd09ef6a vim-patch:8607192: runtime(typescriptreact): fix highlighting nested and escaped quotes in string props (vim/vim#14852)
86071925ed

Co-authored-by: Linda_pp <rhysd@users.noreply.github.com>
2024-05-27 06:59:01 +02:00
Christian Clason
14a7644181 vim-patch:76174e7: runtime(asm): remove the indent plugin since it has too many issues
fixes: vim/vim#14791

76174e7110

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-05-27 06:59:01 +02: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
43a2019f09
fix(extmarks): issues with revalidating marks #28961
Problem:  Invalid marks appear to be revalidated multiple times, and
          decor is added at the old position for unpaired marks.
Solution: Avoid revalidating already valid marks, and don't use old
          position to add to decor for unpaired marks.
2024-05-26 10:55:57 -07: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
Justin M. Keyes
dd54e81551
Merge #29021 TOhtml fixes 2024-05-26 10:20:59 -07:00
altermo
88c7997503 fix(tohtml): show how many warnings are hidden 2024-05-26 13:57:30 +02:00
bfredl
4f24e1b1d7
Merge pull request #29014 from bfredl/editortest
refactor(tests): more global highlight definitions
2024-05-26 13:32:51 +02:00
altermo
8cd9feb501 fix(tohtml): ignore lsp inlay hints 2024-05-26 13:14:40 +02:00
altermo
2ed6423c7e fix(tohtml): replace ipairs with pairs 2024-05-26 12:56:32 +02:00
Christian Clason
98536dd78e build(deps): bump tree-sitter-c to v0.21.3 2024-05-26 12:38:20 +02:00
Christian Clason
61b3a26e5b build(deps): bump tree-sitter-query to v0.4.0 2024-05-26 12:38:20 +02:00
Christian Clason
da7056ffff build(deps): bump luajit to HEAD - 93e87998b 2024-05-26 11:26:12 +02: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
Christian Clason
eaaf3d9048 vim-patch:0076ddc: runtime(debian): update Debian runtime files (vim/vim#14849)
* Add space in template for 'commentstring'
* Add 'comments' and 'commentstring' support to debcontrol
* debversions: Move Ubuntu releases outside of standard support to unsupported
  Although trust, xenial, and bionic are not EOL yet, their standard support period has ended.

Reported-by: Riley Bruins <ribru17@gmail.com>

0076ddc07d

Co-authored-by: James McCoy <jamessan@debian.org>
Co-authored-by: Riley Bruins <ribru17@gmail.com>
2024-05-25 23:51:55 +02:00
Mathias Fußenegger
7994fdba6a
fix(snippet): don't override unnamed register on tabstop select (#28998) 2024-05-25 21:23:04 +02:00
Mathias Fußenegger
f03b1622ad
fix(lsp): handle nil root_dir in health check (#29007)
The root directory could show up as something like:

    Root directory: ~/path/to/cwd/v:null

Despite being `nil`
2024-05-25 21:22:41 +02:00
dundargoc
520c2657bb refactor: move provider-related to where they are used 2024-05-25 20:13:17 +02:00
bfredl
1c73bd7d27
Merge pull request #28999 from bfredl/snapshot2
refactor(tests): update screen:snapshot_util() to use new-style highlights
2024-05-25 19:26:47 +02: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
Rafael Kitover
fdeb01cd77
feat(main): expand file ~\ or ~/ prefix on Windows (#28515)
In command_line_scan() for MSWIN, expand "~\" or "~/" prefixed paths to
the USERPROFILE environment variable for the user's profile directory.

Fix #23901

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-05-25 20:44:39 +08:00