aboutsummaryrefslogtreecommitdiff
path: root/runtime
Commit message (Collapse)AuthorAge
* fix(lsp): wrong iterator in registerCapability handler (#24971)TheBlob422023-09-01
|
* vim-patch:9.0.1833: [security] runtime file fixes (#24969)zeertzjq2023-09-01
| | | | | | | | | | | | | | | | | | | | | | Problem: runtime files may execute code in current dir Solution: only execute, if not run from current directory The perl, zig and ruby filetype plugins and the zip and gzip autoload plugins may try to load malicious executable files from the current working directory. This is especially a problem on windows, where the current directory is implicitly in your $PATH and windows may even run a file with the extension `.bat` because of $PATHEXT. So make sure that we are not trying to execute a file from the current directory. If this would be the case, error out (for the zip and gzip) plugins or silently do not run those commands (for the ftplugins). This assumes, that only the current working directory is bad. For all other directories, it is assumed that those directories were intentionally set to the $PATH by the user. https://github.com/vim/vim/commit/816fbcc262687b81fc46f82f7bbeb1453addfe0c Co-authored-by: Christian Brabandt <cb@256bit.org>
* feat(treesitter): improve query error messageAmaan Qureshi2023-08-31
|
* vim-patch:0b8b145bf8bfChristian Clason2023-08-31
| | | | | | | | | | runtime(optwin): Fix for 'splitkeep' option (vim/vim#12974) 'spk' was used as a boolean, rather than a string option. https://github.com/vim/vim/commit/0b8b145bf8bfd3e90a1c30a999e6adb89ec8891c Co-authored-by: xrandomname <141588647+xrandomname@users.noreply.github.com>
* vim-patch:1610528cc305Christian Clason2023-08-31
| | | | | | | | runtime(forth): Update syntax and ftplugin files (vim/vim#12976) https://github.com/vim/vim/commit/1610528cc3052103e368c4175b09db6f9a6c150c Co-authored-by: dkearns <dougkearns@gmail.com>
* refactor(lsp): add type annotation for lsp.Client.server_capabilities (#24925)Jongwook Choi2023-08-31
| | | | | | | | | | | | | | The class `lsp.Client` has a public member `server_capabilities`, which is assumed to be non-nil once initialized, as documented in `:help vim.lsp.client`. Due to the possibility that it may be nil before initialization, `lsp.Client` was not having a proper lua type annotations on the field `server_capabilities`. Instead of having a nil `server_capabilities` until initialized in the RPC response callback, we can have an initial value of empty table. This CHANGES the behavior of the `server_capabilities` field in a way that it is no longer `nil` until initialization. Note that, as already documented, `server_capabilities` should never be nil when it is once initialized and thus ready to be used in user configs.
* fix(lsp): only disable inlay hints / diagnostics if no other clients are ↵Chris AtLee2023-08-31
| | | | | | | | | | | | | | | | | | | connected (#24535) This fixes the issue where the LspNotify handlers for inlay_hint / diagnostics would end up refreshing all attached clients. The handler would call util._refresh, which called vim.lsp.buf_request, which calls the method on all attached clients. Now util._refresh takes an optional client_id parameter, which is used to specify a specific client to update. This commit also fixes util._refresh's handling of the `only_visible` flag. Previously if `only_visible` was false, two requests would be made to the server: one for the visible region, and one for the entire file. Co-authored-by: Stanislav Asunkin <1353637+stasjok@users.noreply.github.com> Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
* fix(runtime/tutor): don't try to close fold when there is none (#24953)David Moberg2023-08-31
| | | | | | Problem: When double clicking a line starting with a #, the code assumes there is a fold there and tries to close it, resulting in an error if there isn't a fold. Solution: Check foldlevel before performing "zc".
* vim-patch:9.0.1820: Rexx files may not be recognised (#24956)zeertzjq2023-08-31
| | | | | | | | | | | Problem: Rexx files may not be recognised Solution: Add shebang detection and improve disambiguation of *.cls files closes: vim/vim#12951 https://github.com/vim/vim/commit/e06afb7860805537ccd69966bc03169852c9b378 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* vim-patch:9.0.1797: Vimball/Visual Basic filetype detection conflict (#24947)zeertzjq2023-08-31
| | | | | | | | | | | | | Problem: Vimball/Visual Basic filetype detection conflict Solution: runtime(vb): Improve Vimball and Visual Basic detection logic Only run Vimball Archiver's BufEnter autocommand on Vimball archives. Fixes vim/vim#2694. closes: vim/vim#12899 https://github.com/vim/vim/commit/f97f6bbf56408c0c97b4ddbe81fba858d7455b0d Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* vim-patch:9.0.1807: runtime: crystal scripts not recognised (#24949)zeertzjq2023-08-31
| | | | | | | | | | Problem: runtime: crystal scripts not recognised Solution: Filetype detect Crystal scripts by shebang line closes: vim/vim#12935 https://github.com/vim/vim/commit/9b73902dbe6f7940326bcd8dbc89d010d85d69c5 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* vim-patch:9.0.1803: runtime(filetype): Add norg language detection (#24948)zeertzjq2023-08-31
| | | | | | | | | runtime(filetype): Add norg markup language detection closes: vim/vim#12913 https://github.com/vim/vim/commit/03e44a1d70e914504e6151fe88ad1e574cbf0a59 Co-authored-by: NTBBloodbath <bloodbathalchemist@protonmail.com>
* vim-patch:9d8ef7cc4340Christian Clason2023-08-30
| | | | | | | | | | | runtime: cleanup :Sman command via the undo_ftplugin mechanism (vim/vim#12967) Regards to @dkearns as noticed in https://github.com/vim/vim/commit/2ac708b548660b232a32c52d89bde3d8596646c0 https://github.com/vim/vim/commit/9d8ef7cc434076dfda62ca3d3101eaae52e316cd Co-authored-by: Enno <Konfekt@users.noreply.github.com>
* fix(filetype): make sure buffer is valid before call nvim_buf_call (#24922)Hongbo Liu2023-08-30
|
* vim-patch:2ac708b54866Christian Clason2023-08-30
| | | | | | | | | | runtime(sh): Update ftplugin (vim/vim#12950) Remove :Help command via the undo_ftplugin mechanism. https://github.com/vim/vim/commit/2ac708b548660b232a32c52d89bde3d8596646c0 Co-authored-by: dkearns <dougkearns@gmail.com>
* vim-patch:a5eb6785efccChristian Clason2023-08-30
| | | | | | | | | | runtime(doc): mention special case of i_CTRL-R_- closes: vim/vim#12947 https://github.com/vim/vim/commit/a5eb6785efcc36a97e071722408acc20d6c6e606 Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:3ac2d3da5fdfChristian Clason2023-08-30
| | | | | | | | runtime(heex): Add HEEX comments to match_words in ftplugin (vim/vim#12957) https://github.com/vim/vim/commit/3ac2d3da5fdf20dfddb450a49502ef47b1f581d4 Co-authored-by: Jason King <jk@handle.it>
* fix(builtin): fix incorrect optional fields for fn.sign_defineJongwook Choi2023-08-30
| | | | The field `icon` is not a mandatory field.
* vim-patch:0382f05dbd65Christian Clason2023-08-29
| | | | | | | | runtime: Set b:undo_indent where missing (vim/vim#12944) https://github.com/vim/vim/commit/0382f05dbd659d8e39ee4e71c1e5062ac5c0a8fd Co-authored-by: dkearns <dougkearns@gmail.com>
* vim-patch:f937ab32a1acChristian Clason2023-08-29
| | | | | | | | runtime: Set b:undo_ftplugin where missing (vim/vim#12943) https://github.com/vim/vim/commit/f937ab32a1ac3a560f217ca4ce8305ab2d5b0b74 Co-authored-by: dkearns <dougkearns@gmail.com>
* fix(treesitter): update folds only once on InsertLeaveJaehwang Jung2023-08-29
| | | | | | | | | | Problem: With treesitter fold, InsertLeave can be slow, because a single session of insert mode may schedule multiple fold updates in on_bytes and on_changedtree. Solution: Don't create duplicate autocmds.
* feat(terminal): allow :terminal to take modifiers (#15427)Gregory Anders2023-08-28
| | | | | | | | | | | The following modifiers are all now supported: :tab term :vertical term :horizontal term :botright term :topleft term Fixes: https://github.com/neovim/neovim/issues/11385
* vim-patch:535b9e12d02fChristian Clason2023-08-28
| | | | | | | | | | runtime(typescript): Fix highlighting symbols after number literal (vim/vim#12911) fixes vim/vim#12831 https://github.com/vim/vim/commit/535b9e12d02f5fef969fb680d579c586bd5f40db Co-authored-by: Herrington Darkholme <2883231+HerringtonDarkholme@users.noreply.github.com>
* fix(editorconfig): do not set 'endofline'Lewis Russell2023-08-27
| | | | | | | | | | | Problem: 'endofline' can be used to detect if a file ends of <EOL>, however editorconfig can break this. Solution: Set 'endofline' during BufWritePre Fixes: #24869
* docs: update luvref.txt for version infozhaozg2023-08-27
| | | | fixup: #24874
* feat(builtin): improve typesLewis Russell2023-08-27
|
* fix(types): add some return/parameter type annotations (#24867)Maria José Solano2023-08-27
| | | | | * fix(types): add some return/parameter type annotations * fix(types): narrow stdpath parameter further
* fix(treesitter): validate window before updating preview highlightsMaria José Solano2023-08-27
|
* build(deps): bump tree-sitter-python to v0.20.4Sanchayan Maity2023-08-27
|
* build(deps): bump luv to HEAD dcd1a1czhaozg2023-08-27
|
* feat(highlight): add `FloatFooter` highlight groupEvgeni Chasnovski2023-08-26
| | | | | | Problem: No clear separation of floating title and footer highlighting. Solution: Add new `FloatFooter` highlight group.
* feat(float): implement footerEvgeni Chasnovski2023-08-26
| | | | | | | | Problem: Now way to show text at the bottom part of floating window border (a.k.a. "footer"). Solution: Allows `footer` and `footer_pos` config fields similar to `title` and `title_pos`.
* docs(megpack_rpc): add news entry for msgpack-rpc client typeAlisue2023-08-26
|
* docs(msgpack_rpc): add "msgpack-rpc" client typeAlisue2023-08-26
|
* docs: various clarifications (#24876)zeertzjq2023-08-26
|
* feat(treesitter): add a query editor (#24703)Maria José Solano2023-08-25
|
* refactor(termdebug): reindent some thingsSean Dewar2023-08-25
| | | | Mostly to make it more consistent and to match Vim more where applicable.
* vim-patch:3d3a9152fa6dSean Dewar2023-08-25
| | | | | | | | | | | | | | | | | | | | | | runtime(termdebug): more termdebug fixes and improvements (vim/vim#12892) - Fix and attempt to simplify :Frame/:Up/:Down documentation. - Accept a count instead for :Up/:Down/+/-. - Update the "Last Change" dates. - Fix a missing :let (caused an error if gdb fails to start). - Wipe the prompt buffer when ending prompt mode (if it exists and wasn't wiped by the user first). Avoids issues with stale prompt buffers (such as E95 when starting a new prompt mode session). - Kill the gdb job if the prompt buffer is unloaded (similar to what's done for a terminal buffer). Fixes not being able to start a new termdebug session if the buffer was wiped by the user, for example. https://github.com/vim/vim/commit/3d3a9152fa6de7038fdfd6d6de25230ed825552a
* vim-patch:2ae7ffe0bc3cSean Dewar2023-08-25
| | | | | | | | | | | | | | | | runtime(termdebug): add frame related commands (vim/vim#12511) implementing `:Frame`, `:Up` and `:Down' https://github.com/vim/vim/commit/2ae7ffe0bc3c3ed9fcae35ef23a2b78908580201 Use maparg() for saving K as it's since been ported (and supports Lua callbacks and the other API fields). Use the 3 argument variant of mapset(), as the single argument one isn't ported yet (v8.2.4861). Co-authored-by: Simon Sobisch <simonsobisch@web.de>
* fix(termdebug): send SIGINT when interrupting prompt modeSean Dewar2023-08-25
| | | | | | | | | | | | | Unlike Vim's job_stop(), Nvim's jobstop() does not take a signal argument, and always sends SIGTERM/KILL. :Stop and Ctrl-C in prompt mode is supposed to interrupt the program like in terminal mode, not kill GDB. Also, maybe libuv's kill() works on Windows? If so, the logic above could be removed, but I don't have a Windows machine available to test that. Also "set nomodified" when ending prompt mode, like Vim (avoids E37).
* vim-patch:a76f3221cdcfSean Dewar2023-08-25
| | | | | | | | | | | | | | | | | | | | | | | runtime(termdebug): Fix various Termdebug issues (vim/vim#12875) * Fix some Termdebug issues after vim/vim#12403 * Fix :Asm in Termdebug prompt mode * Fix Termdebug s:DecodeMessage escaping logic https://github.com/vim/vim/commit/a76f3221cdcfff6880213839de4d04cf0c7c60f8 Adjust disassembly message forwarding for Nvim, as its callback can receive many lines at once. Currently, just forward each disassembly line individually to s:CommOutput(); it's possible to do this in batch instead, but this is simpler. I suggested moving to a GDB MI-based approach for the disassemble stuff upstream, which should simplify the logic a lot if implemented (and possibly allow for getting rid of the `&"disassemble ...` special-casing). Also, correct "(gdb)" to include a trailing space; the stray GDB prompts were being ignored by s:CommOutput() anyway, so this had caused no ill effects.
* fix(termdebug): prompt mode breaks with &splitbelow setSean Dewar2023-08-25
| | | | | Unlike Vim, termopen() doesn't split, so you can't use the modifier like that. Remove the fragile :wincmd shenanigans.
* fix(termdebug): trim suffixed "\r" in CommOutputSean Dewar2023-08-25
| | | | | | | | | Vim splits lines on "\r", then trims any prefixed "\n". But in Nvim, job output lines are split on "\n" (like readfile() in binary mode), so trim any suffixed "\r" instead. This gets rid of the trailing "^M" character in messages parsed from the jobs.
* vim-patch:19968fc4ec2cSean Dewar2023-08-25
| | | | | | | | runtime(termdebug): re-indent lines (vim/vim#12857) https://github.com/vim/vim/commit/19968fc4ec2c36c7d528c7326acf43e5d663ba39 Co-authored-by: Shane-XB-Qian <shane.qian@foxmail.com>
* vim-patch:f6fb52b667eeSean Dewar2023-08-25
| | | | | | | | | | runtime(termdebug): refactor error printing (vim/vim#12856) // vs not act like exception from vim or termdebug https://github.com/vim/vim/commit/f6fb52b667eecb58bdd9b26bd462d5da61697cf7 Co-authored-by: Shane-XB-Qian <shane.qian@foxmail.com>
* vim-patch:9f2962141514Sean Dewar2023-08-25
| | | | | | | | | | | | | | | | Runtime(termdebug): Add support to view local and argument variables closes: 12403 https://github.com/vim/vim/commit/9f29621415146abc046471440515e9e34f3e57a1 Rename the existing "s:running" (#16790) to "s:gdb_running" to not clash with the "s:running" introduced in this patch (which instead relates to whether the debugged program is currently running in gdb). Keep the file `:retab`bed as before. Co-authored-by: laburnumT <flo.striker@gmail.com>
* fix(filetype): return on_detect function when matching by file contentsGregory Anders2023-08-24
|
* fix(filetype): call on_detect before setting buffer filetypeGregory Anders2023-08-24
| | | | | | | | | | | | The on_detect functions returned by filetype.lua set buffer local variables which are often used by filetype plugins. For example, the on_detect function for shell buffers sets variables such as b:is_bash or b:is_sh, which are used by the sh ftplugin. When called after setting the buffer's filetype, these variables cannot be used by the ftplugin (because they are not yet defined). Instead, call on_detect before setting the buffer filetype so that any buffer variables set by on_detect can be used in the ftplugin.
* docs(builtin): small fixes (#24861)Sean Dewar2023-08-24
| | | | Also make gen_eval_files.lua render vimdoc helpExamples properly if the line begins with the `>` marker.
* Merge pull request #24702 from seandewar/vim-1688938dd5acSean Dewar2023-08-24
|\ | | | | vim-patch:1688938dd5ac,96d6c4aabed1,e8d6f03f6a61