aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
* fix(ui): activating all ext capabilities without remote UI #28555luukvbaal2024-04-28
|
* fix(treesitter): enforce lowercase language names (#28546)Christian Clason2024-04-28
| | | | | | | | | | | * fix(treesitter): enforce lowercase language names Problem: On case-insensitive file systems (e.g., macOS), `has_parser` will return `true` for uppercase aliases, which will then try to inject the uppercase language unsuccessfully. Solution: Enforce and assume parser names to be lowercase when resolving language names.
* fix(snippet): do not add extra indent on newlines (#28538)Mathias Fußenegger2024-04-28
| | | | | | | | | | | | | | | | | | | | | | | Reverts parts of https://github.com/neovim/neovim/pull/27674 LSP snippets typically do include tabs or spaces to add extra indentation and don't rely on the client using `autoindent` functionality. For example: public static void main(String[] args) {\n\t${0}\n} Notice the `\t` after `{\n` Adding spaces or tabs independent of that breaks snippets for languages like Haskell where you can have snippets like: ${1:name} :: ${2}\n${1:name} ${3}= ${0:undefined} To generate: name :: name = undefined
* fix(diagnostic): invalid col number compare in next_diagnostic (#28397)Raphael2024-04-27
| | | | | Problem: when line is blank link then there will got an invalid column number in math.min compare. Solution: make sure the min column number is 0 not an illegal number.
* Merge #28522 handle ui_attach side effectsJustin M. Keyes2024-04-27
|\
| * fix(ui): set 'cmdheight' to zero for all open tabpagesLuuk van Baal2024-04-27
| | | | | | | | | | | | Problem: Enabling ext_messages claims to set 'cmdheight' to zero, but only does so for the current tabpage. Solution: Set stored 'cmdheight' value to zero for all tabpages.
| * fix(ui): update ext_ui widgets when attaching non-remote UILuuk van Baal2024-04-26
| | | | | | | | | | | | Problem: Updating internalized UI capabilities is postponed until a remote UI attaches. Solution: Always update active UI widgets in ui_refresh().
* | vim-patch:9.1.0375: tests: 1-second delay after Test_BufEnter_botline() (#28534)zeertzjq2024-04-27
| | | | | | | | | | | | | | | | | | Problem: tests: 1-second delay after Test_BufEnter_botline() (after v9.1.0374) Solution: Wipe the created buffers (zeertzjq). closes: vim/vim#14647 https://github.com/vim/vim/commit/340643e9779a96710a27d0eeef24f2c08b8967c4
* | vim-patch:9.1.0374: wrong botline in BufEnter (#28530)zeertzjq2024-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When :edit an existing buffer, line('w$') may return a wrong result. Solution: Reset w_valid in curwin_init() (Jaehwang Jung) `do_ecmd()` reinitializes the current window (`curwin_init()`) whose `w_valid` field may have `VALID_BOTLINE` set. Resetting `w_botline` without marking it as invalid makes subsequent `validate_botline()` calls a no-op, thus resulting in wrong `line('w$')` value. closes: vim/vim#14642 https://github.com/vim/vim/commit/eb80b8304efb6dfeaa8d01dd41fe281df4894240 Co-authored-by: Jaehwang Jung <tomtomjhj@gmail.com>
* | fix(man.vim): q quits after jump to different tag in MANPAGER modified (#28495)Brian Cao2024-04-26
| |
* | refactor(vim.iter)!: rename xxback() => rxx() #28503Justin M. Keyes2024-04-26
|/ | | | | | | | | | | | | | | | Problem: vim.iter has both `rfind()` and various `*back()` methods, which work in "reverse" or "backwards" order. It's inconsistent to have both kinds of names, and "back" is fairly uncommon (rust) compared to python (rfind, rstrip, rsplit, …). Solution: - Remove `nthback()` and let `nth()` take a negative index. - Because `rnth()` looks pretty obscure, and because it's intuitive for a function named `nth()` to take negative indexes. - Rename `xxback()` methods to `rxx()`. - This informally groups the "list-iterator" functions under a common `r` prefix, which helps discoverability. - Rename `peekback()` to `pop()`, in duality with the existing `peek`.
* fix(completion): improve popup window position (#26739)Raphael2024-04-25
|
* feat(diagnostic): goto functions jump to highest severity (#28490)Gregory Anders2024-04-25
| | | | | When the "severity" option is nil, vim.diagnostic.goto_next() and vim.diagnostic.goto_prev() jump to the next diagnostic with the highest severity.
* fix(vim.ui)!: change open() to return pcall-like values #28502Justin M. Keyes2024-04-25
| | | | | | | | | Problem: `vim.ui.open` unnecessarily invents a different success/failure convention. Its return type was changed in 57adf8c6e01d, so we might as well change it to have a more conventional form. Solution: Change the signature to use the `pcall` convention of `status, result`.
* Merge pull request #28492 from bfredl/hotfixbfredl2024-04-25
|\ | | | | fix(lua): vim.fn.has('nvim-0.10') in fast context, used by vim.deprecate
| * fix(lua): vim.fn.has('nvim-0.10') in fast context, used by vim.deprecatebfredl2024-04-25
| |
* | feat(fs): add vim.fs.root (#28477)Gregory Anders2024-04-24
| | | | | | | | | | | | vim.fs.root() is a function for finding a project root relative to a buffer using one or more "root markers". This is useful for LSP and could be useful for other "projects" designs, as well as for any plugins which work with a "projects" concept.
* | feat(api): allow floats to be opened in non-current tabpage (#28480)Will Hopkins2024-04-25
|/ | | \
* refactor(lsp): merge subtypes and supertypes into typehierarchy (#28467)Mathias Fußenegger2024-04-23
| | | | Both methods had pretty much the same documentation and shared the implementation.
* test: improve test conventionsdundargoc2024-04-23
| | | | | | | | | Specifically, functions that are run in the context of the test runner are put in module `test/testutil.lua` while the functions that are run in the context of the test session are put in `test/functional/testnvim.lua`. Closes https://github.com/neovim/neovim/issues/27004.
* perf(lua): faster vim.deprecate() #28470Evgeni Chasnovski2024-04-23
| | | | | | | | | | | | Problem: `vim.deprecate()` can be relatively significantly slower than the deprecated function in "Nvim" plugin. Solution: Optimize checks for "Nvim" plugin. This also results into not distinguishing "xxx-dev" and "xxx" versions when doing checks, which is essentially covered by the deprecation logic itself. With this rewrite I get the times from #28459: `{ 0.024827, 0.003797, 0.002024, 0.001774, 0.001703 }`. For quicker reference: - On current Nightly it is something like `{ 3.72243, 0.918169, 0.968143, 0.763256, 0.783424 }`. - On 0.9.5: `{ 0.002955, 0.000361, 0.000281, 0.000251, 0.00019 }`.
* fix(diagnostic): vim.diagnostic.get(…,{lnum=…}) on multi-line diagnostic ↵Raphael2024-04-23
| | | | | | | | #28273 Problem: vim.diagnostic.get(…,{lnum=…}) does not match multi-line diagnostics. Solution: add end_lnum support.
* fix(diagnostic): open_float on multi-line diagnostics #28301Raphael2024-04-23
| | | | | Problem: when diagnostic have a range of line, open_float not work. Solution: filter diagnostic by line number range.
* vim-patch:9.1.0366: filetype: ondir files are not recognizedChristian Clason2024-04-23
| | | | | | | | | | | | Problem: filetype: ondir files are not recognized Solution: Detect '.ondirrc' as ondir filetype (Jon Parise) closes: vim/vim#14604 https://github.com/vim/vim/commit/ea999037a41292b3d3e00700a87a82fe5d2c12b2 Co-authored-by: Jon Parise <jon@indelible.org>
* vim-patch:9.1.0364: tests: test_vim9_builtin is a bit slow (#28466)zeertzjq2024-04-23
| | | | | | | | | | | | | | Problem: tests: test_vim9_builtin is a bit slow Solution: source tests from a buffer instead of writing and sourcing a file (Yegappan Lakshmanan) closes: vim/vim#14614 https://github.com/vim/vim/commit/22697b6179e38f3d321b1495ef17f06031a9c8f1 N/A patch: vim-patch:9.1.0299: Vim9: return type not set for a lambda assigned to script var Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* vim-patch:9.1.0365: Crash when typing many keys with D- modifier (#28464)zeertzjq2024-04-23
| | | | | | | | | Problem: Crash when typing many keys with D- modifier (after 9.1.0227). Solution: Don't treat a 0x80 byte inside a special sequence as the start of a special sequence (zeertzjq). closes: vim/vim#14613 https://github.com/vim/vim/commit/6b13e3d4e46393b3a35eed7c27ae020bcbd46a9b
* vim-patch:9.1.0357: Page scrolling should place cursor at window boundaries ↵luukvbaal2024-04-22
| | | | | | | | | | (#28429) Problem: Page scrolling does not always place the cursor at the top or bottom of the window (Mathias Rav) Solution: Place the cursor at the top or bottom of the window. (Luuk van Baal) https://github.com/vim/vim/commit/4b6b0c4024df08dd8ce49dff3c76356ff81190c4
* fix(completion): check that healthcheck name is string (#28458)zeertzjq2024-04-22
|
* Merge pull request #28434 from glepnir/23120bfredl2024-04-22
|\ | | | | fix(float): wrong position when bufpos is out of range
| * fix(float): wrong position when bufpos is setglepnir2024-04-21
| | | | | | | | | | | | Problem: when lnum in bufpos is out of range the position of float is wired. Solution: avoid the height value out of buffer line range.
* | fix(window): don't go to unfocusable float when closing (#28455)zeertzjq2024-04-22
| |
* | refactor(lua): deprecate tbl_flattenJustin M. Keyes2024-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Besides being redundant with vim.iter():flatten(), `tbl_flatten` has these problems: - Has `tbl_` prefix but only accepts lists. - Discards some results! Compare the following: - iter.flatten(): ``` vim.iter({1, { { a = 2 } }, { 3 } }):flatten():totable() ``` - tbl_flatten: ``` vim.tbl_flatten({1, { { a = 2 } }, { 3 } }) ``` Solution: Deprecate tbl_flatten. Note: iter:flatten() currently fails ("flatten() requires a list-like table") on this code from gen_lsp.lua: local anonym = vim.iter({ -- remove nil anonymous_num > 1 and '' or nil, '---@class ' .. anonymous_classname, }):flatten():totable() Should we enhance :flatten() to work for arrays?
* | vim-patch:9.1.0363: tests: test_winfixbuf is a bit slow (#28446)zeertzjq2024-04-22
| | | | | | | | | | | | | | | | | | | | | | Problem: tests: test_winfixbuf is a bit slow Solution: use defer if possible, reset hidden option, use --not-a-term when starting Vim using system() (Yegappan Lakshmanan) closes: vim/vim#14611 https://github.com/vim/vim/commit/4baf908d60e526737090701048a09aa474fde73d Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* | refactor(lua): rename tbl_isarray => isarrayJustin M. Keyes2024-04-21
| | | | | | | | | | | | | | tbl_isarray was not released yet, so it will not go through a deprecation cycle. ref #24572
* | refactor(lua): rename tbl_islist => islistJustin M. Keyes2024-04-21
| | | | | | | | ref #24572
* | Merge pull request #27872 from luukvbaal/cmdheightbfredl2024-04-21
|\ \ | | | | | | fix(ui): don't force 'cmdheight' to zero with ext_messages
| * | fix(ui): don't force 'cmdheight' to zero with ext_messagesLuuk van Baal2024-04-20
| | | | | | | | | | | | Remove remaining code that prevents non-zero 'cmdheight' with ext_messages.
* | | fix(api): do not update grid position in nvim_win_set_cursor (#28235)luukvbaal2024-04-21
| | | | | | | | | | | | Revert commit c971f538ab87b537ae4c97bd44167661c5691a2d. Forcing grid cursor position will need a new API like originally proposed in #27858.
* | | feat(treesitter): handle quantified fold capturesRiley Bruins2024-04-20
| | |
* | | refactor(lua): "module" => "M" #28426Justin M. Keyes2024-04-20
|/ / | | | | | | Most of the codebase uses the `M` convention for Lua module. Update the last remaining cases.
* | feat(lsp): add vim.lsp.buf.subtypes(), vim.lsp.buf.supertypes() (#28388)Yinzuo Jiang2024-04-20
| | | | | | | | Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com> Co-authored-by: Maria José Solano <majosolano99@gmail.com>
* | fix(vim.ui.open): try wslview before explorer.exe #28424Justin M. Keyes2024-04-20
|/ | | | | | | | | Problem: explorer.exe is unreliable on WSL. Solution: Try wslview before explorer.exe. fix #28410
* fix(showcmd): clear the rest properly (#28420)zeertzjq2024-04-20
|
* vim-patch:9.1.0355: filetype: flake.lock files are not recognizedChristian Clason2024-04-19
| | | | | | | | | | | | Problem: filetype: flake.lock files are not recognized Solution: Detect 'flake.lock' as json filetype (Riley Bruins) closes: vim/vim#14589 https://github.com/vim/vim/commit/ce736033ae86e14e8b1a56a3e4843c7ab24e48d2 Co-authored-by: Riley Bruins <ribru17@hotmail.com>
* vim-patch:9.1.0354: runtime(uci): No support for uci file types (#28409)zeertzjq2024-04-19
| | | | | | | | | | | | | Problem: runtime(uci): No support for uci file types (Wu, Zhenyu) Solution: include basic uci ftplugin and syntax plugins (Colin Caine) closes: vim/vim#14575 https://github.com/vim/vim/commit/4b3fab14dbde971f15d8783e9ef125b19fdbc829 Co-authored-by: Colin Caine <complaints@cmcaine.co.uk> Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
* vim-patch:9.1.0351: No test that completing a partial mapping clears ↵zeertzjq2024-04-19
| | | | | | | | | | | 'showcmd' (#28406) Problem: No test that completing a partial mapping clears 'showcmd'. Solution: Complete partial mappings in Test_showcmd_part_map() instead of using :echo. Adjust some comments (zeertzjq). closes: vim/vim#14580 https://github.com/vim/vim/commit/094c4390bdf3473fab122aa02883e63ce4e66cdb
* feat(lua): enable(enable:boolean, filter:table) #28374Justin M. Keyes2024-04-18
| | | | | | | | | | | | | Problem: We need to establish a pattern for `enable()`. Solution: - First `enable()` parameter is always `enable:boolean`. - Update `vim.diagnostic.enable()` - Update `vim.lsp.inlay_hint.enable()`. - It was not released yet, so no deprecation is needed. But to help HEAD users, it will show an informative error. - vim.deprecate(): - Improve message when the "removal version" is a *current or older* version.
* refactor(lsp): merge rpc.domain_socket_connect into rpc.connect (#28398)Mathias Fußenegger2024-04-18
| | | See discussion in https://github.com/neovim/neovim/pull/26850
* test: 'showcmd' with ext_messages and Visual selection (#28393)zeertzjq2024-04-18
| | | Also slightly reorder some code to make comments look less out-of-place.
* vim-patch:9.1.0343: 'showcmd' wrong for partial mapping with multibyte (#28392)zeertzjq2024-04-18
| | | | | | | | | | | | | | | | | | | | | | Problem: 'showcmd' is wrong for partial mapping with multibyte char, and isn't very readable with modifyOtherKeys. Solution: Decode multibyte char and merge modifiers into the char. (zeertzjq) This improves the following situations: - Multibyte chars whose individual bytes are considered unprintable are now shown properly in 'showcmd' area. - Ctrl-W with modifyOtherKeys now shows ^W in 'showcmd' area. The following situation may still need improvement: - If the char is a special key or has modifiers that cannot be merged into it, internal keycodes are shown in 'showcmd' area like before. This applies to keys typed in Normal mode commands as well, and it's hard to decide how to make it more readable due to the limited space taken by 'showcmd', so I'll leave it for later. closes: vim/vim#14572 https://github.com/vim/vim/commit/acdfb8a97995e0f81832207e39564ba795281108