aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* | fix(folds): don't show search or match highlighting on fold (#24084)zeertzjq2023-06-21
| |
* | fix(vim.json)!: remove global options, "null", "array_mt" #24070Justin M. Keyes2023-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: - `vim.json` exposes various global options which: - affect all Nvim Lua plugins (especially the LSP client) - are undocumented and untested - can cause confusing problems such as: https://github.com/codota/tabnine-nvim/commit/cc76ae3abe2f129d44b5a8edee2529e0ee0dcf69 - `vim.json` exposes redundant mechanisms: - `vim.json.null` is redundant with `vim.NIL`. - `array_mt` is redundant because Nvim uses a metatable (`vim.empty_dict()`) for empty dict instead, which `vim.json` is configured to use by default (see `as_empty_dict`). Example: ``` :lua vim.print(vim.json.decode('{"bar":[],"foo":{}}')) --> { bar = {}, foo = vim.empty_dict() } ``` Thus we don't need to also decorate empty arrays with `array_mt`. Solution: Remove the functions from the public vim.json interface. Comment-out the implementation code to minimize drift from upstream. TODO: - Expose the options as arguments to `vim.json.new()`
* | fix(lsp): define LspInlayHint highlight group #24073Chinmay Dalal2023-06-21
| | | | | | | | | | fixes #24068 Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* | Merge pull request #24069 from famiu/refactor/options/varpbfredl2023-06-20
|\ \ | | | | | | refactor(option): use `void *` for pointer to option value
| * | refactor(option): use `void *` for pointer to option valueFamiu Haque2023-06-20
| | | | | | | | | | | | | | | | | | Option related code uses `char *` for pointer to option value, which is not the best way of representing a type-agnostic pointer. Solution: Make pointers to option value use `void *` instead.
* | | fix(docs): the runtimepath is not the runtime pathbfredl2023-06-19
| | |
* | | docs #22363Justin M. Keyes2023-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored by: zeertzjq <zeertzjq@outlook.com> Co-authored by: Steven Todd McIntyre II <114119064+stmii@users.noreply.github.com> Co-authored by: nobe4 <nobe4@users.noreply.github.com> - docs: mention --luadev-mod to run with lua runtime files When changing a lua file in the ./runtime folder, a new contributor might expect changes to be applied to the built Neovim binary.
* | | vim-patch:9.0.1638: crypt tests hang and cause memory errors (#24053)zeertzjq2023-06-18
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: crypt tests hang and cause memory errors Solution: Move variable to start of function. https://github.com/vim/vim/commit/438d0c5e58aa475179ade9a1b99013733c5b8f06 N/A patches for version.c: vim-patch:9.0.1639: build failure without the crypt feature Problem: Build failure without the crypt feature. Solution: Adjust #ifdefs https://github.com/vim/vim/commit/bc385a150f9d812bb3e54ff0d5db75d3c6c3bb43 vim-patch:9.0.1640: compiler warning for unused variables without crypt feature Problem: Compiler warning for unused variables without the crypt feature. Solution: Adjust #ifdefs https://github.com/vim/vim/commit/7f29122c8ce2ca224d21abbaeb35e38bc354d95d Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | vim-patch:9.0.1637: compiler warning for uninitialized variable (#24042)zeertzjq2023-06-17
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Compiler warning for uninitialized variable. Solution: Move the variable to an inner block and initialize it. (Christian Brabandt, closes vim/vim#12549) https://github.com/vim/vim/commit/54f50cbf6a470316a262e4389d62424e6f06b81c The "eof" variable is not present in Nvim because it is only used by FEAT_CRYPT. Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.0.1635: error message is cleared when removing mode messagezeertzjq2023-06-16
| | | | | | | | | | | | | | | | | | Problem: Error message is cleared when removing mode message. Solution: Also reset flags when the message is further down. https://github.com/vim/vim/commit/da51ad51bf4fbd66619786d0e6a83fb3ca09930b Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | vim-patch:9.0.1634: message is cleared when removing mode messagezeertzjq2023-06-16
| | | | | | | | | | | | | | | | | | Problem: Message is cleared when removing mode message (Gary Johnson). Solution: Do not clear the command line after displaying a message. https://github.com/vim/vim/commit/800cdbb7caeb5dd4379c6cb071bb12391f20bcf3 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | vim-patch:9.0.1636: expanding a pattern interferes with cmdline completion ↵zeertzjq2023-06-16
| | | | | | | | | | | | | | | | (#24034) Problem: Expanding a pattern interferes with command line completion. Solution: Set the file index only when appropriate. (closes vim/vim#12519) https://github.com/vim/vim/commit/094dd152fe1d47878ec6c0b3f54b03ffde7f4a2d
* | fix(:let): fix error when applying operator to boolean option (#24030)zeertzjq2023-06-15
| |
* | fix(extmarks): don't position overlay virt_text halfway a char (#24027)zeertzjq2023-06-15
| |
* | vim-patch:9.0.1631: passing wrong variable type to option gives multiple ↵zeertzjq2023-06-15
| | | | | | | | | | | | | | | | errors (#24026) Problem: Passing a wrong variable type to an option gives multiple errors. Solution: Bail out early on failure. (closes vim/vim#12504) https://github.com/vim/vim/commit/4c7cb372c17a84c8a35254d93eb37cb854cd39da
* | vim-patch:9.0.1629: having utf16idx() rounding up is inconvenient (#24019)zeertzjq2023-06-14
| | | | | | | | | | | | | | | | Problem: Having utf16idx() rounding up is inconvenient. Solution: Make utf16idx() round down. (Yegappan Lakshmanan, closes vim/vim#12523) https://github.com/vim/vim/commit/95707037afa1aeae4f3494dc623a721ceed7fc4e Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* | fix(tui): v:argv does not report the original argv[0] #24015t0muxx2023-06-14
| | | | | | | | | | | | | | | | | | | | Problem: Since TUI was moved to another process 24488169564c39a506c235bf6a33b8e23a8cb528 v:argv and v:progname don't report the original argv[0]. ["/usr/bin/nvim", "--embed", ...] Solution: Use argv[0] instead of VV_PROGPATH in ui_client_start_server(). Fix #23953
* | fix(api): redundant error when using `nvim_cmd` (#24010)Famiu Haque2023-06-13
| | | | | | | | | | `nvim_cmd` shows multiple errors when attempting to edit another buffer through a command when `curbuf->b_ro_locked` is set. This PR fixes that by removing a redundant error in `execute_cmd`.
* | fix(extmarks): handle inline virt_text with empty chunk (#24005)zeertzjq2023-06-13
| |
* | vim-patch:8.2.4600: Vim9: not enough test coverage for executing :def ↵zeertzjq2023-06-12
| | | | | | | | | | | | | | | | | | | | | | | | function (#24001) Problem: Vim9: not enough test coverage for executing :def function. Solution: Add a few more tests. Fix inconsistencies. https://github.com/vim/vim/commit/6b8c7ba062ca4b50e8f983e0485be7afa4eef691 Cherry-pick a blank line in test_listdict.vim from patch 8.2.3842. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | vim-patch:8.2.3332: Vim9: cannot assign to range in listzeertzjq2023-06-12
| | | | | | | | | | | | | | | | | | Problem: Vim9: cannot assign to range in list. Solution: Implement overwriting a list range. https://github.com/vim/vim/commit/4f0884d6e24d1d45ec83fd86b372b403177d3298 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | docs: various clarifications (#23999)zeertzjq2023-06-12
| | | | | | | | | | Close #18907 Close #20314 Close #23749
* | vim-patch:8.2.3852: Vim9: not enough testszeertzjq2023-06-12
| | | | | | | | | | | | | | | | | | | | Problem: Vim9: not enough tests. Solution: Also run existing tests for Vim9 script. Make errors more consistent. https://github.com/vim/vim/commit/f47c5a8e2d8eda7c2c8a9cccf9568eb56c03a0cf Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | vim-patch:partial:8.2.3335: Vim9: not enough tests run with Vim9zeertzjq2023-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Vim9: not enough tests run with Vim9. Solution: Run a few more tests in Vim9 script and :def function. Fix that items(), keys() and values9) return zero for a NULL dict. Make join() return an empty string for a NULL list. Make sort() return an empty list for a NULL list. https://github.com/vim/vim/commit/ef98257593a0abf1300d0f70358dc45a70a62580 Skip f_reverse() change for consistency with other functions. Skip Test_null_list() and Test_null_dict() because of missing patches. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | vim-patch:8.2.2533: Vim9: cannot use a range with :unletzeertzjq2023-06-12
| | | | | | | | | | | | | | | | | | Problem: Vim9: cannot use a range with :unlet. Solution: Implement ISN_UNLETRANGE. https://github.com/vim/vim/commit/5b5ae29bd3d7b832b6f15320430f7f191e0abd1f Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | vim-patch:8.2.2948: substitute() accepts a number but not a float expressionSean Dewar2023-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Substitute() accepts a number but not a float expression. Solution: Also accept a float. (closes vim/vim#8331) https://github.com/vim/vim/commit/7a2217bedd223df4c8bbebe731bf0b5fe8532533 Vim9script is N/A. No need to port the strict argument and tv_get_string_buf_chk_strict(), as it's only used for Vim9script. Like the patch, use vim_snprintf over snprintf, as the "%g" specifier in snprintf removes the ".0" from integer floats. This means similiar to numbers, floats are (mostly) convertable to strings. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | feat: report "build" in vim.version() #23925treatybreaker2023-06-11
| | | | | | | | | | | | | | | | | | | | Problem: Nvim version string typically has a "build" component but vim.version() doesn't report it. Solution: Add the "build" field to vim.version(). Closes #23863
* | fix(remote): restore previous --remote-expr output formatting (#23988)zeertzjq2023-06-11
| | | | | | | | - Use tostring() as that's what print() uses internally. - Do not append trailing new line.
* | fix(remote): make --remote-expr print to stdout (#23980)zeertzjq2023-06-11
| |
* | fix(helptags): make multibyte help tags work properly (#23975)zeertzjq2023-06-11
| |
* | vim-patch:9.0.1626: Visual area not shown when using 'showbreak' (#23978)zeertzjq2023-06-11
| | | | | | | | | | | | | | | | | | | | Problem: Visual area not shown when using 'showbreak' and start of line is not visible. (Jaehwang Jung) Solution: Adjust "fromcol" for the space taken by 'showbreak'. (closes vim/vim#12514) https://github.com/vim/vim/commit/f578ca2c8f36b61ac3301fe8b59a8473c964cdc2 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | test: more tests for nvim_{set,del}_keymap with abbreviation (#23970)zeertzjq2023-06-10
| |
* | feat(api): support abbreviations in nvim_set_keymapbfredl2023-06-09
| | | | | | | | closes #19198
* | vim-patch:9.0.1621: FILETYPE_FILE is defined to the same value multiple ↵zeertzjq2023-06-09
| | | | | | | | | | | | | | | | | | | | | | times (#23965) Problem: FILETYPE_FILE is defined to the same value multiple times. Same for a few similar macros. Solution: Define FILETYPE_FILE and others in feature.h only https://github.com/vim/vim/commit/c81dfaa69ceec9f6b88caf1dcdf2f859d4fcae47 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | vim-patch:9.0.1617: charidx() result is not consistent with byteidx() (#23963)zeertzjq2023-06-09
| | | | | | | | | | | | | | | | | | | | Problem: charidx() and utf16idx() result is not consistent with byteidx(). Solution: When the index is equal to the length of the text return the lenght of the text instead of -1. (Yegappan Lakshmanan, closes vim/vim#12503) https://github.com/vim/vim/commit/577922b917e48285a7a312daf7b5bbc6e272939c Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* | feat(lsp)!: add vim.lsp.status, client.progress and promote ↵Mathias Fußenegger2023-06-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LspProgressUpdate (#23958) `client.messages` could grow unbounded because the default handler only added new messages, never removing them. A user either had to consume the messages by calling `vim.lsp.util.get_progress_messages` or by manually removing them from `client.messages.progress`. If they didn't do that, using LSP effectively leaked memory. To fix this, this deprecates the `messages` property and instead adds a `progress` ring buffer that only keeps at most 50 messages. In addition it deprecates `vim.lsp.util.get_progress_messages` in favour of a new `vim.lsp.status()` and also promotes the `LspProgressUpdate` user autocmd to a regular autocmd to allow users to pattern match on the progress kind. Also closes https://github.com/neovim/neovim/pull/20327
* | vim-patch:9.0.1616: quickfix text field is truncated (#23951)zeertzjq2023-06-08
| | | | | | | | | | | | | | | | | | Problem: Quickfix text field is truncated. Solution: Fix output of text field after pattern field in quickfix buffer. (Shane Harper, closes vim/vim#12498) https://github.com/vim/vim/commit/5bf042810b19a627eda2f170624a0cfd7b4f6ed6 Co-authored-by: Shane Harper <shane@shaneharper.net>
* | feat(diff): grouping optimization for linematch algorithmJonathon2023-06-07
| |
* | refactor(options): use slash separator for `option_get_valid_types()` (#23945)Famiu Haque2023-06-07
| | | | | | | | | | | | `option_get_valid_types()` currently uses a comma separator for multi-type options which does not fit well with the changed error message for invalid option value type. A slash seperator is much more suited for its current use-case.
* | fix(events): don't expand non-file as file namezeertzjq2023-06-07
| |
* | revert: "refactor: eliminate `autocmd_fname_full` global"zeertzjq2023-06-07
| | | | | | | | This reverts commit 82cd0be2eaf71c0476e15c66ba3e83c76896d407.
* | refactor(api): adjust errors for setting options (#23942)zeertzjq2023-06-07
| |
* | refactor(options): remove `getoption_T` and introduce `OptVal` (#23850)Famiu Haque2023-06-07
| | | | | | | | | | | | | | | | Removes the `getoption_T` struct and also introduces the `OptVal` struct to unify the methods of getting/setting different option value types. This is the first of many PRs to reduce code duplication in the Vim option code as well as to make options easier to maintain. It also increases the flexibility and extensibility of options. Which opens the door for things like Array and Dictionary options.
* | build!: remove neovim qtdundargoc2023-06-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Neovim QT was originally bundled on Windows as a response to the then lackluster terminal options. The situation has dramatically changed, with viable options such as Windows terminal, Alacritty and Wezterm to name a few. The Windows build no longer needs this special treatment for neovim to be usable. Pros: - Release builds will be smaller. - Less maintenance burden. - Clearer separation of responsibility (neovim issues go to the neovim repo and neovim-qt issues to the neovim-qt repo). - More consistent treatment between platforms. Cons: - Users who've come to expect neovim-qt to be bundled with nvim will need to adjust and download neovim-qt from https://github.com/equalsraf/neovim-qt instead. - Similarly, build scripts will need to be adjusted to reflect this change. Closes https://github.com/neovim/neovim/issues/21209.
* | refactor(defaults): do not use C specific default values for options (#22500)Gregory Anders2023-06-06
| | | | | | | | | | | | | | | | | | | | The options 'path', 'include', and 'define' all use C-specific default values. This may have made sense a long time ago when Vim was mostly used just for writing C, but this is no longer the case, and we have ample support for filetype specific configuration. Make the default values of these options empty and move the C-specific values into a filetype plugin where they belong. Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* | vim-patch:9.0.1614: strlen() called too often for :spellrepall (#23940)zeertzjq2023-06-06
| | | | | | | | | | | | Problem: strlen() called too often for :spellrepall. Solution: Store the result in a variable. (closes vim/vim#12497) https://github.com/vim/vim/commit/59f7038536a370d771758dc34036cc1424be7421
* | refactor(api): remove `BOOL` macro #23936Famiu Haque2023-06-06
| | | | | | Remove redundant `BOOL` macro that does the same thing as `BOOLEAN_OBJ`.
* | refactor: adjust headers according to the style guide (#23934)dundargoc2023-06-06
| | | | | | System headers should be included first to prevent naming conflicts.
* | fix(statusline): redraw when VIsual_mode changes (#23933)zeertzjq2023-06-06
|/
* vim-patch:partial:8.2.4950: text properties position wrong after shifting ↵zeertzjq2023-06-06
| | | | | | | | | | | text (#23930) Problem: Text properties position wrong after shifting text. Solution: Adjust the text properties when shifting a block of text. (closes vim/vim#10418) https://github.com/vim/vim/commit/4b93674159d60c985de906c30f45dbaf2b64056f Co-authored-by: LemonBoy <thatlemon@gmail.com>