Commit Graph

28731 Commits

Author SHA1 Message Date
Christian Clason
0760d98680 vim-patch:20d61e1b94e5
runtime(java): add syntax support for Java switch expressions (#9124)

20d61e1b94

Co-authored-by: Nick Hanley <nicholasjhanley@gmail.com>
2024-02-22 16:27:56 +01:00
zeertzjq
eef2aedff6
fix(defaults): remove tmux background detection passthrough (#27571)
There is now a new tmux 3.4 release that queries background color from
the parent terminal if background is not set in tmux, so removing the
passthrough still works when background is not set in tmux, and fixes
the incorrect detection when background is set in tmux.
2024-02-22 21:15:56 +08:00
zeertzjq
741a6684e0
docs(builtin): show tag at first line with multiple signatures (#27577)
Problem:
When a function has multiple signatures, putting its tag at the last one
may make one think that's its only signature.

Solution:
When a function has multiple signatures, put its tag at the first one.
2024-02-22 19:39:58 +08:00
Christian Clason
42f8ada59d build(deps): bump luv to v1.48.0-0
* fix: Use os_uname() to check for Linux by @cryptomilk in #686
    * docs: typo in a table field name by @Bilal2453 in #689
    * docs: most new_handle methods won't return fail by @Bilal2453 in #683
    * test-tty: Don't depend on stdin/stdout handle type by @squeek502 in #688
    * Bump/libuv by @zhaozg in #690
    * Annotate .gitmodules with branch and tag by @creationix in #693
2024-02-22 10:07:04 +01:00
Christian Clason
bba4834ede vim-patch:e8f6af609178
runtime(tmux): Update tmux syntax (#14065)

e8f6af6091

Co-authored-by: Eric Pruitt <eric.pruitt@gmail.com>
2024-02-22 09:50:35 +01:00
altermo
e2e63bd045
fix(lua): make highlight.on_yank use win-local highlight (#27349)
Currently, highlight.on_yank() does buffer-local highlighting, this PR
makes it window scoped.

Also fix the problem that when yanking in a buffer, moving to another
buffer, and yanking before the original buffer highlight disappears, the
original buffer highlight won't disappear on timeout.
2024-02-22 16:39:32 +08:00
zeertzjq
4ec5c58846
refactor(terminal): rename confusing variable name "rv" (#27573)
Now that terminal_open() no longer returns a value, the variable name
"rv" is confusing, and "term" makes more sense anyway.
2024-02-22 13:18:52 +08:00
zeertzjq
711a2f5ff6
fix(api): don't leak memory with nvim_win_get_ns (#27570) 2024-02-22 09:13:07 +08:00
zeertzjq
2137edbd4f
fix(extmarks): redraw properly with scoped inline virt_text (#27569) 2024-02-22 09:05:52 +08:00
Christian Clason
d9e6a442f2 build(deps): bump tree-sitter to v0.21.0 2024-02-21 23:10:25 +01:00
Christian Clason
8ab9966939 test(treesitter): fix obsolete predicates 2024-02-21 23:10:25 +01:00
bfredl
ba0370b1d7
Merge pull request #27361 from altermo/buf-win-local-extmarks
feat(extmark): window scoped namespace
2024-02-21 19:21:13 +01:00
altermo
1c032ad703 feat(extmark): window scoped extmark
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2024-02-21 16:11:50 +01:00
rktjmp
6d8bbfe19d
docs: remove mention of foreground/background/special keys in nvim_set_hl (#27558)
To align the output of `nvim_get_hl` with its documentation -- which
points to `nvim_set_hl`, remove mentions of the keys `foreground`,
`background` and `special`.

The long keys are are still supported (via fallback checks inside
`dict2hlattrs`), but the `fg`, `bg` and `sp` keys are preferenced.
2024-02-21 21:25:08 +08:00
Maria José Solano
ac0e8323dc
fix(lsp): add parentheses to generated union array types (#27560) 2024-02-21 12:31:56 +01:00
bfredl
09651342e7
Merge pull request #27552 from bfredl/apialloc
refactor(api): make freeing of return-value opt-in instead of opt out.
2024-02-21 12:30:28 +01:00
dundargoc
4fb1739e6f build: fix uncrustify 2024-02-21 11:58:28 +01:00
bfredl
3cc54586be refactor(api): make freeing of return-value opt-in instead of opt out
As only a few API functions make use of explicit freeing of the return
value, make it opt-in instead. The arena is always present under the
hood, so `Arena *arena` arg now doesn't mean anything other than getting
access to this arena. Also it is in principle possible to return an
allocated value while still using the arena as scratch space for other
stuff (unlikely, but there no reason to not allow it).
2024-02-21 11:58:28 +01:00
zeertzjq
9bb046d1be
vim-patch:f9ca139e3aa1 (#27554)
runtime(misc): announce adoption of various runtime files

f9ca139e3a

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-02-21 06:30:18 +08:00
zeertzjq
f25c0c1eb9
vim-patch:ef387c062bb1 (#27553)
runtime(filetype): Modula-2 files with priority not detected (vim/vim#14055)

Problem:  Modula-2 files with a specified priority are not detected.
Solution: Match the priority syntax in module header lines when
          performing heuristic content detection.

Disable the :defcompile debug line.  This was accidentally left enabled
in commit 68a8947.

ef387c062b

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-02-21 06:29:53 +08:00
Vu Nhat Chuong
5e4a5f1aaa
fix(vim.ui.open): use explorer.exe instead of wslview #26947
Problem:
`vim.ui.open` uses `wslview`, which is slow and require a package from external PPA:
https://wslutiliti.es/wslu/install.html#ubuntu

Solution:
Use `explorer.exe` instead. WSL supports it by default:
https://learn.microsoft.com/en-us/windows/wsl/filesystems#view-your-current-directory-in-windows-file-explorer
2024-02-20 09:14:50 -08:00
bfredl
eb1e8c12e2
Merge pull request #27541 from bfredl/exprarena
refactor(api): use an arena for nvim_parse_expression
2024-02-20 13:11:18 +01:00
itchyny
ddda5e0a48
feat(help): hide filename of "gO" outline using conceal #27547
Help outlines, invoked by `gO`, displays the help section titles in the
location list window. This feature is implemented by setting the buffer
lines after opening the window, but this implementation breaks the
assumption that the quickfix window texts are consistently constructed
by the quickfix list items. I think we can use the conceal feature here.
Using conceal here improves interoperability between quickfix plugins,
and also simplifies the outline implementation.

Originally reported at https://github.com/itchyny/vim-qfedit/issues/12
2024-02-20 03:57:13 -08:00
zeertzjq
a0790558c3
fix(extmarks): priority order of inline and non-inline virt_text (#27532) 2024-02-20 19:53:49 +08:00
bfredl
acd9b54f08 refactor(api): use an arena for nvim_parse_expression 2024-02-20 12:31:11 +01:00
bfredl
69bdcc6823
Merge pull request #27536 from bfredl/bufferarena
refactor(api): reduce temporary allocations when replacing lines
2024-02-20 12:19:47 +01:00
bfredl
f2c73e9ee2 refactor(api): reduce temporary allocations when replacing lines
The way ml_replace_buf is implemented makes it unfriendly for
being used in a loop: every call allocates a scratch buffer for putting
the line into the "dirty" state. This then immediately needs to be freed
as the next ml_replace_buf and/or ml_append_buf call will flush that buffer.

It's better to later pay the price of allocating the scratch buffer only if
the line is being immediately edited (likely when using the API to only
change one line) with an extra memcpy, than allocating that buffer
multiple times every time the API is called.

Of course, a separate xmalloc/xfree cycle for each time the dirty line
changes is unwanted to begin with. But fixing that is a later refactor.
2024-02-20 11:24:15 +01:00
bfredl
8952a89db5
Merge pull request #27534 from bfredl/userarena
refactor(api): next PR to make use of the arena
2024-02-19 21:21:05 +01:00
dundargoc
8fdc84d0aa build: disable conversion warnings for GCC
GCC seems chronically incapable of producing correct and relevant
conversion warnings, and will therefore need to be silenced.
2024-02-19 20:41:44 +01:00
bfredl
404707c760 refactor(api): use arena for nvim_put and nvim_paste 2024-02-19 13:48:39 +01:00
bfredl
d14eefaee9 refactor(api): use arena when listing objects 2024-02-19 13:48:39 +01:00
bfredl
abb8dcd889 refactor(api): use arena for runtime and client info 2024-02-19 13:48:39 +01:00
bfredl
1d95abc66b refactor(api): use an arena for user commands 2024-02-19 13:44:45 +01:00
Maria José Solano
cc15ba212c refactor(lsp): typings for protocol constants 2024-02-19 11:23:35 +00:00
zeertzjq
a9f578b7a5
docs: improve 'tabline' click label docs (#27529) 2024-02-19 11:22:00 +08:00
Nacho Nieva
fa131de9ad
feat(tabline): middle mouse button now closes tab (#27522) 2024-02-19 10:49:33 +08:00
zeertzjq
8f1f2a1d9f
vim-patch:9.1.0115: Using freed memory with full tag stack and user data (#27525)
Problem:  Using freed memory with full tag stack and user data
          (Konstantin Khlebnikov)
Solution: Clear the user data pointer of the newest entry.
          (zeertzjq, Konstantin Khlebnikov)

fixes: neovim/neovim#27498
closes: vim/vim#14053

c86bff1771

Cherry-pick Test_tag_stack() changes from patch 9.0.0767.

Co-authored-by: Konstantin Khlebnikov <koct9i@gmail.com>
2024-02-19 06:53:13 +08:00
bfredl
1c520053a9
Merge pull request #27520 from bfredl/metaarena
refactor(api): use arena for metadata; msgpack_rpc_to_object delenda est
2024-02-18 18:32:46 +01:00
bfredl
bbf6d4a4bc refactor(api): use arena for metadata; msgpack_rpc_to_object delenda est
Note: kSDItemHeader is something is _written_ by nvim in the shada file
to identify it for debugging purposes outside of nvim. But this data wasn't ever used by
neovim after reading the file back, So I removed the parsing of it for now.
2024-02-18 18:09:56 +01:00
bfredl
93c911e52f
Merge pull request #27511 from bfredl/maparena
refactor(api): use arena for mappings, autocmd, channel info
2024-02-18 18:04:28 +01:00
bfredl
97531be1f7 refactor(api): use arena for autocmds 2024-02-18 13:38:19 +01:00
casswedson
d94adff48b
ci(labeler_issue): split on word boundaries
Splitting it on word boundaries rather than only spaces allows for better
detection. The issue labeler previously didn't catch titles such as
`treesitter: noisy "Invalid node type" error`.

Co-authored-by: casswedson <casswedson@users.noreply.github.com>
2024-02-18 12:29:07 +01:00
zeertzjq
b8c34efe33
fix(eval): skip over v:lua properly (#27517)
Problem:  Error when parsing v:lua in a ternary expression.
Solution: Set rettv->v_type for v:lua even if not evaluating.
2024-02-18 19:11:44 +08:00
zeertzjq
796df966f3
fix(options): don't update curswant for 'winhl' or 'winbl' (#27515) 2024-02-18 18:11:20 +08:00
bfredl
146333ca12 refactor(api): use arena for channel info and terminal info 2024-02-18 10:36:07 +01:00
zeertzjq
eb8a3e0575
vim-patch:9.1.0114: Setting some options may change curswant (#27514)
Problem:  Setting some options changes curswant unnecessarily.
Solution: Add a P_HLONLY flag that prevents changing curswant.
          (zeertzjq)

closes: vim/vim#14044

fcaed6a70f
2024-02-18 17:20:49 +08:00
bfredl
f25fcc68a3 refactor(api): use an arena for mappings 2024-02-18 10:15:27 +01:00
bfredl
b12d193b4a
Merge pull request #27481 from bfredl/meta_revise
fix(decorations): crash with revised mark with changed decoration flags
2024-02-17 18:42:47 +01:00
bfredl
2accf24805 fix(decorations): crash with revised mark with changed decoration flags
fixes #27211
2024-02-17 18:22:35 +01:00
Christian Clason
01c15a30c0
ci(release): run universal_macos build on M1 (#27505)
Run the release workflow on macos-14 to use faster M1 runners.

Lock the deployment target to the oldest supported version (11.0,
due to libuv support) instead of relying on the host OS version.
2024-02-17 13:35:47 +01:00