aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_system.lua
Commit message (Collapse)AuthorAge
* fix(vim.system): invalid MAX_TIMEOUT for 32-bit systems #31638Dan Pascu2024-12-20
| | | | | | The maximum signed value on 32-bit systems is 2 ^ 31 - 1. When using 2 ^ 31 for the default timeout, the value would overflow on such systems resulting in a negative value, which caused a stack trace when calling wait() without a timeout.
* fix(vim.system): close pipe handles after process handleLewis Russell2024-12-04
| | | | Fixes #30846
* fix(vim.system): resolve executable paths on windowsLewis Russell2024-11-08
| | | | Fixes #31107
* perf(validate): use lighter versionLewis Russell2024-10-17
| | | | | - Also fix `vim.validate()` for PUC Lua when showing errors for values that aren't string or number.
* fix(vim.ui): open() may wait indefinitely #28325Justin M. Keyes2024-04-15
| | | | | | | | | | | | Problem: vim.ui.open "locks up" Nvim if the spawned process does not terminate. #27986 Solution: - Change `vim.ui.open()`: - Do not call `wait()`. - Return a `SystemObj`. The caller can decide if it wants to `wait()`. - Change `gx` to `wait()` only a short time. - Allows `gx` to show a message if the command fails, without the risk of waiting forever.
* fix(vim.system): don't process non-fast events during wait() (#27300)zeertzjq2024-02-02
| | | | | | | | Problem: Processing non-fast events during SystemObj:wait() may cause two pieces of code to interfere with each other, and is different from jobwait(). Solution: Don't process non-fast events during SystemObj:wait().
* fix(lsp): fix incorrect typing and doc for `vim.lsp.rpc`Jongwook Choi2024-01-14
| | | | | | | | | | | | Typings introduced in #26032 and #26552 have a few conflicts, so we merge and clean them up. We also fix some incorrect type annotation in the `vim.lsp.rpc` package. See the associated PR for more details. Summary: - vim.rpc.Dispatchers -> vim.lsp.rpc.Dispatchers - vim.lsp.rpc.Error -> lsp.ResponseError - Revise docs
* fix(doc): improve doc generation of types using lpegLewis Russell2024-01-11
| | | | Added a lpeg grammar for LuaCATS and use it in lua2dox.lua
* fix: windows timeouts have exit code 1Lewis Russell2023-09-05
|
* refactor(vim.system): factor out on_exit handlingLewis Russell2023-09-05
|
* fix(vim.system): make timeout work properlyLewis Russell2023-09-05
| | | | Mimic the behaviour of timeout(1) from coreutils.
* fix(vim.system): let on_exit handle cleanup after killLewis Russell2023-09-05
| | | | Fixes #25000
* fix(lua): improve annotations for stricter luals diagnostics (#24609)Christian Clason2023-08-09
| | | | | | | | | | | | | | | Problem: luals returns stricter diagnostics with bundled luarc.json Solution: Improve some function and type annotations: * use recognized uv.* types * disable diagnostic for global `vim` in shared.lua * docs: don't start comment lines with taglink (otherwise LuaLS will interpret it as a type) * add type alias for lpeg pattern * fix return annotation for `vim.secure.trust` * rename local Range object in vim.version (shadows `Range` in vim.treesitter) * fix some "missing fields" warnings * add missing required fields for test functions in eval.lua * rename lsp meta files for consistency
* docs(lua): more improvements (#24387)Lewis Russell2023-07-18
| | | | | | | | | | | | | | | | | * docs(lua): teach lua2dox how to table * docs(lua): teach gen_vimdoc.py about local functions No more need to mark local functions with @private * docs(lua): mention @nodoc and @meta in dev-lua-doc * fixup! Co-authored-by: Justin M. Keyes <justinkz@gmail.com> --------- Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* fix(vim.system): close check handle (#24270)zeertzjq2023-07-06
| | | Fix hang after running vim.system() with sanitizers.
* feat(lua): add `vim.system()`Lewis Russell2023-06-07
feat(lua): add vim.system() Problem: Handling system commands in Lua is tedious and error-prone: - vim.fn.jobstart() is vimscript and comes with all limitations attached to typval. - vim.loop.spawn is too low level Solution: Add vim.system(). Partly inspired by Python's subprocess module Does not expose any libuv objects.