aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* fix(api): make `nvim_parse_cmd` work correctly with both range and countFamiu Haque2022-05-07
| | | | | | | | It seems range and count can be used together in commands. This PR fixes the behavior of `nvim_parse_cmd` for those cases by removing the mutual exclusivity of "range" and "count". It also removes range line number validation for `nvim_parse_cmd` as it's not its job to validate the command.
* Merge pull request #18438 from famiu/feat/api/nvim_parse_cmdbfredl2022-05-06
|\ | | | | fix(api): make `nvim_parse_cmd` propagate errors
| * fix(api): make `nvim_parse_cmd` propagate errorsFamiu Haque2022-05-05
| | | | | | | | | | Makes `nvim_parse_cmd` propagate any errors that occur while parsing to give the user a better idea of what's wrong with the command.
* | fix(lsp): fix rename capability checks and multi client support (#18441)Mathias Fußenegger2022-05-05
| | | | | | | | | | | | | | | | Adds filter and id options to filter the client to use for rename. Similar to the recently added `format` function. rename will use all matching clients one after another and can handle a mix of prepareRename/rename support. Also ensures the right `offset_encoding` is used for the `make_position_params` calls
* | Merge pull request #18431 from famiu/feat/api/nvim_get_autocmds/group_namebfredl2022-05-05
|\ \ | | | | | | feat(api): add `group_name` to `nvim_get_autocmds`
| * | feat(api): add `group_name` to `nvim_get_autocmds`Famiu Haque2022-05-05
| | |
* | | fix(lsp): make sure to always reset active codelens refreshes (#18331)William Boman2022-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes issues where subsequent calls to vim.lsp.codelens.refresh() would have no effect due to the buffer not getting cleared from the active_refresh table. Examples of how such scenarios would occur are: - A textDocument/codeLens result yielded an error. - The 'textDocument/codeLens' handler was overriden in such a way that it no longer called vim.lsp.codelens.on_codelens().
* | | Merge pull request #18314 from tk-shirasaka/global-statusline-on-ext_messagesbfredl2022-05-05
|\ \ \ | |_|/ |/| | fix: display global statusline correctly with ext_messages
| * | fix: display global statusline correctly with ext_messagesshirasaka2022-05-05
| |/
* / refactor(api): make `range` in `nvim_parse_cmd` an arrayFamiu Haque2022-05-05
|/ | | | | | | | Changes the `range` value in `nvim_parse_cmd` into an array to describe range information more concisely. Also makes `range` and `count` be mutually exclusive by making count `-1` when command takes a range instead of a count. Additionally corrects the behavior of `count` for built-in commands by making the default count `0`.
* Merge pull request #18386 from ii14/version_dict_prereleasebfredl2022-05-04
|\ | | | | feat: add "prerelease" to version dict
| * feat: add "prerelease" to version dictii142022-05-03
| |
* | feat(nvim_parse_cmd): add range, count, reg #18383Famiu Haque2022-05-04
| | | | | | | | | | Adds range, count and reg to the return values of nvim_parse_cmd. Also makes line1 and line2 be -1 if the command does not take a range. Also moves nvim_parse_cmd to vimscript.c because it fits better there.
* | Merge pull request #15674 from yatli/ui_event_extmarkbfredl2022-05-03
|\ \ | | | | | | API/UI: ui_event_extmark
| * | feat(api/ui): win_extmarksYatao Li2022-05-03
| |/
* / feat(server): set $NVIM, unset $NVIM_LISTEN_ADDRESS #11009Justin M. Keyes2022-05-03
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PROBLEM ------------------------------------------------------------------------ $NVIM_LISTEN_ADDRESS has conflicting purposes as both a parameter ("the current process should listen on this address") and a descriptor ("the current process is a child of this address"). This contradiction means the presence of NVIM_LISTEN_ADDRESS is ambiguous, so child Nvim always tries to listen on its _parent's_ socket. This is the cause of lots of "Failed to start server" spam in our test/CI logs: WARN 2022-04-30… server_start:154: Failed to start server: address already in use: \\.\pipe\nvim-4480-0 WARN 2022-04-30… server_start:154: Failed to start server: address already in use: \\.\pipe\nvim-2168-0 SOLUTION ------------------------------------------------------------------------ 1. Set $NVIM to the parent v:servername, *only* in child processes. - Now the correct way to detect a "parent" Nvim is to check for $NVIM. 2. Do NOT set $NVIM_LISTEN_ADDRESS in child processes. 3. On startup if $NVIM_LISTEN_ADDRESS exists, unset it immediately after server init. 4. Open a channel to parent automatically, expose it as v:parent. Fixes #3118 Fixes #6764 Fixes #9336 Ref https://github.com/neovim/neovim/pull/8247#issuecomment-380275696 Ref #8696
* test: add more tests for K_SPECIAL escaping in <Cmd> mappingzeertzjq2022-05-03
|
* Merge pull request #18357 from bfredl/ui_stdinbfredl2022-05-02
|\ | | | | feat(ui): allow embedder to emulate "cat data | nvim -" behaviour
| * refactor(ui): simplify stdin handlingbfredl2022-05-02
| |
* | fix(filetype.lua): escape expansion of ~ when used as a patternJames McCoy2022-05-02
|/
* fix(shared): avoid indexing unindexable values in vim.tbl_get() (#18337)William Boman2022-05-01
|
* fix(lsp): handle textDocumentSync.save bool capability (#18332)Mathias Fußenegger2022-04-30
| | | Follow up to https://github.com/neovim/neovim/pull/17814
* Merge pull request #18231 from famiu/feat/api/parse_cmdlinebfredl2022-04-30
|\ | | | | feat(api): `nvim_parse_cmd`
| * feat(api): add `nvim_parse_cmdline`Famiu Haque2022-04-30
| | | | | | | | Adds an API function to parse a command line string and get command information from it.
* | feat(lsp): add async option to vim.lsp.buf.format (#18322)Mathias Fußenegger2022-04-30
|/ | | | | | | | Deprecates the existing `vim.lsp.buf.formatting` function. With this, `vim.lsp.buf.format` will replace all three: - vim.lsp.buf.formatting - vim.lsp.buf.formatting_sync - vim.lsp.buf.formatting_seq_sync
* feat(lsp): add vim.lsp.buf.format (#18193)Michael Lingelbach2022-04-30
|
* chore(lsp): remove capabilities sanitization (#17814)Michael Lingelbach2022-04-30
| | | | | | | | | | | | | | | | * feat(lsp)!: remove capabilities sanitization Users must now access client.server_capabilities which matches the same structure as the protocol. https://microsoft.github.io/language-server-protocol/specification client.resolved_capabilities is no longer used to gate capabilities, and will be removed in a future release. BREAKING CHANGE Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
* feat(lsp): options to filter and auto-apply code actions (#18221)Fredrik Ekre2022-04-30
| | | | | | | | | | | | | | | | | | | Implement two new options to vim.lsp.buf.code_action(): - filter (function): predicate taking an Action as input, and returning a boolean. - apply (boolean): when set to true, and there is just one remaining action (after filtering), the action is applied without user query. These options can, for example, be used to filter out, and automatically apply, the action indicated by the server to be preferred: vim.lsp.buf.code_action({ filter = function(action) return action.isPreferred end, apply = true, }) Fix #17514.
* fix(input): only disable mapped CTRL-C interrupts when getting input (#18310)zeertzjq2022-04-30
|
* test: add test for <Cmd> mapping with character containing K_SPECIAL bytezeertzjq2022-04-30
|
* feat(mappings): do not simplify the rhs of a mappingzeertzjq2022-04-29
|
* feat(mappings): allow special keys and modifiers in <Cmd> mappingzeertzjq2022-04-29
|
* fix(mappings): fix double-free when unmapping simplifiable Lua mappingzeertzjq2022-04-29
|
* feat(mappings): do not replace existing mapping for simplified formzeertzjq2022-04-29
|
* vim-patch:8.2.4837: modifiers not simplified when timed outzeertzjq2022-04-29
| | | | | | | Problem: Modifiers not simplified when timed out or using feedkeys() with 'n" flag. Solution: Adjust how mapped flag and timeout are used. (closes vim/vim#10305) https://github.com/vim/vim/commit/68a573ce2b996602a86b14d9b258ebb8c657604f
* vim-patch:8.2.4504: when there is a partially matching map full map may not workzeertzjq2022-04-29
| | | | | | | | | | Problem: When there is a partially matching map and modifyOtherKeys is active a full map may not work. Solution: Only simplify modifiers when there is no matching mapping. (closes vim/vim#8792) https://github.com/vim/vim/commit/196c3850dbe95247f7aa1b0000a5cae625a99ef2 Omit test as it sends terminal codes. Use a Lua test instead.
* vim-patch:8.1.2346: CTRL-R CTRL-R doesn't work with modifyOtherKeyszeertzjq2022-04-29
| | | | | | | | | Problem: CTRL-R CTRL-R doesn't work with modifyOtherKeys. Solution: Allow key codes when fetching argument for CTRL-R. (closes vim/vim#5266) Also fix CTRL-G in Insert mode. https://github.com/vim/vim/commit/38571a04b4eb2853f46df8884750bcb9a8115db8 Omit test as it sends terminal codes. Use a Lua test instead.
* test: revert test and doc changes from #6724, add a test for #6716zeertzjq2022-04-29
| | | | Multi-char 'pastetoggle' now works without breaking character-find.
* vim-patch:8.2.0916: mapping with partly modifyOtherKeys code does not workzeertzjq2022-04-29
| | | | | | | | | | | | Problem: Mapping with partly modifyOtherKeys code does not work. Solution: If there is no mapping with a separate modifier include the modifier in the key and then try mapping again. (closes vim/vim#6200) https://github.com/vim/vim/commit/975a880a1389e8ce6dea8d66a7c109140b2f94ec Cherry-pick applicable part of put_string_in_typebuf(). Revert related changes from 10a5825. Use KEYLEN_PART_KEY for incomplete modifier sequence. Omit test as it sends terminal codes. Use a Lua test instead.
* vim-patch:8.2.0867: using \{xxx} for encoding a modifier is not nicezeertzjq2022-04-29
| | | | | | | | | Problem: Using \{xxx} for encoding a modifier is not nice. Solution: Use \<*xxx> instead, since it's the same as \<xxx> but producing a different code. https://github.com/vim/vim/commit/fccd93f0917234b962ce07d1df3adf9d7105936f Use this notation in langmap_spec.
* vim-patch:8.2.0855: GUI tests fail because the test doesn't use a modifierzeertzjq2022-04-29
| | | | | | | | Problem: GUI tests fail because the test doesn't use a modifier. Solution: Add "\{xxx}" to be able to encode a modifier. https://github.com/vim/vim/commit/ebe9d34aa07037cff2188a8dd424ee1f59cbb0bf Change macros to enums to use them in unit tests.
* vim-patch:8.2.0839: dropping modifier when putting a character back in typeaheadzeertzjq2022-04-29
| | | | | | | | | Problem: Dropping modifier when putting a character back in typeahead. Solution: Add modifier to ins_char_typebuf(). (closes vim/vim#6158) https://github.com/vim/vim/commit/b42c0d54279b1fdb79652db0c84171e213458809 Vim's test doesn't seem to work properly as the hit-enter prompt seems to be delayed. Add a Lua screen test.
* feat(edit): insert an unsimplified key using CTRL-SHIFT-Vzeertzjq2022-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This marks the following Vim patches as ported: vim-patch:8.1.2333: with modifyOtherKeys CTRL-^ doesn't work Problem: With modifyOtherKeys CTRL-^ doesn't work. Solution: Handle the exception. https://github.com/vim/vim/commit/828ffd596394f714270a01a55fc3f949a8bd9b35 vim-patch:8.1.2350: other text for CTRL-V in Insert mode with modifyOtherKeys Problem: Other text for CTRL-V in Insert mode with modifyOtherKeys. Solution: Convert the Escape sequence back to key as if modifyOtherKeys is not set, and use CTRL-SHIFT-V to get the Escape sequence itself. (closes vim/vim#5254) https://github.com/vim/vim/commit/fc4ea2a72d36de1196a3ce17352e72f8fe90f4bb vim-patch:8.2.2084: CTRL-V U doesn't work to enter a Unicode character Problem: CTRL-V U doesn't work to enter a Unicode character when modifyOtherKeys is effective. (Ken Takata) Solution: Add a flag to get_literal() for the shift key. (closes vim/vim#7413) https://github.com/vim/vim/commit/0684e36a7ee0743f2889698fb8e0e14f7acae423 Omit getcmdkeycmd() change as it depends on Vim patch 8.2.2062, which may introduce a potential breakage.
* test(old): revert changes from ed88ca75034a48916d165e88459c791c450df550zeertzjq2022-04-29
| | | | | Copy test_regex_char_classes.vim from upstream to avoid future encoding problems.
* vim-patch:8.1.2145: cannot map <C-H> when modifyOtherKeys is enabledzeertzjq2022-04-29
| | | | | | | | | | | | | Problem: Cannot map <C-H> when modifyOtherKeys is enabled. Solution: Add the <C-H> mapping twice, both with modifier and as 0x08. Use only the first one when modifyOtherKeys has been detected. https://github.com/vim/vim/commit/459fd785e4a8d044147a3f83a5fca8748528aa84 Add REPTERM_NO_SPECIAL instead of REPTERM_SPECIAL because the meaning of "special" is different between Vim and Nvim. Omit seenModifyOtherKeys as Nvim supports attaching multiple UIs. Omit tests as they send terminal codes. Keep the behavior of API functions.
* fix: has() should preserve v:shell_error #18280Andrey Mishchenko2022-04-26
| | | fixes #18278
* fix(lsp): fix unnecessary buffers being added on empty diagnostics (#18275)ii142022-04-26
| | | | | Some language servers send empty `textDocument/publishDiagnostics` messages after indexing the project with URIs corresponding to unopened buffers. This commit guards against opening buffers corresponding to empty diagnostics.
* test: correct order of arguments to eq() and neq()zeertzjq2022-04-26
|
* feat(tui): query terminal for CSI u support (#18181)Gregory Anders2022-04-25
| | | | | | On startup query the terminal for CSI u support and enable it using the escape sequence from kitty's progressive enhancement protocol [1]. [1]: https://sw.kovidgoyal.net/kitty/keyboard-protocol/
* fix(ci): workaround bug in msgpackparse() on windows caused by api level bumpbfredl2022-04-25
|