Commit Graph

31846 Commits

Author SHA1 Message Date
Christian Clason
0a0f53663b vim-patch:3f60114: runtime(keymap): Add ukrainian-enhanced keymap
The "Ukrainian enhanced keymap" allows you to type Ukrainian in Vim
using jcuken Windows layout.

Original file is made by Ivan Korneliuk and can be found at
https://github.com/vansha/ukrainian-enhanced.vim. It is being added here
with the permission of the author.

There is another ukrainian layout already in Vim, namely the
keymap\ukrainian-jcuken.vim script by Anatoli Sakhnik. But this one
differs in way it maps numeric keys. It uses values usual for Windows
users.

closes: vim/vim#16628

3f60114236

Co-authored-by: Vladyslav Rehan <rehanvladyslav@gmail.com>
2025-02-15 11:20:50 +01:00
zeertzjq
10a3a85473 vim-patch:faf4112: runtime(doc): document ComplMatchIns highlight for insert-completion (#32448)
closes: vim/vim#16636

faf4112cdc

Co-authored-by: glepnir <glephunter@gmail.com>
2025-02-14 23:42:16 +00:00
zeertzjq
1cdeb037c1 vim-patch:9.1.1112: Inconsistencies in get_next_or_prev_match() (#32447)
Problem:  Inconsistencies in get_next_or_prev_match() (after 9.1.1109).
Solution: Change "file" to "entry" or "match" in comments.  Use the same
          order of branches for PAGEUP and PAGEDOWN (zeertzjq).

closes: vim/vim#16633

b6c900be9c
2025-02-14 23:24:26 +00:00
Mathias Fussenegger
f20335a54c feat(lsp): add support for completionItem.command resolving
`command` was already resolved via a `completionItem/resolve` request
but only if `additionalTextEdits` were also present, and the
`resolveSupport` capability wasn't listed.

Closes https://github.com/neovim/neovim/issues/32406
2025-02-14 19:49:08 +01:00
dundargoc
c091bc3b9a ci(release): change to ubuntu-22.04
Ubuntu 20.04 is deprecated.
2025-02-14 14:54:18 +01:00
glepnir
cff5fa49fc fix(float): "Not enough room" error for 1-line float #25192
Problem: set winbar on a floating window which only have one row will
cause crash.

Solution: when new floating window only have one room don't copy winbar
from target window"

Fix #19464
2025-02-14 05:28:51 -08:00
zeertzjq
dc33879dc2 Merge pull request #32442 from zeertzjq/vim-407319f
vim-patch: runtime file updates
2025-02-14 20:48:39 +08:00
dundargoc
ca5fca2912 build(windows)!: drop cat and tee executables from windows
The legitimacy of the binaries can't be guaranteed and poses a security
risk. A replacement version of these may be introduced in the future in
a more secure manner.

Closes https://github.com/neovim/neovim/issues/32431.
2025-02-14 13:10:11 +01:00
zeertzjq
565152a2ac vim-patch:d7deeff: runtime(exports): include simple filetype plugin
closes: vim/vim#16625

d7deeffe11

Co-authored-by: Matt Perry <matt@mattperry.com>
2025-02-14 19:54:14 +08:00
zeertzjq
92f0933abb vim-patch:407319f: runtime(samba): include simple filetype plugin
closes: vim/vim#16626

407319fe89

Co-authored-by: Matt Perry <matt@mattperry.com>
2025-02-14 19:53:54 +08:00
zeertzjq
f247402010 vim-patch:9.1.1107: cannot loop through completion menu with fuzzy (#32438)
Problem:  cannot loop through completion menu with fuzzy and nosort in
          'completeopt'
          (Tomasz N)
Solution: Reset cur to zero and update compl_shown_match when
          'completeopt' contains "nosort" but not "noselect"
          (glepnir)

fixes: vim/vim#16624
closes: vim/vim#16629

c0b7ca406b

Co-authored-by: glepnir <glephunter@gmail.com>
2025-02-14 09:09:01 +08:00
zeertzjq
478c71f03c vim-patch:9.1.1109: cmdexpand.c hard to read (#32437)
Problem:  cmdexpand.c hard to read
Solution: refactor the file slightly (glepnir)

closes: vim/vim#16621

977561a719

Co-authored-by: glepnir <glephunter@gmail.com>
2025-02-14 08:26:52 +08:00
zeertzjq
6b387bde69 vim-patch:4f010c9: runtime(vim): Update base-syntax, always match continuation comments to EOL (#32435)
closes: vim/vim#16630

4f010c90bd

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-02-14 07:49:57 +08:00
zeertzjq
9f85dace94 vim-patch:9.1.1108: 'smoothscroll' gets stuck with 'listchars' "eol" (#32434)
Problem:  'smoothscroll' gets stuck with 'listchars' "eol".
Solution: Count size of 'listchars' "eol" in line size when scrolling.
          (zeertzjq)

related: neovim/neovim#32405
closes: vim/vim#16627

2c47ab8fcd
2025-02-13 23:21:45 +00:00
Till Bungert
93480f7fba feat(term): trigger TermRequest for APC (#32407)
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2025-02-13 08:24:01 -06:00
Maria José Solano
e4c6e732fd feat(lsp): add select kind in showMessageRequest #32387 2025-02-13 05:48:56 -08:00
Justin M. Keyes
375847fb33 Merge #32426 fix(lsp): reset active request when reporting an error 2025-02-13 05:19:33 -08:00
glepnir
c374f26430 fix(lsp): clear word when expand multi-lines word (#32393)
Problem: When expanding a completion item that contains a multi-line word, the word is not deleted correctly.

Solution: If the word contains a line break, delete the text from Context.cursor to the current cursor position.
2025-02-13 11:24:38 +01:00
Robert Muir
b42dc232c5 fix(lsp): autotrigger should only trigger on client's triggerCharacters (#32266)
Problem: autotrigger option of vim.lsp.completion.enable() would trigger
all clients, as long as it matched at least one client's
triggerCharacters.

Solution: trigger only the clients with triggerCharacters matching the
character. overtriggering still happens if any client returns
isIncomplete=true (this case is more involved).


Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
2025-02-13 11:08:11 +01:00
Christian Clason
0c3d2c9560 vim-patch:8f3277f: runtime(nroff): set define option & add matchit config in ftplugin
closes: vim/vim#16619

8f3277fbbe

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2025-02-13 10:03:28 +01:00
Yi Ming
2df68d3696 refactor(lsp): handling errors and nil responses together 2025-02-13 12:01:16 +08:00
Yi Ming
d76f7fef13 fix(lsp): reset active request when reporting an error 2025-02-13 11:59:18 +08:00
Yi Ming
4fd2694f20 fix(lsp): missing method parameter when canceling requests 2025-02-13 10:19:34 +08:00
zeertzjq
66b60fe62b Merge pull request #32425 from zeertzjq/vim-4a530a6
vim-patch: update Vim syntax
2025-02-13 09:42:35 +08:00
zeertzjq
212fce1636 vim-patch:a9c0642: runtime(vim): Update base-syntax, match Vim9 boolean and null literals in parens
- Match Vim9 boolean and null literals in parenthesised expressions and
  function argument lists.
- Match read-only registers in expressions.

closes: vim/vim#16622

a9c06429ac

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-02-13 09:05:31 +08:00
zeertzjq
3b4ef34fc3 vim-patch:1aa287e: runtime(vim): Update base-syntax, improve variable matching
- Match variables after operators, including line continuations.
- Match option variables without leading whitespace.
- Explicitly match expression subscripts.
- Match Vim9 variables in LHS of assignments and method calls.
- Match option variables (&option) with a dedicated syntax group like
  environment variables.
- Match list literals, fixes: vim/vim#5830
- Match :{un}lockvar arguments.
- Match registers and environment variables in :let unpack lists.
- Match lambda expressions
- Match Vim9 scope blocks
- Match variables in :for subject
- Highlight user variables with Normal
- Improve this/super keyword matching, fixes: vim/vim#15970

closes: vim/vim#16476

1aa287e048

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-02-13 09:03:42 +08:00
zeertzjq
c58566a5ab vim-patch:4a530a6: runtime(vim): Update base-syntax, match :debuggreedy count prefix
Match :0debuggreedy as a special case until better range/count support
is implemented.

closes: vim/vim#16572

4a530a632b

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-02-13 09:02:03 +08:00
Christian Clason
8117db48ed ci(cirrus): update to freebsd-14-2
Previous `freebsd-14-0` image was dropped
2025-02-12 17:43:42 +01:00
luukvbaal
15bc930fca fix(memline): don't check line count for closed memline #32403
Problem:  Error thrown when for invalid line number which may be accessed
          in an `on_detach` callback at which point line count is
          intentionally set to 0.
Solution: Move empty memline check to before line number check.
2025-02-12 08:20:51 -08:00
Yi Ming
be8d87014c fix(lsp): on detach, cancel pending foldingRange requests #31509
Problem:
1. Open a relatively large file (so the server needs some time to
   process the request).
2. Then immediately execute `:bdelete`.
3. Once the request is completed, the handler will obtain the bufstate
   of a buffer already unloaded.

    Error executing vim.schedule lua callback: ...7841_1/share/nvim/runtime/lua/vim/lsp/_folding_range.lua:119: assertion failed!
    stack traceback:
            [C]: in function 'assert'
            ...7841_1/share/nvim/runtime/lua/vim/lsp/_folding_range.lua:119: in function 'multi_handler'
            ...7841_1/share/nvim/runtime/lua/vim/lsp/_folding_range.lua:140: in function 'handler'
            ...HEAD-c137841_1/share/nvim/runtime/lua/vim/lsp/client.lua:669: in function ''
            vim/_editor.lua: in function <vim/_editor.lua:0>

Solution:
On detach, cancel all pending textDocument_foldingRange requests.
2025-02-12 06:22:59 -08:00
luukvbaal
2c629ad13f feat(column): apply appropriate numhl highlight to virt_lines (#32400)
Problem:  Number and statuscolumn highlighting for virtual lines does
          not take always take on numhl highlights.
Solution: Apply the appropriate numhl highlight to the number/statuscolumn
          of virtual lines, fetching the numhl highlight of the line above
          for `virt_line_above == false` lines.
2025-02-12 11:01:43 +01:00
luukvbaal
82a215cb2d feat(options): add 'eventignorewin' (#32152)
vim-patch:partial:9.1.1084: Unable to persistently ignore events in a window and its buffers

Problem:  Unable to persistently ignore events in a window and its buffers.
Solution: Add 'eventignorewin' option to ignore events in a window and buffer
          (Luuk van Baal)

Add the window-local 'eventignorewin' option that is analogous to
'eventignore', but applies to a certain window and its buffers. Identify
events that should be allowed in 'eventignorewin', adapt "auto_event"
and "event_tab" to encode this information. Window context is not passed
onto apply_autocmds_group(), and when to ignore an event is a bit
ambiguous when "buf" is not "curbuf", rather than a large refactor, only
ignore an event when all windows into "buf" are ignoring the event.

b7147f8236

vim-patch:9.1.1102: tests: Test_WinScrolled_Resized_eiw() uses wrong filename

Problem:  tests: Test_WinScrolled_Resized_eiw() uses wrong filename
          (Luuk van Baal, after v9.1.1084)
Solution: Rename the filename to something more unique

bfc7719e48
2025-02-12 11:01:06 +01:00
zeertzjq
6982106f8c refactor(insexpand.c): remove duplicate assignment (#32410) 2025-02-12 10:31:41 +08:00
zeertzjq
00d75a24cf vim-patch:9.1.1104: CI: using Ubuntu 22.04 Github runners (#32409)
Problem:  CI: uses Ubuntu 22.04 runners
Solution: Switch to Ubuntu 24.04 runners, make a few adjustments for
          different $TMPDIR (Drew Vogel)

closes: vim/vim#16442

f0ed0e6f63

Co-authored-by: Drew Vogel <dvogel@github>
2025-02-12 07:49:08 +08:00
Justin M. Keyes
ac768996b2 refactor(tests): drop os_kill #32401
Also change job tests to use `nvim` instead of random programs like `ping`.
2025-02-11 07:19:46 -08:00
Justin M. Keyes
891d2f4029 Merge #30860 LSP: symbols_to_items() 2025-02-11 03:38:07 -08:00
Yi Ming
e8b5dd1e89 feat(lsp)!: symbol_to_item requires offset_encoding 2025-02-11 18:48:56 +08:00
Riley Bruins
3abfaafad2 fix(treesitter): detect trees with outdated regions in is_valid() 2025-02-11 09:17:08 +00:00
Yi Ming
6722149776 feat(lsp): include end_col and end_lnum in vim.lsp.buf.symbols_to_items 2025-02-11 17:09:39 +08:00
zeertzjq
f8cbdbb4a8 Merge pull request #32398 from zeertzjq/vim-9.1.1098
vim-patch:9.1.{1098,1101}
2025-02-11 10:06:45 +08:00
zeertzjq
7f3157f3f6 vim-patch:9.1.1101: insexpand.c hard to read
Problem:  insexpand.c hard to read
Solution: refactor slightly to make it better readable
          (glepnir)

Problem:
- Complex while loops with nested conditions
- Redundant if branches
- Hard to understand and maintain

Solution:
- Restructure using while(true) with clear break conditions
- Using ternary to replace some if conditions
- Add descriptive comments for each step

closes: vim/vim#16600

40891bac5d

Co-authored-by: glepnir <glephunter@gmail.com>
2025-02-11 09:33:42 +08:00
zeertzjq
b7020e263e vim-patch:9.1.1098: leaking memory with completing multi lines
Problem:  leaking memory with completing multi lines
          (after v9.1.1086)
Solution: free allocated memory (glepnir)

closes: vim/vim#16605

e3647c8bf5

Co-authored-by: glepnir <glephunter@gmail.com>
2025-02-11 09:33:41 +08:00
zeertzjq
5d2b6f4fa0 vim-patch:9.1.1095: tests: matchparen plugin test wrongly named (#32397)
Problem:  tests: matchparen plugin test wrongly named
          (zeertzjq)
Solution: rename test_matchparen to test_plugin_matchparen
          to be consistent with the other plugin tests

related: vim/vim#16599

7de6b1bb56

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-02-11 09:07:47 +08:00
Justin M. Keyes
c7d13f2895 Merge #32385 UI :detach command 2025-02-10 10:21:47 -08:00
Justin M. Keyes
a1906c23dd fix(ui): Windows :detach is opt-in
Problem:
On Windows, spawning the `nvim --embed` server with `detach=true` breaks
various `tt.setup_child_nvim` tests.

Solution:
Make this behavior opt-in with an env var, temporarily.
2025-02-10 18:56:11 +01:00
Justin M. Keyes
69abeaad1d test: use --clean 2025-02-10 18:56:11 +01:00
Justin M. Keyes
4b0e2605ea feat(ui): UI :detach command
Problem:
Cannot detach the current UI.

Solution:
- Introduce `:detach`.
- Introduce `Channel.detach`.

Co-authored-by: bfredl <bjorn.linse@gmail.com>
2025-02-10 18:56:11 +01:00
Cai Rijun (Richard)
ad60b3fb48 fix(api): memory leaks in vim.api.nvim_*get_option #32390
Problem: `get_option_value` returns caller owned `Object`s but the
corresponding C apis do not marked `FUNC_API_RET_ALLOC` properly.

Solution: add `FUNC_API_RET_ALLOC` to the C apis.
2025-02-10 09:37:36 -08:00
fredizzimo
524cdd35c2 test(fix): make testing of ext_cmdline optional #32375 2025-02-10 05:51:04 -08:00
Siddhant Agarwal
06d8dd89fd refactor(defaults): cleanup enable_ctx_menu #32391
The ctx parameter is not needed since various refactors.
2025-02-10 05:18:01 -08:00