aboutsummaryrefslogtreecommitdiff
path: root/runtime
Commit message (Collapse)AuthorAge
* vim-patch:partial:b59ae59a5870 (#21170)Sean Dewar2022-11-24
| | | | | | | | | | | | | Update runtime files https://github.com/vim/vim/commit/b59ae59a58706e454ef8c78276f021b1f58466e7 - Omit `map()` lambda arg comment. Not worth mentioning for legacy script (and is already hinted at below). - Cherry-pick latest `'thesaurusfunc'` example. - Skip `optwin.vim` `'keyprotocol'` change. - 🧜‍♀️ Co-authored-by: Bram Moolenaar <Bram@vim.org>
* docs(news): add diagnostic suffix (#21141)beardedsakimonkey2022-11-23
|
* docs(lua): add clarifications for fs.find() and fs.normalize() (#21132)AzerAfram2022-11-24
| | | | Co-Authored-By: Gregory Anders <8965202+gpanders@users.noreply.github.com> Co-Authored-By: zeertzjq <zeertzjq@outlook.com>
* vim-patch:partial:9.0.0917: the WinScrolled autocommand event is not enough ↵zeertzjq2022-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#21161) Problem: The WinScrolled autocommand event is not enough. Solution: Add WinResized and provide information about what changed. (closes vim/vim#11576) https://github.com/vim/vim/commit/35fc61cb5b5eba8bbb9d8f0700332fbab38f40ca Omit "func_name" comment in tv_dict_extend(): Vim9 script only. Skip layout locking and E1312. Skip list_alloc_with_items() and list_set_item(). Since this overrides remaining changes in patch 9.0.0913, that patch can now be marked as fully ported: vim-patch:9.0.0913: only change in current window triggers the WinScrolled event N/A patches for version.c: vim-patch:9.0.0919: build failure with tiny features Problem: Build failure with tiny features. Solution: Adjust #ifdef's. https://github.com/vim/vim/commit/9c5b7cb4cf67c64648a324e9dfd1e17d793335a4 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0922: Mermaid files are not recognized (#21160)Christian Clason2022-11-22
| | | | | | | | | Problem: Mermaid files are not recognized. Solution: Add patterns for Mermaid. (Crag MacEachern) https://github.com/vim/vim/commit/364438d1e817d1d76003695f9ab533df35f8948a Co-authored-by: Bram Moolenaar <Bram@vim.org>
* build(deps): update viml parser and queries (#21158)Christian Clason2022-11-22
|
* vim-patch:9.0.0916: getbufline() is inefficient for getting a single linezeertzjq2022-11-22
| | | | | | | | | | | Problem: getbufline() is inefficient for getting a single line. Solution: Add getbufoneline(). https://github.com/vim/vim/commit/ce30ccc06af7f2c03762e5b18dde37b26ea6ec42 Cherry-pick part of usr_41.txt from patch 8.1.1628. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.2435: setline() gives an error for some typeszeertzjq2022-11-22
| | | | | | | | | Problem: setline() gives an error for some types. Solution: Allow any type, convert each item to a string. https://github.com/vim/vim/commit/3445320839a38b3b0c253513b125da8298ec27d6 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* fix(diagnostic): correct type annotations; add Diagnostic type (#21120)Mathias FuĂźenegger2022-11-21
| | | | | Some functions didn't include the `nil` case in the return type annotation. This corrects those and also adds a Diagnostic class definition for the diagnostic.get return type
* feat(lsp): support set title in lsp relate floatwindow (#21110)Raphael2022-11-21
|
* feat(diagnostic): add `suffix` option to `virt_text` config (#21140)beardedsakimonkey2022-11-20
| | | | | | | This introduces a `suffix` option to the `virt_text` config in `vim.diagnostic.config()`. The suffix can either be a string which is appended to the diagnostic message or a function returning such. The function receives a `diagnostic` argument, which is the diagnostic table of the last diagnostic (the one whose message is rendered as virt text).
* feat(diagnostic): add `suffix` option to `open_float()` (#21130)beardedsakimonkey2022-11-20
| | | | | | | | | | | Closes #18687 This introduces a `suffix` option to `vim.diagnostic.open_float()` (and consequently `vim.diagnostic.config()`) that appends some text to each diagnostic in the float. It accepts the same types as `prefix`. For multiline diagnostics, the suffix is only appended to the last line. By default, the suffix will render the diagnostic error code, if any.
* vim-patch:partial:9.0.0913: only change in current window triggers the ↵zeertzjq2022-11-20
| | | | | | | | | | | | | | | | | WinScrolled event Problem: Only a change in the current window triggers the WinScrolled event. Solution: Trigger WinScrolled if any window scrolled or changed size. (issue vim/vim#11576) https://github.com/vim/vim/commit/0a60f79fd0c328b47b36279a95282e9f8d9e7512 Skip locking of window layout and E1312. Copy the latest version of all WinScrolled tests from Vim. Note: patch 9.0.0915 is needed for the Lua tests to pass. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* docs(support): update tested versions (#21126)dundargoc2022-11-20
|
* perf(diagnostic): use api variable and improve validate (#21111)Raphael2022-11-19
| | | | | * fix(diagnostic): use api variable and improve validate * fix: fix test case
* fix(lsp): ignore hover and signatureHelp responses on buffer change (#21121)Grzegorz Rozdzialik2022-11-19
| | | | | | | | | | | | | | | | | | | Language servers can take some time to respond to the `textDocument/hover` and `textDocument/signatureHelp` messages. During that time, the user could have already moved to another buffer. The popup was always shown in the current buffer, which could be a different one than the buffer for which the request was sent. This was particularly annoying when moving to a buffer with a `BufLeave` autocmd, as that autocmd was triggered when the hover popup was shown for the original buffer. Ignoring the response from these 2 messages if they are for a buffer that is not the current one leads to less noise. The popup will only be shown for the buffer for which it was requested. A more robust solution could involve cancelling the hover/signatureHelp request if the buffer changes so the language server can free its resources. It could be implemented in the future.
* vim-patch:partial:d13166e788fc (#21109)Sean Dewar2022-11-19
| | | | | | | | | | | | Update runtime files https://github.com/vim/vim/commit/d13166e788fcaef59ec65c20b46ca4be16625669 - Skip E1309-1311 (not ported). - Skip `:echowindow` changes (not ported). - Skip termdebug winbar doc changes (not fully ported). - Port missing `g:termdebug_config.{wide,use_prompt}` changes from v8.2.5010. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* feat(lsp): run handler in coroutine to support async response (#21026)Mathias FuĂźenegger2022-11-19
| | | | To illustrate a use-case this also changes `window/showMessageRequest` to use `vim.ui.select`
* feat(clipboard): added wayclip support (#21091)XDream82022-11-18
|
* vim-patch:9.0.0897: Clinical Quality Language files are not recognized (#21094)Matthew Gramigna2022-11-18
| | | | | | | | Problem: Clinical Quality Language files are not recognized. Solution: Add the "*.cql" pattern. (Matthew Gramigna, closes vim/vim#11452) https://github.com/vim/vim/commit/12babe45a389cd1ea8befd5b06239e877b4abbba Co-authored-by: mgramigna <mgramigna@mitre.org>
* refactor: deprecate 'secure' optionGregory Anders2022-11-17
| | | | | Now that 'exrc' files must be explicitly marked trusted there is no need to constrain what can be done in them.
* feat(exrc): use vim.secure.read() for 'exrc' optionGregory Anders2022-11-17
|
* feat: add vim.secure.read()Gregory Anders2022-11-17
| | | | | | | | | This function accepts a path to a file and prompts the user if the file is trusted. If the user confirms that the file is trusted, the contents of the file are returned. The user's decision is stored in a trust database at $XDG_STATE_HOME/nvim/trust. When this function is invoked with a path that is already marked as trusted in the trust database, the user is not prompted for a response.
* docs(treesitter): change links for `eq?` and `set!` to codeblocks (#21047)Jlll12022-11-15
|
* vim-patch:9.0.0883: a silent mapping may cause dots on the command line (#21061)zeertzjq2022-11-15
| | | | | | | | | Problem: A silent mapping may cause dots on the command line. Solution: Don't show dots for completion if they are not going to be removed again. (closes vim/vim#11501) https://github.com/vim/vim/commit/698a00f55d60043d51b1c98cbbf3f9fd10badd2f Co-authored-by: Bram Moolenaar <Bram@vim.org>
* fix(lua): make `vim.deepcopy` work with `vim.NIL`Max2022-11-14
| | | | | | | | style: changed double quotes to single quotes feat: add tests fix tests
* vim-patch:9.0.0863: col() and charcol() only work for the current window ↵zeertzjq2022-11-13
| | | | | | | | | | | | | (#21038) Problem: col() and charcol() only work for the current window. Solution: Add an optional winid argument. (Yegappan Lakshmanan, closes vim/vim#11466, closes vim/vim#11461) https://github.com/vim/vim/commit/4c8d2f02b3ce037bbe1d5ee12887e343c6bde88f Cherry-pick test_functions.vim change from patch 8.2.0633. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* vim-patch:9.0.0862: default value of 'endoffile' is wrong (#21032)zeertzjq2022-11-12
| | | | | | | | Problem: Default value of 'endoffile' is wrong. Solution: The default must be 'noendoffile'. https://github.com/vim/vim/commit/0aad88f073602849d1623122eb3c323f8e252def Co-authored-by: Bram Moolenaar <Bram@vim.org>
* fix: vim.ui.input always calls callback #21006Steven Arcangeli2022-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Followup to #20883 Related: #18144 This patch changes the behavior of the default `vim.ui.input` when the user aborts with `<C-c>`. Currently, it produces an error message + stack and causes `on_confirm` to not be called. With this patch, `<C-c>` will cause `on_confirm` to be called with `nil`, the same behavior as when the user aborts with `<Esc>`. I can think of three good reasons why the behavior should be this way: 1. Easier for the user to understand** It's not intuitive for there to be two ways to abort an input dialog that have _different_ outcomes. As a user, I would expect any action that cancels the input to leave me in the same state. As a plugin author, I see no value in having two possible outcomes for aborting the input. I have to handle both cases, but I can't think of a situation where I would want to treat one differently than the other. 2. Provides an API that can be overridden by other implementations** The current contract of "throw an error upon `<C-c>`" cannot be replicated by async implementations of `vim.ui.input`. If the callsite wants to handle the case of the user hitting `<C-c>` they need to use `pcall(vim.ui.input, ...)`, however an async implementation will instantly return and so there will be no way for it to produce the same error-throwing behavior when the user inputs `<C-c>`. This makes it impossible to be fully API-compatible with the built-in `vim.ui.input`. 3. Provides a useful guarantee to the callsite** As a plugin author, I want the guarantee that `on_confirm` will _always_ be called (only catastrophic errors should prevent this). If I am in the middle of some async thread of logic, I need some way to resume that logic after handing off control to `vim.ui.input`. The only way to handle the `<C-c>` case is with `pcall`, which as already mentioned, breaks down if you're using an alternative implementation.
* feat(spell): support nospell in treesitter queriesLewis Russell2022-11-12
|
* feat(checkhealth): use "help" syntax, avoid tabpage #20879Justin M. Keyes2022-11-11
| | | | | | | | | - If Nvim was just started, don't create a new tab. - Name the buffer "health://". - Use "help" syntax instead of "markdown". It fits better, and eliminates various workarounds. - Simplfy formatting, avoid visual noise. - Don't print a "INFO" status, it is noisy. - Drop the ":" after statuses, they are already UPPERCASE and highlighted.
* vim-patch:9.0.0861: solution for "!!sort" in closed fold is not optimal (#21027)zeertzjq2022-11-12
| | | | | | | | | Problem: Solution for "!!sort" in closed fold is not optimal. Solution: Use a different range instead of the subtle difference in handling a range with an offset. (issue vim/vim#11487) https://github.com/vim/vim/commit/9954dc39ea090cee6bf41c888c41e60d9f52c3b8 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:76db9e076318 (#21013)Sean Dewar2022-11-10
| | | | | | | | | | | | | | Update runtime files https://github.com/vim/vim/commit/76db9e076318cb0ae846f43b7549ad4f2d234c0b - `col()`'s example was changed to use `:echowin` so that the message can be seen with `showmode`. Use "\n" to force a hit-enter instead as `:echowin` isn't ported. - Replace interpolated string usage in syntax/modula3.vim (not ported). - Add a space after the `wincmd =` examples in `*CTRL-W_=*` so that the inlined code is highlighted properly when followed by a full stop. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* docs(treesitter): fix predicate syntax (#21016)James Trew2022-11-10
|
* fix(man.lua): use `env` command (#21007)euclidianAce2022-11-09
| | | | | | | Previously man.lua would use the `env` field in the parameters of `vim.loop.spawn` to override things like MANPAGER. This caused issues on NixOS since `spawn` will _override_ the environment rather than _append_ to it (and NixOS relies on a heavily modified environment). Using the `env` command to append to the environment solves this issue.
* fix(clipboard): update version regex pattern (#21012)Gregory Anders2022-11-09
| | | | Building tmux from source uses a 'next-' prefix, so account for that. Also handle failures to match more gracefully.
* docs: swap CursorLineFold and CursorLineSign (#20875)Eduard Baturin2022-11-10
|
* fix(vim.ui.input): return empty string when inputs nothing (#20883)Jongwook Choi2022-11-08
| | | | | | | | | | | fix(vim.ui.input): return empty string when inputs nothing The previous behavior of `vim.ui.input()` when typing <CR> with no text input (with an intention of having the empty string as input) was to execute `on_confirm(nil)`, conflicting with its documentation. Inputting an empty string should now correctly execute `on_confirm('')`. This should be clearly distinguished from cancelling or aborting the input UI, in which case `on_confirm(nil)` is executed as before.
* vim-patch:9.0.0843: VHS tape files are not recognized (#20995)Christian Clason2022-11-07
| | | | | | | | | Problem: VHS tape files are not recognized. Solution: Add a filetype pattern. (Carlos Alexandro Becker, closes vim/vim#11452) https://github.com/vim/vim/commit/1756f4b21837e8596241ecd668f4abbbab4bc7e5 Co-authored-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* Merge pull request #20991 from famiu/feat/api/nvim_cmd/command-namebfredl2022-11-07
|\ | | | | feat(api): add command name to Lua command callback opts
| * feat(api): add command name to Lua command callback optsFamiu Haque2022-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a `name` key to the opts dict passed to Lua command callbacks created using `nvim_create_user_command()`. This is useful for when multiple commands use the same callback. Note that this kind of behavior is not as strange as one might think, even some internal Neovim commands reuse the same internal C function, differing their behavior by checking the command name. `substitute`, `smagic` and `snomagic` are examples of that. This will also be useful for generalized Lua command preview functions that can preview a wide range of commands, in which case knowing the command name is necessary for the preview function to actually be able to execute the command that it's supposed to preview.
* | refactor(highlight): rename FloatBorderTitle #20988Raphael2022-11-07
| | | | | | requested in https://github.com/neovim/neovim/pull/20184
* | docs(news): add linematch (#20927)Lewis Russell2022-11-07
|/
* docs(options): remove mentions of 'imactivatefunc' and 'imstatusfunc'zeertzjq2022-11-07
|
* vim-patch:8.2.3751: cannot assign a lambda to an option that takes a functionzeertzjq2022-11-07
| | | | | | | | | | Problem: Cannot assign a lambda to an option that takes a function. Solution: Automatically convert the lambda to a string. (Yegappan Lakshmanan, closes vim/vim#9286) https://github.com/vim/vim/commit/6409553b6e3b4de4e1d72b8ee5445595214581ff Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* fix(clipboard): prefer xsel #20918wzy2022-11-06
| | | | | | | | | | | | | | | | | | | | | | Problem: xclip is not actively maintained compared to xsel, and it has a bug: $ touch a $ xsel -ib < a $ xsel -ob $ xclip -o -selection clipboard Error: target STRING not available Years ago, the situation was reversed. We originally preferred xsel 46bd3c0f77f282b93ca1307c011562243c394306 but then swapped to xclip 799d9c32157c841c3b8d355fa98a5ace435eef07 to work around https://github.com/neovim/neovim/issues/7237#issuecomment-443440633 Solution: Prefer xsel again. close #20862 ref #9302 ref https://github.com/astrand/xclip/issues/38
* feat: ":write ++p" creates parent dirs #20835Victor Blanchard2022-11-06
| | | | | | | | | | | - `:write ++p foo/bar/baz.txt` should create parent directories `foo/bar/` if they do not exist - Note: `:foo ++…` is usually for options. No existing options have a single-char abbreviation (presumably by design), so it's safe to special-case `++p` here. - Same for `writefile(…, 'foo/bar/baz.txt', 'p')` - `BufWriteCmd` can see the ++p flag via `v:cmdarg`. closes #19884
* fix(tutor): failing to get buf name #20933erw72022-11-06
| | | | | | | | | | | | | | | | | | | | Error detected while processing function tutor#TutorCmd[38]..BufReadPost Autocommands for "*": Error executing lua callback: ...llar/neovim/HEAD-cc5b736/share/nvim/runtime/filetype.lua:21: Error ex ecuting lua: ...llar/neovim/HEAD-cc5b736/share/nvim/runtime/filetype.lua:22: Vim(let):E158: Invalid bu ffer name: . stack traceback: [C]: in function 'nvim_cmd' ...llar/neovim/HEAD-cc5b736/share/nvim/runtime/filetype.lua:22: in function <...llar/neovim/HE AD-cc5b736/share/nvim/runtime/filetype.lua:21> [C]: in function 'nvim_buf_call' ...llar/neovim/HEAD-cc5b736/share/nvim/runtime/filetype.lua:21: in function <...llar/neovim/HE AD-cc5b736/share/nvim/runtime/filetype.lua:10> stack traceback: [C]: in function 'nvim_buf_call' ...llar/neovim/HEAD-cc5b736/share/nvim/runtime/filetype.lua:21: in function <...llar/neovim/HE AD-cc5b736/share/nvim/runtime/filetype.lua:10> Closes https://github.com/neovim/neovim/issues/20920
* vim-patch:9.0.0756 #20680Shougo2022-11-06
| | | | | | Problem: No autocmd event for changing text in a terminal window. Solution: Add TextChangedT. (Shougo Matsushita, closes vim/vim#11366) https://github.com/vim/vim/commit/4ccaedfcd7526983f4b6b3b06b0bfb54f333f1f3
* vim-patch:9.0.0389: crash when 'tagfunc' closes the windowzeertzjq2022-11-07
| | | | | | | | | | | Problem: Crash when 'tagfunc' closes the window. Solution: Bail out when the window was closed. https://github.com/vim/vim/commit/ccfde4d028e891a41e3548323c3d47b06fb0b83e Add docs for E1299 from Vim runtime. Co-authored-by: Bram Moolenaar <Bram@vim.org>