aboutsummaryrefslogtreecommitdiff
path: root/runtime
Commit message (Collapse)AuthorAge
* fix(treesitter): adjust indentation in inspector highlights (#26302)Gregory Anders2023-11-29
|
* fix(termcap): escape escapes in passthrough sequence (#26301)Gregory Anders2023-11-29
| | | | When using the tmux passthrough sequence any escape characters in the inner sequence must be escaped by adding another escape character.
* fix(defaults): wait until VimEnter to set background (#26284)Gregory Anders2023-11-29
| | | | | | | The OptionSet autocommand does not fire until Vim has finished starting, so setting 'background' before the VimEnter event would not fire the OptionSet event. The prior implementation also waited until VimEnter to set 'background', so this was a regression introduced when moving background detection into Lua.
* docs: document TSNode:byte_length() (#26287)Gregory Anders2023-11-29
| | | | Also update the type annotation of TSNode:id(), which returns a string, not an integer.
* fix(treesitter): make InspectTree correctly handle nested injections (#26085)Pham Huy Hoang2023-11-29
| | | | | | | Problem: Only injections under the top level tree are found. Solution: Iterate through all trees to find injections. When two injections are contained within the same node in the parent tree, prefer the injection with the larger byte length.
* fix(treesitter): use proper query syntax for inspector (#26274)Gregory Anders2023-11-29
|
* refactor: move some constants out of vim_defs.h (#26298)zeertzjq2023-11-29
|
* fix(man): set the nested flag for the BufReadCmd autocommand (#26285)Gregory Anders2023-11-28
| | | | The nested flag must be set so that other autocommands can fire while the BufReadCmd is still executing.
* vim-patch:9.0.2135: No test for mode() when executing Ex commands (#26282)zeertzjq2023-11-29
| | | | | | | | | Problem: No test for mode() when executing Ex commands Solution: Add some test cases and simplify several other test cases. Also add a few more test cases for ModeChanged. closes: vim/vim#13588 https://github.com/vim/vim/commit/fcaeb3d42b228e73c669b2fce78f1d3fe112769f
* fix(termcap): use tmux passthrough sequence when running in tmux (#26281)Gregory Anders2023-11-28
| | | | | | | tmux intercepts and ignores XTGETTCAP so wrap the query in the tmux passthrough sequence to make sure the query arrives at the "host" terminal. Users must still set the 'allow-passthrough' option in their tmux.conf.
* fix(rplugin): dont create data dir if it's a broken symlink #25726Samuel (ThinLinc team)2023-11-28
| | | | | | | | | | | | Checking if it's non-empty and not a directory gets us quite far, but not all the way. While a working symlink would trigger the earlier checks, a broken symlink does not. This commit fixes the special case where ~/.local/share/nvim already exists but is a broken symlink. Thus, it fixes the following error on startup: E739: Cannot create directory /home/samuel/.local/share/nvim: file already exists
* Merge pull request #26249 from bfredl/concealcharbfredl2023-11-28
|\ | | | | feat(decoration): allow conceal_char to be a composing char
| * feat(decoration): allow conceal_char to be a composing charbfredl2023-11-28
| | | | | | | | | | | | | | | | decor->text.str pointer must go. This removes it for conceal char, in preparation for a larger PR which will also handle the sign case. By actually allowing composing chars for a conceal chars, this becomes a feature and not just a refactor, as a bonus.
* | docs(lua): don't include remote-only API functions (#26266)zeertzjq2023-11-28
| |
* | vim-patch:9.0.2133: Cannot detect overstrike mode in Cmdline mode (#26263)zeertzjq2023-11-28
| | | | | | | | | | | | | | | | Problem: Cannot detect overstrike mode in Cmdline mode Solution: Make mode() return "cr" for overstrike closes: vim/vim#13569 https://github.com/vim/vim/commit/d1c3ef1f47c87d1da056c56564e1985fe6f2931d
* | vim-patch:9.0.2131: not all nushell files detected (#26260)Christian Clason2023-11-28
|/ | | | | | | | | | Problem: not all nushell files detected Solution: use *.nu to detect nushell files closes: vim/vim#13586 https://github.com/vim/vim/commit/b9efc72c2432f2d2a633c12d3a5b9fc3efb7b6e7 Co-authored-by: Daniel Buch Hansen <boogiewasthere@gmail.com>
* docs: support @since for api level #25574LW2023-11-27
| | | close #25416
* fix(treesitter): don't invalidate parser when discovering injectionsDmytro Soltys2023-11-27
| | | | | | | | | When parsing with a range, languagetree looks up injections and adds them if needed. This explicitly invalidates parser, making `is_valid` report `false` both when including and excluding children. This is an attempt to describe desired behaviour of `is_valid` in tests, with what ended up being a single line change to satisfy them.
* docs: small fixes (#26154)dundargoc2023-11-27
|
* fix(lua): disallow vim.wait() in fast contextsLewis Russell2023-11-27
| | | | | | | `vim.wait()` cannot be called in a fast callback since the main loop cannot be run in that context as it is not reentrant Fixes #26122
* vim-patch:cf40409e7d17Christian Clason2023-11-26
| | | | | | | | | | | | | | | | | | | | | | | runtime(nginx): add additional nginx keywords (vim/vim#13581) * Add support for missing keywords to the nginx syntax plugin This adds support for several keywords from - the built-in HTTP/2 module, - the built-in SSL module, - the built-in uWSGI module, - the experimental QUIC branch, - the third-party SSL CT module, - the third-party dynamic TLS records patch. Co-Author: ObserverOfTime <chronobserver@disroot.org> * Add missing http2/ http3 keywords to nginx plugin https://github.com/vim/vim/commit/cf40409e7d17ddadaa697188788753c761479ef8 Co-authored-by: Chris Aumann <me@chr4.org> Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.0.2128: runtime(swig): add syntax and filetype pluginsChristian Clason2023-11-26
| | | | | | | | | | | | | | | | | | Add syntax and filetype plugins for SWIG (Simplified Wrapper Interface Generator) description files. The default syntax for .i files highlights comments in a reverse color scheme which doesn't look well. This syntax builds on vim's c++ syntax by adding highlighting for common swig directives and user defined directives. For an alternative syntax, see vimscript vim/vim#1247 (which I found after writing this). closes: vim/vim#13562 https://github.com/vim/vim/commit/2e31065a650015892179e520038bf2083a9519b6 Co-authored-by: Julien Marrec <julien.marrec@gmail.com> Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
* fix(health): malformed call to warn() #26217Itamar Lencovsky2023-11-25
|
* vim-patch:813a538bb3ceChristian Clason2023-11-25
| | | | | | | | | | runtime(tsx): add indentation plugin (fixes vim/vim#13574) (vim/vim#13576) for now, let's just use the typescript indent file. https://github.com/vim/vim/commit/813a538bb3cec2eee4bf43e16b44fe40666529ef Co-authored-by: Jōshin <mrdomino@gmail.com>
* docs: vim.iter #26169Justin M. Keyes2023-11-25
| | | | closes #24141 closes #24746
* docs(starting.txt): correct step number (#26185)zeertzjq2023-11-24
|
* vim-patch:8750e3cf81f1 (#26163)zeertzjq2023-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(netrw): Fix handling of very long filename on longlist style (vim/vim#12150) If there is a file with a very long filename (longer than g:netrw_maxfilenamelen), and if g:netrw_liststyle is set to 1, no space is inserted between the filename and the filesize and the file cannot be opened because of this. E.g.: ``` $ echo hello > 12345678901234567890123456789012 # 32 bytes: OK $ echo hello > 123456789012345678901234567890123 # 33 bytes: not OK $ echo hello > 1234567890123456789012345678901234 # 34 bytes: not OK $ echo hello > こんにちは # multibyte filename $ LC_ALL=C.UTF-8 vim . --clean --cmd "set loadplugins" --cmd "let g:netrw_liststyle=1" ``` Then, it will be shown like this: ``` " ============================================================================ " Netrw Directory Listing (netrw v171) " /cygdrive/c/work/netrw-test " Sorted by name " Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\ " Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by x:special " ============================================================================== ../ 0 Mon Mar 13 19:25:16 2023 ./ 0 Mon Mar 13 19:44:58 2023 12345678901234567890123456789012 6 Mon Mar 13 19:29:43 2023 12345678901234567890123456789012346 Mon Mar 13 19:32:40 2023 1234567890123456789012345678901236 Mon Mar 13 19:29:49 2023 こんにちは 6 Mon Mar 13 19:30:41 2023 ``` If the length of the filename is 32 bytes, there is a space between the filename and the filesize. However, when it is longer than 32 bytes, no space is shown. Also, you may find that the filesize of the multibyte named file is not aligned. After this patch is applied, the filelist will be shown like this: ``` " ============================================================================ " Netrw Directory Listing (netrw v171) " /cygdrive/c/work/netrw-test " Sorted by name " Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\ " Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by x:special " ============================================================================== ../ 0 Mon Mar 13 20:49:22 2023 ./ 0 Mon Mar 13 21:12:14 2023 1234567890123456789012345678901 10000 Mon Mar 13 20:57:55 2023 12345678901234567890123456789012 6 Mon Mar 13 19:29:43 2023 123456789012345678901234567890123 6 Mon Mar 13 19:29:49 2023 1234567890123456789012345678901234 6 Mon Mar 13 19:32:40 2023 1234567890123456789012345678901234567 10000 Mon Mar 13 21:03:23 2023 1234567890123456789012345678901234567890 10000 Mon Mar 13 21:03:36 2023 123456789012345678901234567890123456789012 10000 Mon Mar 13 21:03:59 2023 1234567890123456789012345678901234567890123 10000 Mon Mar 13 21:03:45 2023 1234567890123456789012345678901234567890123456 5 Mon Mar 13 21:08:15 2023 12345678901234567890123456789012345678901234567 10 Mon Mar 13 21:05:21 2023 こんにちは 6 Mon Mar 13 19:30:41 2023 ``` Now we have 32 + 2 + 15 = 49 characters for filename and filesize. It tries to align the filesize as much as possible. The last line that has multibyte filename is also aligned. Also fixed the issue that the file list is not shown correctly when g:netrw_sort_by is set to 'size' and g:netrw_sizestyle is set to 'h' or 'H'. https://github.com/vim/vim/commit/8750e3cf81f12132e7b4141501feba586b1ae11d Co-authored-by: K.Takata <kentkt@csc.jp>
* feat(extmarks): add sign name to extmark "details" arrayLuuk van Baal2023-11-22
| | | | | | | | Problem: Unable to identify legacy signs when fetching extmarks with `nvim_buf_get_extmarks()`. Solution: Add "sign_name" to the extmark detail array. Add some misc. changes as follow-up to #25724
* vim-patch:cb0c113ddc01 (#26147)zeertzjq2023-11-22
| | | | | | | | | | | | | | | | runtime(netrw): expand $COMSPEC without applying 'wildignore' (vim/vim#13542) When expanding $COMSPEC and a user has set :set wildignore=*.exe netrw won't be able to properly cmd.exe, because it does not ignore the wildignore setting. So let's explicitly use expand() without applying the 'wildignore' and 'suffixes' settings to the result closes: vim/vim#13426 https://github.com/vim/vim/commit/cb0c113ddc0101b05a27c040774cb7106fc74cd4 Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:596a9f29c83a (#26146)zeertzjq2023-11-22
| | | | | | | | | | runtime(doc): Fix whitespace and formatting of some help files (vim/vim#13549) https://github.com/vim/vim/commit/596a9f29c83af85ace1a2702c88591851ad14df8 N/A patch: vim-patch:aabca259fa48 Co-authored-by: h_east <h.east.727@gmail.com>
* perf(lsp): use async fs_stat for file watching on linux (#26123)Mathias Fußenegger2023-11-21
|
* fix(vim.region): handle multibyte inclusive selection properly (#26129)zeertzjq2023-11-21
|
* refactor(lsp): add type annotations to _watchfiles (#26109)Mathias Fußenegger2023-11-20
|
* perf(lsp): replace file polling on linux with per dir watcher (#26108)Mathias Fußenegger2023-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Should help with https://github.com/neovim/neovim/issues/23291 On linux `new_fs_event` doesn't support recursive watching, but we can still use it to watch folders. The downside of this approach is that we may end up sending some false `Deleted` events. For example, if you save a file named `foo` there will be a intermediate `foo~` due to the save mechanism of neovim. The events we get from vim.uv in that case are: - rename: foo~ - rename: foo~ - rename: foo - rename: foo - change: foo - change: foo The mechanism in this PR uses a debounce to reduce this to: - deleted: foo~ - changed: foo `foo~` will be the false positive. I suspect that for the LSP case this is good enough. If not, we may need to follow up on this and keep a table in memory that tracks available files.
* Merge pull request #25724 from luukvbaal/signmergebfredl2023-11-18
|\ | | | | refactor(sign): move legacy signs to extmarks
| * refactor(sign): move legacy signs to extmarksLuuk van Baal2023-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The legacy signlist data structures and associated functions are redundant since the introduction of extmark signs. Solution: Store signs defined through the legacy commands in a hashmap, placed signs in the extmark tree. Replace signlist associated functions. Usage of the legacy sign commands should yield no change in behavior with the exception of: - "orphaned signs" are now always removed when the line it is placed on is deleted. This used to depend on the value of 'signcolumn'. - It is no longer possible to place multiple signs with the same identifier in a single group on multiple lines. This will now move the sign instead. Moreover, both signs placed through the legacy sign commands and through |nvim_buf_set_extmark()|: - Will show up in both |sign-place| and |nvim_buf_get_extmarks()|. - Are displayed by increasing sign identifier, left to right. Extmark signs used to be ordered decreasingly as opposed to legacy signs.
* | feat(lsp): support for choice snippet nodesMaria José Solano2023-11-17
| |
* | docs: document breaking change of cursor blink behavior (#26075)Gregory Anders2023-11-17
| |
* | refactor(grid): make screen rendering more multibyte than ever beforebfredl2023-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: buffer text with composing chars are converted from UTF-8 to an array of up to seven UTF-32 values and then converted back to UTF-8 strings. Solution: Convert buffer text directly to UTF-8 based schar_T values. The limit of the text size is now in schar_T bytes, which is currently 31+1 but easily could be raised as it no longer multiplies the size of the entire screen grid when not used, the full size is only required for temporary scratch buffers. Also does some general cleanup to win_line text handling, which was unnecessarily complicated due to multibyte rendering being an "opt-in" feature long ago. Nowadays, a char is just a char, regardless if it consists of one ASCII byte or multiple bytes.
* | fix(osc52): use `p` for primary selection instead of `s` (#26076)Tomasz N2023-11-16
| | | | | | Co-authored-by: Gregory Anders <greg@gpanders.com>
* | vim-patch:9.0.2108: [security]: overflow with count for :s commandzeertzjq2023-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: [security]: overflow with count for :s command Solution: Abort the :s command if the count is too large If the count after the :s command is larger than what fits into a (signed) long variable, abort with e_value_too_large. Adds a test with INT_MAX as count and verify it correctly fails. It seems the return value on Windows using mingw compiler wraps around, so the initial test using :s/./b/9999999999999999999999999990 doesn't fail there, since the count is wrapping around several times and finally is no longer larger than 2147483647. So let's just use 2147483647 in the test, which hopefully will always cause a failure https://github.com/vim/vim/commit/ac63787734fda2e294e477af52b3bd601517fa78 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | fix(osc52): enable OSC 52 by default in tmux sessions (#26072)Gregory Anders2023-11-16
| | | | | | | | | | tmux has a set-clipboard option which, when set to 'on', allows applications to set the system clipboard using the usual OSC 52 escape sequence.
* | refactor: use optional base argument of tonumber (#26070)Gregory Anders2023-11-16
| |
* | feat(clipboard): enable OSC 52 clipboard provider by default (#26064)Gregory Anders2023-11-16
| | | | | | | | | | | | | | | | | | | | | | | | | | Use the XTGETTCAP sequence to determine if the host terminal supports the OSC 52 sequence and, if it does, enable the OSC 52 clipboard provider by default. This is only done automatically when all of the following are true: 1. Nvim is running in the TUI 2. 'clipboard' is not set to unnamed or unnamedplus 3. g:clipboard is unset 4. Nvim is running in an SSH connection ($SSH_TTY is set) 5. Nvim is not running inside tmux ($TMUX is unset)
* | feat: add vim.text module (#26069)Gregory Anders2023-11-16
| |
* | feat(tui): support DCS responses in TermResponse event (#26061)Gregory Anders2023-11-16
| |
* | docs: fix vim.snippet help tags (#26068)Gregory Anders2023-11-16
|/
* fix: only attempt to close timer if not already closing (#26047)Gregory Anders2023-11-14
| | | | | | | | | | | This fixes an error that can occur in certain pathological cases when the autocommand fires at just the right time such that it attempts to close the timer after the timer has already exited, but before the scheduled callback has fired. We now let the timer continue to run even when the autocommand deletes itself to avoid having to repeat the cleanup code multiple times. There is no harm in letting the timer execute if the autocommand does not exist, as the pcall will catch the error.
* vim-patch:67abf1592c83Christian Clason2023-11-14
| | | | | | | | runtime(tar): comment out strange error condition check https://github.com/vim/vim/commit/67abf1592c83c910c7815478f67e0a8989d51417 Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:30c762d99ac8Christian Clason2023-11-14
| | | | | | | | runtime(doc): fix typo in pi_gzip.txt https://github.com/vim/vim/commit/30c762d99ac8e755afb00f89ddd009988e95abce Co-authored-by: Christian Brabandt <cb@256bit.org>