aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* ci: run codeql on pull requests #24545Justin M. Keyes2023-08-13
| | | Also use cache to save 1 minute.
* Merge pull request #24681 from clason/update-cChristian Clason2023-08-13
|\ | | | | feat(treesitter): update C parser and queries
| * feat(treesitter): update C queries from upstreamChristian Clason2023-08-13
| |
| * build(deps): bump tree-sitter-c to v0.20.5Christian Clason2023-08-13
| |
* | fix(keycodes): recognize <t_xx> as a key (#24700)zeertzjq2023-08-13
| | | | | | | | Problem: The result of keytrans() sometimes can't be translated back. Solution: Recognize <t_xx> as a key.
* | vim-patch:e978b4534a5e (#24697)Sean Dewar2023-08-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Farewell to Bram and dedicate upcoming Vim 9.1 to him (vim/vim#12749) https://github.com/vim/vim/commit/e978b4534a5e10471108259118c0ef791106fd92 Also update the header for the following files that were converted to Vim9 script upstream: - autoload/ccomplete.lua (vim9jitted) - ftplugin.vim - ftplugof.vim - indent.vim - indent/vim.vim - makemenu.vim This also updates the "Last Change" dates, even if some changes (due to rewrites to Vim9 script) were not ported. There's still a few other places where Bram is still mentioned as a maintainer in the files we and Vim have: - ftplugin/bash.vim - indent/bash.vim - indent/html.vim - indent/mail.vim - macros/accents.vim - macros/editexisting.vim - syntax/bash.vim - syntax/shared/typescriptcommon.vim - syntax/tar.vim - syntax/typescript.vim - syntax/typescriptreact.vim - syntax/zimbu.vim Maybe future patches will address that. Also exclude changes to .po files that didn't apply automatically (the `:messages` maintainer string isn't used in Nvim anyway). Co-authored-by: Christian Brabandt <cb@256bit.org>
* | Merge #15440 close 'shell' :terminal automaticallyJustin M. Keyes2023-08-13
|\ \ | |/ |/|
| * Use Lua autocommand and make TermClose autocommand globalGregory Anders2023-08-10
| |
| * fix: handle argv not present in nvim_get_chan_infoGregory Anders2023-08-10
| |
| * test: update tests for auto-closing :term buffersGregory Anders2023-08-10
| | | | | | | | | | | | | | | | The terminal buffer closes automatically when using `:terminal` and the command exits without an error. This messes up some tests that expect the terminal buffer to still be open. We can force the buffer not to close by passing an argument to `:terminal`. This can be anything, since the shell-test stub simply prints whatever argument it's given.
| * feat(terminal): close shell terminals automaticallyGregory Anders2023-08-10
| | | | | | | | | | | | When starting a terminal buffer that uses the default value of &shell (e.g. when using `:terminal` or `termopen([&shell])`), automatically close the buffer if the shell exits without an error.
* | fix(treesitter): logger memory leakLewis Russell2023-08-13
| |
* | build(deps): bump luajit to HEAD - 72efc42efChristian Clason2023-08-13
| |
* | vim-patch:9ad1bf7afd5cChristian Clason2023-08-13
| | | | | | | | | | | | | | | | | | | | | | runtime(pymanifest): fix mistake in syntax definition Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: ObserverOfTime <chronobserver@disroot.org> https://github.com/vim/vim/commit/9ad1bf7afd5c4f26e5154eca2697c9a6773e0bf4 Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
* | vim-patch:2f339aad6c80Christian Clason2023-08-13
| | | | | | | | | | | | | | | | Add syntax & ftplugin for pymanifest (vim/vim#12773) https://github.com/vim/vim/commit/2f339aad6c80e82d7c1237b402392065857174d4 Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
* | vim-patch:f9c4c2f97db9Christian Clason2023-08-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Update iss syntax file (vim/vim#11890) - Add 'ExternalSize:' parameter - Add 'setntfscompression' files flag - Fix escaped left brace highlight - Fix 'String:' parameter highlight - Remove trailing whitespace https://github.com/vim/vim/commit/f9c4c2f97db94f513b86d86b86bf981060c7c8bf Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
* | fix(test): remove test/compat.luaLewis Russell2023-08-13
| |
* | feat(remote): avoid --remote-ui infinite loop (#24465)shafouz2023-08-13
| |
* | build(vim-patch.sh): rename locale.c to os/lang.c (#24687)zeertzjq2023-08-13
| |
* | build(vim-patch.sh): group co-authors together (#24686)zeertzjq2023-08-13
| |
* | vim-patch:cd4e4e169ab3 (#24685)zeertzjq2023-08-13
| | | | | | | | | | | | | | .cirrus.yml: skip pkg update for FreeBSD 13.1 (vim/vim#12767) https://github.com/vim/vim/commit/cd4e4e169ab3ff0b9315e5bc16d5ba490ee251ff Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com>
* | vim-patch:9.0.1698: Test_map_restore_sid fails in GUI (#24682)zeertzjq2023-08-13
| | | | | | | | | | | | | | | | Problem: Test_map_restore_sid fails in GUI Solution: Feed an unsimplified Ctrl-B closes: vim/vim#12770 https://github.com/vim/vim/commit/7fe108990423535fa7cb804deae49d64831e25a9
* | vim-patch:9.0.1697: incsearch test not sufficient (#24683)zeertzjq2023-08-13
| | | | | | | | | | | | | | | | Problem: incsearch test not sufficient (after 9.0.1691) Solution: add an additional test https://github.com/vim/vim/commit/73b8209266f0cd5c6d4df77b3700172d9c26df31 Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
* | feat(treesitter)!: incremental injection parsingLewis Russell2023-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Treesitter highlighting is slow for large files with lots of injections. Solution: Only parse injections we are going to render during a redraw cycle. --- - `LanguageTree:parse()` will no longer parse injections by default and now requires an explicit range argument to be passed. - `TSHighlighter` now parses injections incrementally during on_win callbacks for the line range being rendered. - Plugins which require certain injections to be parsed must run `parser:parse({ start_row, end_row })` before using the tree.
* | fix(diff): filler lines for hunks bigger than linematch limit (#24676)Jaehwang Jung2023-08-12
| | | | | | | | | | | | Apply linematch filler computation only if the hunk is actually linematched. Fixes #24580
* | vim-patch:d8f981138aa0Christian Clason2023-08-12
| | | | | | | | | | | | | | | | Add commentstring for nix file format (vim/vim#12696) https://github.com/vim/vim/commit/d8f981138aa04c15ff87b306e9003df8d4b09d17 Co-authored-by: Keith Smiley <keithbsmiley@gmail.com>
* | fix(events): avoid unnecessary CursorMoved (#24675)zeertzjq2023-08-12
| | | | | | | | | | | | Problem: Temporarily changing current window in a script causes CursorMoved to be triggerd. Solution: Don't trigger CursorMoved if neither curwin nor cursor changed between two checks.
* | vim-patch:9.0.1688: cannot store custom data in quickfix list (#24673)zeertzjq2023-08-12
| | | | | | | | | | | | | | | | | | | | Problem: cannot store custom data in quickfix list Solution: add `user_data` field for the quickfix list closes: vim/vim#11818 https://github.com/vim/vim/commit/ca6ac99077d2e6d020a34267aa5e0fbc4d23dc38 Co-authored-by: Tom Praschan <13141438+tom-anders@users.noreply.github.com>
* | vim-patch:9.0.1694: wrong mapping applied when replaying a char search (#24670)zeertzjq2023-08-12
| | | | | | | | | | | | | | | | | | Problem: wrong mapping applied when replaying a char search Solution: Store a NOP after the ESC closes: vim/vim#12708 closes: vim/vim#6350 https://github.com/vim/vim/commit/bacc83009bc38c9ba0247aaa22b76d1993d57993
* | vim-patch:9.0.1693: Ctrl-Q not handled like Ctrl-V in replace mode (#24669)zeertzjq2023-08-12
| | | | | | | | | | | | | | | | | | | | | | Problem: Ctrl-Q not handled like Ctrl-V in replace mode Solution: Handle Ctrl-Q like Ctrl-V closes: vim/vim#12686 closes: vim/vim#12684 https://github.com/vim/vim/commit/2d63e4b3ccc0bb34db21a3c1d024cb114f8c4071 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.0.1691: wrong viewport restored for incsearch and smoothscroll ↵zeertzjq2023-08-12
| | | | | | | | | | | | | | | | | | | | (#24667) Problem: wrong viewport restored for incsearch and smoothscroll Solution: Save and restore skipcol as well closes: vim/vim#12713 https://github.com/vim/vim/commit/7b7b4cb6f274e7bace127107b0d2752133c4020b
* | vim-patch:9.0.1687: mapset() not properly handling script ID (#24666)zeertzjq2023-08-12
| | | | | | | | | | | | | | | | | | Problem: mapset() not properly handling script ID Solution: replace_termcodes() may accept a script ID closes: vim/vim#12699 closes: vim/vim#12697 https://github.com/vim/vim/commit/7e0bae024d4c1673cff31763227ad52b936fa56f
* | vim-patch:9.0.1686: undotree() only works for the current buffer (#24665)zeertzjq2023-08-12
| | | | | | | | | | | | | | | | | | | | | | | | Problem: undotree() only works for the current buffer Solution: Add an optional "buffer number" parameter to undotree(). If omitted, use the current buffer for backwards compatibility. closes: vim/vim#4001 closes: vim/vim#12292 https://github.com/vim/vim/commit/5fee11114975b7405b7ccd3ee8758e54bf559760 Co-authored-by: Devin J. Pohly <djpohly@gmail.com>
* | vim-patch:21aaff3faa82Christian Clason2023-08-11
| | | | | | | | | | | | | | | | Update my name and email in runtime files (vim/vim#12763) https://github.com/vim/vim/commit/21aaff3faa828c5c2677a0a9f1b90a0b780d57f6 Co-authored-by: Lily Ballard <lily@ballards.net>
* | vim-patch:dd0ad2598898Christian Clason2023-08-11
| | | | | | | | | | | | | | | | | | | | Update syntax/dosini.vim to the latest version (vim/vim#12764) The latest version is in https://github.com/xuhdev/syntax-dosini.vim/blob/master/syntax/dosini.vim. I've sent the file to Bram at the end of June, unfortunately it wasn't able to make into the Vim repository. RIP! https://github.com/vim/vim/commit/dd0ad2598898c2b4641c4acd5b70b6184fa698ed Co-authored-by: Hong Xu <hong@topbug.net>
* | feat(treesitter): add injection language fallback (#24659)Christian Clason2023-08-11
| | | | | | | | | | | | | | | | | | | | | | | | * feat(treesitter): add injection language fallback Problem: injection languages are often specified via aliases (e.g., filetype or in upper case), requiring custom directives. Solution: include lookup logic (try as parser name, then filetype, then lowercase) in LanguageTree itself and remove `#inject-language` directive. Co-authored-by: Lewis Russell <me@lewisr.dev>
* | fix(lsp): extra "." when completing with tsserver #24646Raphael2023-08-11
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: With tsserver LSP, omni completion after "." inserts an extra "." Solution: Apply adjust_start_col() regardless of `filterText`. adjust_start_col() is explained here: https://github.com/neovim/neovim/blob/0ea8dfeb3dc347579753169d9e3588f6306ab703/runtime/lua/vim/lsp.lua#L2334-L2351 The `filterText` field is used in the following situations rather than as a condition for obtaining column values: 1. Real-time filtering: When the user types characters in the editor, the language server can use the filterText field to filter the list of suggestions and only return suggestions that match the typed characters. This helps to provide more precise recommendations. 2. Fuzzy matching: The filterText field can be used to perform fuzzy matching, allowing matching in the middle or beginning of input characters, not limited to prefix matching. This can provide a more flexible code completion experience. Inspecting usage of `filtertext` in vim-lsp and coc and lsp-mode: - vim-lsp uses a `refresh_pattern` to judge filterText as completionitem word (although I think this is not the correct usage). - coc uses it for filtering. Fix #22803
* vim-patch:9.0.1683: Updated runtime files (#24638)zeertzjq2023-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a collection of various PRs from github that all require a minor patch number: 1) https://github.com/vim/vim/pull/12612 Do not conflate dictionary key with end of block 2) https://github.com/vim/vim/pull/12729: When saving and restoring 'undolevels', the constructs `&undolevels` and `:set undolevels` are problematic. The construct `&undolevels` reads an unpredictable value; it will be the local option value (if one has been set), or the global option value (otherwise), making it unsuitable for saving a value for later restoration. Similarly, if a local option value has been set for 'undolevels', temporarily modifying the option via `:set undolevels` changes the local value as well as the global value, requiring extra work to restore both values. Saving and restoring the option value in one step via the construct `:let &undolevels = &undolevels` appears to make no changes to the 'undolevels' option, but if a local option has been set to a different value than the global option, it has the unintended effect of changing the global 'undolevels' value to the local value. Update the documentation to explain these issues and recommend explicit use of global and local option values when saving and restoring. Update some unit tests to use `g:undolevels`. 3) https://github.com/vim/vim/pull/12702: Problem: Pip requirements files are not recognized. Solution: Add a pattern to match pip requirements files. 4) https://github.com/vim/vim/pull/12688: Add indent file and tests for ABB Rapid 5) https://github.com/vim/vim/pull/12668: Use Lua 5.1 numeric escapes in tests and add to CI Only Lua 5.2+ and LuaJIT understand hexadecimal escapes in strings. Lua 5.1 only supports decimal escapes: > A character in a string can also be specified by its numerical value > using the escape sequence \ddd, where ddd is a sequence of up to three > decimal digits. (Note that if a numerical escape is to be followed by a > digit, it must be expressed using exactly three digits.) Strings in Lua > can contain any 8-bit value, including embedded zeros, which can be > specified as '\0'. To make sure this works with Lua 5.4 and Lua 5.1 change the Vim CI to run with Lua 5.1 as well as Lua 5.4 6) https://github.com/vim/vim/pull/12631: Add hurl filetype detection 7) https://github.com/vim/vim/pull/12573: Problem: Files for haskell persistent library are not recognized Solution: Add pattern persistentmodels for haskell persistent library closes: vim/vim#12612 closes: vim/vim#12729 closes: vim/vim#12702 closes: vim/vim#12688 closes: vim/vim#12668 closes: vim/vim#12631 closes: vim/vim#12573 Already ported but wasn't marked: vim-patch:ad34abee2583 https://github.com/vim/vim/commit/6efb1980336ff324e9c57a4e282530b952fca816 Co-authored-by: Christian Brabandt <cb@256bit.org> Co-authored-by: lacygoill <lacygoill@lacygoill.me> Co-authored-by: Michael Henry <drmikehenry@drmikehenry.com> Co-authored-by: ObserverOfTime <chronobserver@disroot.org> Co-authored-by: KnoP-01 <knosowski@graeffrobotics.de> Co-authored-by: James McCoy <jamessan@jamessan.com> Co-authored-by: Jacob Pfeifer <jacob@pfeifer.dev> Co-authored-by: Borys Lykah <lykahb@fastmail.com>
* Merge pull request #24639 from zeertzjq/vim-6a500661a9cbzeertzjq2023-08-10
|\ | | | | vim-patch:6a500661a9cb,81b8bf5b4a33
| * vim-patch:81b8bf5b4a33zeertzjq2023-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the vimscript code for restoring cursor position Using xxd(1) to filter and edit binary files causes the input files to have dual nature, so to speak, which effectively makes restoring the cursor position broken. Fix that by ignoring the "xxd" file type in the code that restores the cursor position. Interactive rebasing in git causes files to be edited in vim, which, similarly to commit messages, are rarely the same as the last one edited. Thus, also add "gitrebase" to the list of file types for which the cursor position isn't restored. While there, refactor the code a bit to possibly save a few CPU cycles and to keep the line lengths in check, and use the long form of the commands and variables, to make the code slightly more consistent and more understandable to newcomers. Update the relevant comments in the code and the associated parts of the documentation, to keep them in sync with the updated code. Remove some redundant trailing whitespace as well, as spotted. https://github.com/vim/vim/commit/81b8bf5b4a33552c610dc2ea743ac2698a16aef7 Co-authored-by: Dragan Simic' via vim_dev <vim_dev@googlegroups.com>
| * vim-patch:6a500661a9cbzeertzjq2023-08-10
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve the vimscript code in ":h hex-editing" Save and restore the view position before and after saving the buffer, respectively, to keep the current view of the xxd(1)'s hex dump unchanged after doing ":w", which previously caused the window to scroll back to the very beginning of the buffer. I believe it's needless to say how annoying and counterproductive that was. Get rid of the "Press ENTER or type command to continue" message, which was previously displayed after opening larger binary files. The use of "silent" and "redraw" commands is tailored specifically to avoid screen flickering, e.g. when doing ":w", which is caused by the buffer being filtered by an external command. Increase the number of octets per line, produced by xxd(1), from the default value of 16 to 32. This puts bigger chunks of the hex dump on the screen and makes the whole thing much more usable. While there, reformat the code to make it more readable, and use the long form of the commands and variables to make the code slightly more consistent and more understandable to newcomers. https://github.com/vim/vim/commit/6a500661a9cb7b57093cf1095aa67e9c4aabc709 Co-authored-by: Dragan Simic' via vim_dev <vim_dev@googlegroups.com>
* vim-patch:8f566fdb1e34 (#24636)zeertzjq2023-08-10
| | | | | | | update .wast files syntax highlighting (vim/vim#12741) https://github.com/vim/vim/commit/8f566fdb1e3452c9104d9e7af402adbfbcb463c7 Co-authored-by: Linda_pp <rhysd@users.noreply.github.com>
* feat(defaults): treat "•" as a list item prefix #24623Justin M. Keyes2023-08-09
| | | | | | | | Problem: Nvim docs use "•" as a list item prefix but `gw{motion}` doesn't format such lists by default. Solution: Change the 'comments' option to include "fb:•" by default.
* fix(types): make filetype.add parameters optionalMaria José Solano2023-08-09
|
* vim-patch:bd76c89e31ac (#24630)Christian Clason2023-08-09
| | | | | | | update matchit (vim/vim#12611) https://github.com/vim/vim/commit/bd76c89e31ac9d9efd00ec8dda9c32436415dbbb Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:2eb413f89b97 (#24627)Christian Clason2023-08-09
| | | | | | | | | | | | * vim-patch:2eb413f89b97 detect filetype for `*.vsh` and `*.vv` files (vim/vim#12692) Co-authored-by: Turiiya <34311583+tobealive@users.noreply.github.com> https://github.com/vim/vim/commit/2eb413f89b97a498679fbe68c7564b9e41c5af7f Co-authored-by: Turiiya <34311583+ttytm@users.noreply.github.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fix(iter): make pipeline termination conditions consistent (#24614)Gregory Anders2023-08-09
| | | | | | | | If an iterator pipeline stage returns nil as its first return value, the other return values are ignored and it is treated as if that stage returned only nil (the semantics of returning nil are different between different stages). This is consistent with how for loops work in Lua more generally, where the for loop breaks when the first return value from the function iterator is nil (see :h for-in for details).
* vim-patch:92f076e53e22 (#24634)Christian Clason2023-08-09
| | | | | | | Update krl and add rapid syntax files (vim/vim#12750) https://github.com/vim/vim/commit/92f076e53e22b467fb6d12051fec2d4bdbda88fe Co-authored-by: Patrick Meiser-Knosowski <31903021+KnoP-01@users.noreply.github.com>
* vim-patch:077ade4f6703 (#24629)Christian Clason2023-08-09
| | | | | | | feat: recognize geojson extension as json filetype (vim/vim#12636) https://github.com/vim/vim/commit/077ade4f67036e652b99f8f858c9ca1c1dd22245 Co-authored-by: Dominique Pellé <dominique.pelle@gmail.com>
* vim-patch:b69b9d5e1753 (#24628)Christian Clason2023-08-09
| | | | | | | | | | | | | | Add filetype detection for eyaml files (vim/vim#12659) https://github.com/voxpupuli/hiera-eyaml/ uses and produces the eyaml format, which is simply yaml with some encrypted values. It's convenient to edit the file without decrypting when not touching encrypted values (or when you don't have access to the decryption key), which is why vim should treat those files as yaml files. https://github.com/vim/vim/commit/b69b9d5e175351c9a25507139954f6211f37fdd9 Co-authored-by: Max Gautier <mg@max.gautier.name>