aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* fix(terminal): restore cursor from 'guicursor' on TermLeave (#31620)Gregory Anders2024-12-18
| | | Fixes: https://github.com/neovim/neovim/issues/31612
* refactor(man.lua): various changesLewis Russell2024-12-18
| | | | | | | | | | | | | | | | | | | - Replace all uses of vim.regex with simpler Lua patterns. - Replace all uses of vim.fn.substitute with string.gsub. - Rework error handling so expected errors are passed back via a return. - These get routed up an passed to `vim.notify()` - Any other errors will cause a stack trace. - Reworked the module initialization of `localfile_arg` - Updated all type annotations. - Refactored CLI completion by introduction a parse_cmdline() function. - Simplified `show_toc()` - Refactor highlighting - Inline some functions - Fix completion on MacOS 13 and earlier. - Prefer `manpath -q` over `man -w` - Make completion more efficient by avoiding vim.fn.sort and vim.fn.uniq - Reimplement using a single loop
* fix(lsp): vim.lsp.start fails if existing client has no workspace_folders #31608phanium2024-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: regression since https://github.com/neovim/neovim/pull/31340 `nvim -l repro.lua`: ```lua vim.lsp.start { cmd = { 'lua-language-server' }, name = 'lua_ls' } vim.lsp.start { cmd = { 'lua-language-server' }, name = 'lua_ls', root_dir = 'foo' } -- swapped case will be ok: -- vim.lsp.start { cmd = { 'lua-language-server' }, name = 'lua_ls', root_dir = 'foo' } -- vim.lsp.start { cmd = { 'lua-language-server' }, name = 'lua_ls' } ``` Failure: ``` E5113: Error while calling lua chunk: /…/lua/vim/lsp.lua:214: bad argument #1 to 'ipairs' (table expected, got nil) stack traceback: [C]: in function 'ipairs' /…/lua/vim/lsp.lua:214: in function 'reuse_client' /…/lua/vim/lsp.lua:629: in function 'start' repro.lua:34: in main chunk ```
* feat(lsp): show server version in `:checkhealth` #31611Peter Lithammer2024-12-18
| | | | | | | | Problem: Language server version information missing from `:checkhealth vim.lsp`. Solution: Store `InitializeResult.serverInfo.version` from the `initialize` response and display for each client in `:checkhealth vim.lsp`.
* fix(coverity): error handling CHECKED_RETURN #31618Justin M. Keyes2024-12-18
| | | | | | | | | | | | | | | | | | CID 516406: Error handling issues (CHECKED_RETURN) /src/nvim/api/vimscript.c: 284 in nvim_call_dict_function() 278 Object rv = OBJECT_INIT; 279 280 typval_T rettv; 281 bool mustfree = false; 282 switch (dict.type) { 283 case kObjectTypeString: >>> CID 516406: Error handling issues (CHECKED_RETURN) >>> Calling "eval0" without checking return value (as is done elsewhere 10 out of 12 times). 284 TRY_WRAP(err, { 285 eval0(dict.data.string.data, &rettv, NULL, &EVALARG_EVALUATE); 286 clear_evalarg(&EVALARG_EVALUATE, NULL); 287 }); 288 if (ERROR_SET(err)) { 289 return rv;
* test(old): fix incorrect comment in test_preview.vim (#31619)zeertzjq2024-12-18
|
* vim-patch:a977883: runtime(doc): Fix style in fold.txt (#31617)zeertzjq2024-12-18
| | | | | | | closes: vim/vim#16236 https://github.com/vim/vim/commit/a977883ef336f83102dc0a1edbfc999e6b5c129c Co-authored-by: h-east <h.east.727@gmail.com>
* vim-patch:9.1.0940: Wrong cursor shape with "gq" and 'indentexpr' executes ↵zeertzjq2024-12-18
| | | | | | | | | | | | | :normal (#31616) Problem: Wrong cursor shape with "gq" and 'indentexpr' executes :normal Solution: Update cursor and mouse shape after restoring old_State. (zeertzjq) closes: vim/vim#16241 Solution: Update cursor and mouse shape after restoring old_State. https://github.com/vim/vim/commit/6c3027744e71937b24829135ba072090d7d52bc3
* Merge pull request #31615 from zeertzjq/vim-9.1.0936zeertzjq2024-12-18
|\ | | | | vim-patch:9.1.{0936,0941,0942}: ComplMatchIns highlight
| * vim-patch:9.1.0942: a few typos were foundzeertzjq2024-12-18
| | | | | | | | | | | | | | | | | | Problem: a few typos were found Solution: fix them (zeertzjq) closes: vim/vim#16232 https://github.com/vim/vim/commit/d32bf0a06762f9ad08334d67b4d7f235f87f9063
| * vim-patch:9.1.0941: ComplMatchIns doesn't work after multibyte charszeertzjq2024-12-18
| | | | | | | | | | | | | | | | | | | | Problem: ComplMatchIns doesn't work after multibyte chars (after v9.1.0936) Solution: Use (ptr - line) instead of wlv.col (zeertzjq). closes: vim/vim#16233 https://github.com/vim/vim/commit/f4ccada5c372b2c14cc32490860c6995cd00268c
| * vim-patch:9.1.0936: cannot highlight completed textzeertzjq2024-12-18
|/ | | | | | | | | | | | Problem: cannot highlight completed text Solution: (optionally) highlight auto-completed text using the ComplMatchIns highlight group (glepnir) closes: vim/vim#16173 https://github.com/vim/vim/commit/6a38aff218f5b99a1aed7edaa357df24b9092734 Co-authored-by: glepnir <glephunter@gmail.com>
* feat(terminal)!: cursor shape and blink (#31562)Gregory Anders2024-12-17
| | | | | | | | | | | | | | | | | | | | | When a terminal application running inside the terminal emulator sets the cursor shape or blink status of the cursor, update the cursor in the parent terminal to match. This removes the "virtual cursor" that has been in use by the terminal emulator since the beginning. The original rationale for using the virtual cursor was to avoid having to support additional UI methods to change the cursor color for other (non-TUI) UIs, instead relying on the TermCursor and TermCursorNC highlight groups. The TermCursor highlight group is now used in the default 'guicursor' value, which has a new entry for Terminal mode. However, the TermCursorNC highlight group is no longer supported: since terminal windows now use the real cursor, when the window is not focused there is no cursor displayed in the window at all, so there is nothing to highlight. Users can still use the StatusLineTermNC highlight group to differentiate non-focused terminal windows. BREAKING CHANGE: The TermCursorNC highlight group is no longer supported.
* test: unreliable test "messages &messagesopt wait" #31548Shougo2024-12-17
|
* refactor(api): always use TRY_WRAP #31600luukvbaal2024-12-17
| | | | | | | Problem: Two separate try/end wrappers, that only marginally differ by restoring a few variables. Wrappers that don't restore previous state are dangerous to use in "api-fast" functions. Solution: Remove wrappers that don't restore the previous state. Always use TRY_WRAP.
* vim-patch:9.1.0934: hard to view an existing buffer in the preview window ↵zeertzjq2024-12-17
| | | | | | | | | | | | | | | | | | | | | | (#31605) Problem: hard to view an existing buffer in the preview window Solution: add the :pbuffer command (Yinzuo Jiang) Similar as `:pedit` and `:buffer` command. `:pbuffer` edits buffer [N] from the buffer list in the preview window. `:pbuffer` can also open special buffer, for example terminal buffer. closes: vim/vim#16222 https://github.com/vim/vim/commit/a2a2fe841ed2efdbb1f8055f752a3a4d0988ae9d Cherry-pick Test_popup_and_previewwindow_dump() changes from patch 9.0.0625. Cherry-pick Run_noroom_for_newwindow_test() changes from patches 8.2.0432 and 9.0.0363. Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
* vim-patch:9.1.0938: exclusive selection not respected when re-selecting ↵zeertzjq2024-12-17
| | | | | | | | | | | | | | | block mode (#31603) Problem: exclusive selection not respected when re-selecting block mode (Matt Ellis) Solution: advance selection by another character when using selection=exclusive and visual block mode fixes: vim/vim#16202 closes: vim/vim#16219 https://github.com/vim/vim/commit/bb955894734b287abfadd3a25786a42038d18d61 Co-authored-by: Christian Brabandt <cb@256bit.org>
* Merge pull request #31602 from zeertzjq/vim-0a4e57fzeertzjq2024-12-17
|\ | | | | vim-patch: doc updates
| * vim-patch:3920bb4: runtime(doc): document how to minimize fold computation costszeertzjq2024-12-17
| | | | | | | | | | | | | | | | closes: vim/vim#16224 https://github.com/vim/vim/commit/3920bb4356aa7324a4be1071c87524a2f921d921 Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
| * vim-patch:0a4e57f: runtime(doc): fix a few minor errors from the last doc ↵zeertzjq2024-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | updates 1) move the section at :h inclusive-motion-selection-exclusive a few lines below, so that it doesn't live in between the 2 exceptions. 2) remove the tag :h :!-range. It's not accurate (because it is actually a filter) and this command is already described at :h :range! https://github.com/vim/vim/commit/0a4e57f44abc05033f839b4538efee8120f7d967 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * vim-patch:41d6de2: runtime(doc): update the change.txt help filezeertzjq2024-12-17
|/ | | | | | https://github.com/vim/vim/commit/41d6de2974429f5fc76fbeacc233a1fa66c6f869 Co-authored-by: Antonio Giovanni Colombo <azc100@gmail.com>
* fix(api): generic error messages, not using TRY_WRAP #31596Justin M. Keyes2024-12-16
| | | | | | | | | | | Problem: - API functions using `try_start` directly, do not surface the underlying error message, and instead show generic messages. - Error-handling code is duplicated in the API impl. - Failure modes are not tested. Solution: - Use `TRY_WRAP`. - Add tests.
* build(deps): bump luajit to HEAD - f73e649a9Christian Clason2024-12-16
|
* fix(Man): completion on MacLewis Russell2024-12-16
| | | | | | | | Problem: `man -w` does not work on recent versions of MacOs. Solution: Make it so an empty result is interpreted as an error unless silent=true
* ci(build.yml): disable security restrictiondundargoc2024-12-16
| | | | | | A new security restriction in Ubuntu 24.04 prevents users from using `unshare`, so we need to disable it in order for the test to work properly.
* fix(diagnostic): vim.diagnostic.setqflist() opens loclist on first call #31585Juan Cruz De La Torre2024-12-16
| | | | | | | | | | | | Problem: Regression from de794f2d2409: `vim.diagnostic.setqflist{open=true}` attempts to open the location list instead of the diagnostics quickfix list if it didn't exist before. This is because we are using `qf_id` to decide which to open, but `qf_id=nil` when there is no existing diagnostics quickfix list with a given title ("Diagnostics" by default). Solution: - Revert to using `loclist` to decide which to open. - Add tests.
* Merge pull request #31539 from bfredl/wininfobfredl2024-12-16
|\ | | | | refactor(wininfo): change wininfo from a linked list to an array
| * refactor(wininfo): change wininfo from a linked list to an arraybfredl2024-12-16
| | | | | | | | | | | | | | | | | | | | "wininfo" is going to be my next victim. The main problem with wininfo is that it is "all or nothing", i e either all state about a buffer in a window is considered valid or none of it is. This needs to be fixed to address some long running grievances. For now this is just a warmup: refactor it from a linked list to a vector.
* | fix(api): not using TRY_WRAP, generic error messages #31595Justin M. Keyes2024-12-16
|/ | | | | | | | | | | Problem: - API functions using `try_start` directly instead of `TRY_WRAP`, do not surface the underlying error message, and instead show generic things like "Failed to set buffer". - Error handling code is duplicated in the API impl, instead of delegating to the vim buffer/window handling logic. Solution: - Use `TRY_WRAP`.
* fix(messages): no message kind for :undo messages #31590Tomasz N2024-12-16
| | | | | | Problem: cannot handle `:undo` and `:redo` messages in a special way, e.g. replace one by another. Solution: add `undo` kind.
* fix(api): nvim_win_set_buf(0, 0) fails if 'winfixbuf' is set #31576phanium2024-12-16
| | | | | | | | | | | | ## Problem With 'winfixbuf' enabled, `nvim_win_set_buf` and `nvim_set_current_buf` fail even if targeting the already-current buffer. vim.wo.winfixbuf = true vim.api.nvim_win_set_buf(0, 0) vim.api.nvim_set_current_buf(0) Solution: Check for this condition.
* vim-patch:9.1.0929: filetype: lalrpop files are not recognizedChristian Clason2024-12-16
| | | | | | | | | | | | | | | Problem: filetype: lalrpop files are not recognized Solution: detect '*.lalrpop' files as lalrpop filetype (David Thievon) References: https://github.com/lalrpop/lalrpop closes: vim/vim#16223 https://github.com/vim/vim/commit/5a2e0cf5f11c611c9b01f1bd6e7294edf0dd2bf4 Co-authored-by: David Thievon <pdkfan@gmail.com>
* vim-patch:9.1.0926: filetype: Pixi lock files are not recognizedChristian Clason2024-12-15
| | | | | | | | | | | | | | | Problem: filetype: Pixi lock files are not recognized Solution: detect "pixi.lock" file as yaml filetype (Brandon Maier) Reference: https://pixi.sh/latest/features/lockfile/ closes: vim/vim#16212 https://github.com/vim/vim/commit/7d1bb90dcf711c732a49e0a45e56028a4853a17d Co-authored-by: Brandon Maier <brandon.maier@gmail.com>
* build(deps): bump tree-sitter to v0.24.5Christian Clason2024-12-15
|
* vim-patch:9.1.0927: style issues in insexpand.c (#31581)zeertzjq2024-12-15
| | | | | | | | | | | | | | | Problem: style issues in insexpand.c Solution: add braces, use ternary operator to improve style (glepnir) closes: vim/vim#16210 https://github.com/vim/vim/commit/6e19993991cfbea2e00435cc706a15ba7e766c55 vim-patch:9.1.0922: wrong MIN macro in popupmenu.c vim-patch:9.1.0923: too many strlen() calls in filepath.c vim-patch:9.1.0924: patch 9.1.0923 causes issues Co-authored-by: glepnir <glephunter@gmail.com>
* Merge pull request #31580 from zeertzjq/vim-ed89206zeertzjq2024-12-15
|\ | | | | vim-patch: doc updates
| * vim-patch:fbe9a69: runtime(doc): Add a reference to |++opt| and |+cmd| at ↵zeertzjq2024-12-15
| | | | | | | | | | | | | | | | | | | | `:h :pedit` closes: vim/vim#16217 https://github.com/vim/vim/commit/fbe9a6903a5b66d5b546a5a080726cba50372df5 Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
| * vim-patch:ed89206: runtime(doc): add a note about inclusive motions and ↵zeertzjq2024-12-15
|/ | | | | | | | | | exclusive selection related: vim/vim#16202 https://github.com/vim/vim/commit/ed89206efe404a94e8424ccfe03c978fd93470f1 Co-authored-by: Christian Brabandt <cb@256bit.org>
* feat(ui): sign/statuscolumn can combine highlight attrs #31575luukvbaal2024-12-14
| | | | | | | | Problem: Since e049c6e4c08a, most statusline-like UI elements can combine highlight attrs, except for sign/statuscolumn. Solution: Implement for sign/statuscolumn.
* docs(annotations): added `---@generic` supportColin Kennedy2024-12-13
|
* Revert "fix(Man.lua): trigger completion even without arguments" #31572Justin M. Keyes2024-12-13
| | | This reverts commit 7940ec69136fa992c98aa7b37265fbc2e619232e.
* fix(lsp): reuse client if configs match and no root dirLewis Russell2024-12-13
| | | | | | | | | | | | Problem: An LSP configuration that creates client with no root_dir or workspace_folders can result in vim.lsp.enable attaching to it multiple times. Solution: When checking existing clients, reuse a client if it wasn't initially configured have any workspace_folders. This more closely matches the behaviour we had prior to d9235ef
* fix(man.lua): `:Man <tab>` does not complete #31569Luca Saccarola2024-12-13
| | | closes: #31512
* Merge pull request #31566 from zeertzjq/vim-9.1.0921zeertzjq2024-12-13
|\ | | | | vim-patch:9.1.{0921,0922}
| * vim-patch:9.1.092: vim-patch:9.1.0923: wrong MIN macro in popupmenu.czeertzjq2024-12-13
| | | | | | | | | | | | | | | | | | | | | | Problem: wrong MIN macro in popupmenu.c (after v9.1.0921) (zeertzjq) Solution: change it to MAX() https://github.com/vim/vim/commit/618c4d36ca92a62212a37e787c202229ceff8537 Co-authored-by: Christian Brabandt <cb@256bit.org> Co-authored-by: glepnir <glephunter@gmail.com>
| * vim-patch:9.1.0921: popupmenu logic is a bit convolutedzeertzjq2024-12-13
|/ | | | | | | | | | | | | | | | | | Problem: popupmenu logic is a bit convoluted Solution: slightly refactor logic and use MIN/MAX() macros to simplify (glepnir) Define the MAX/MIN macros. Since we support some older platforms, C compilers may not be as smart. This helps reduce unnecessary if statements and redundant ternary expressions. Pre-calculate some expressions by defining variables. Remove unnecessary parentheses. Adjust certain lines to avoid exceeding 80 columns. closes: vim/vim#16205 https://github.com/vim/vim/commit/c942f84aadffd0c8969ecf81e3e9103722b2714f Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:5c42c77: runtime(netrw): do not pollute search history with symlinksChristian Clason2024-12-13
| | | | | | | | fixes: vim/vim#16206 https://github.com/vim/vim/commit/5c42c7731536418c53273932d7ef76b80b001f38 Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.1.0919: filetype: some assembler files are not recognizedChristian Clason2024-12-13
| | | | | | | | | | | | Problem: filetype: some assembler are files not recognized Solution: detect '*.nasm' files as nasm filetype and '*.masm' as masm filetype (Wu, Zhenyu) closes: vim/vim#16194 https://github.com/vim/vim/commit/d66d68763d0947c292a9fdda4da6fda3650fa563 Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
* fix(float): re-sort layers when grid zindex changed #30259glepnir2024-12-12
| | | | | | Problem: when zindex is changed in vim.schedule the zindex sort in layers not changed. Solution: resort layers when zindex changed.
* fix(diagnostic): broken variable reference #31557Jeremy Fleischman2024-12-12
|