aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/provider/health.lua
Commit message (Collapse)AuthorAge
* fix(health): stop timed-out provider probe jobs #42390Volodymyr Chernetskyi4 days
| | | | | | | | | | Problem: The timeout handler raises an error before jobstop(), leaving the provider probe running after the healthcheck fails. Solution: Stop the job before raising the timeout error. AI-assisted
* fix(health): run provider probes only once #42391Volodymyr Chernetskyi4 days
| | | | | | | | | | | | | Problem: Provider checks start and wait for a job, then execute the same command again to obtain its output. The returned output can disagree with the first process's exit status, and the second execution has no timeout. Solution: Return the first job's captured output. Bind the output callbacks to their state and preserve line breaks between callback data entries. Cover invocation count, multiline stdout, and merged stderr. AI-assisted
* fix(lua): enable param-type-mismatch diagnosticLewis Russell2026-09-28
| | | | | | | | | Problem: Argument type mismatches are excluded from EmmyLua checks. Solution: Correct runtime annotations and calls, document local checker workarounds, and enable the diagnostic. AI-assisted
* fix(lua): enable nil-safety diagnostics in runtime codeLewis Russell2026-09-25
| | | | | | | | | | | | Enable EmmyLua's need-check-nil diagnostic and resolve nullable values through more precise types, explicit invariants, and guards for missing runtime state. Keep analyzer-specific workarounds local and update the affected API documentation. Exclude the bundled re.lua from analysis so its nil-check warnings do not fail CI. AI-assisted
* fix(lua): add missing param annotations (#41911)Lewis Russell2026-09-15
|
* build: enable more EmmyLua checksLewis Russell2026-09-08
| | | | | | | | | | | | | | | | - call-non-callable - missing-fields - redefined-label - redefined-local - undefined-field - unreachable-code Promote redefined-local and unreachable-code to warnings. Fix DOS line-ending handling for multiline semantic tokens, and support intersection types in the help parser. AI-assisted
* fix(health): restore pynvim version lookup #41619Volodymyr Chernetskyi2026-09-02
| | | | | | | | | | | | | | | | | | Problem: Fallback pynvim version lookup is broken since Vimscript-to-Lua rewrite. - `vim.fs.basename()` returns the module filename instead of the directory needed to discover adjacent metadata. This produces an empty metadata list, hiding the remaining issues. - `table.sort()` requires a Boolean comparator, while `vim.version.cmp()` returns a number. - `table.sort()` sorts in place and returns no value, so assigning its result discards the metadata list. Solution: - Use `vim.fs.dirname()` to discover adjacent package metadata. - Use `vim.version.gt()` as the descending Boolean comparator. - Sort the metadata list in place. This restores fallback version detection when `neovim.VERSION` is unavailable.
* fix(health): don't check node package via yarn #40572Barrett Ruth2026-07-04
|
* feat(lua)!: vim.isnil, vim.nonnil, deprecate vim.F #39495Olivia Kinnear2026-05-06
|
* feat(provider): support bun as node.js provider #38517Owen2026-04-12
| | | | | | | | | Problem: Neovim's Node.js provider does not support the Bun package manager. PR #26829 attempted to add this but used a hardcoded path and was abandoned. Solution: - Use `bun pm bin -g` to dynamically locate the global binary directory. - Update `health.lua` to recognize bun installations.
* fix(checkhealth): don't wrap command in cmd.exe (#38158)zeertzjq2026-03-05
| | | This was introduced in #6608 and is unnecessary since #9516 and #31109.
* refactor(lua): use vim.fs instead of fnamemodifyYochem van Rosmalen2026-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | Although powerful -- especially with chained modifiers --, the readability (and therefore maintainability) of `fnamemodify()` and its modifiers is often worse than a function name, giving less context and having to rely on `:h filename-modifiers`. However, it is used plenty in the Lua stdlib: - 16x for the basename: `fnamemodify(path, ':t')` - 7x for the parents: `fnamemodify(path, ':h')` - 7x for the stem (filename w/o extension): `fnamemodify(path, ':r')` - 6x for the absolute path: `fnamemodify(path, ':p')` - 2x for the suffix: `fnamemodify(path, ':e')` - 2x relative to the home directory: `fnamemodify(path, ':~')` - 1x relative to the cwd: `fnamemodify(path, ':.')` The `fs` module in the stdlib provides a cleaner interface for most of these path operations: `vim.fs.basename` instead of `':t'`, `vim.fs.dirname` instead of `':h'`, `vim.fs.abspath` instead of `':p'`. This commit refactors the runtime to use these instead of fnamemodify. Not all fnamemodify calls are removed; some have intrinsic differences in behavior with the `vim.fs` replacement or do not yet have a replacement in the Lua module, i.e. `:~`, `:.`, `:e` and `:r`.
* fix(health): errors in :checkhealth with pyenv-virtualenv #35865SkrrtBacharach2025-09-21
| | | | | | | | | | | Problem: pyenv-virtualenv sets a different path for VIRTUAL_ENV than the path to the python binary it provides, but these paths both symlink to the same file, so there should be no disparity. The python health-check reports an error, since it only checks if these paths are equal, not where they point to (resolve to). Solution: - Resolve the python symlinks before checking if they are equal. - Deduplicate some code.
* fix(health): hard fail on invalid "python-*" bin #35382Judit Novak2025-09-18
| | | | | | | | | | | | | | | Problem: Scripts named with 'python-…' prefix may not be valid python bins. If such a script is found in a venv, the Python healthcheck fails hard. .venv/python-argcomplete-check-easy-install-script .venv/bin/python3.13 .venv/bin/python Solution: - Discard known false-positives such as `python-argcomplete*`. - Call `health.warn()` instead of `assert()` in `python_exepath()`. Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* fix(health): update advice for Python #35564Michael Henry2025-08-31
| | | | | Problem: `:checkhealth` advice for Python is out-of-date. Solution: Update the advice to point to `:help provider-python`.
* refactor(lua): use vim.system #34707Yochem van Rosmalen2025-07-23
|
* fix(checkhealth): check outdated pynvim version properly #33175zeertzjq2025-03-30
| | | Fixes #33174, a regression from #22962.
* fix(checkhealth): check g:loaded_xx_provider for all providers #33168Justin M. Keyes2025-03-29
|
* fix: resolve all remaining LuaLS diagnosticsLewis Russell2025-01-27
|
* docs: miscdundargoc2024-10-23
| | | | | | | Co-authored-by: David Pedersen <limero@me.com> Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: Leo Schlosser <Leo.Schlosser@Student.HTW-Berlin.de> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fix(vim.fs): dirname() returns "." on mingw/msys2 #30480Justin M. Keyes2024-09-23
| | | | | | | | | | Problem: `vim.fs.dirname([[C:\User\XXX\AppData\Local]])` returns "." on mingw/msys2. Solution: - Check for "mingw" when deciding `iswin`. - Use `has("win32")` where possible, it works in "fast" contexts since b02eeb6a7281df0561a021d7ae595c84be9a01be.
* fix(health): fix pyenv root and python exepath detect issueAbao Zhang2024-07-24
| | | | | | | | | | | | | | | | | | Fix the following two issues: - pyenv root detection issue When `PYENV_ROOT` environment variable is not set, neovim will detect pyenv's root via `pyenv root` command, but which will be always fail because `vim.fn.system()` returns result with additional `\n`. Using `vim.system` instead prevents this problem. to trim it before check whether it is exists - python executable path detection issue Filter unrelated `python-config` in cases where multiple python versions are installed, e.g. `python-config`, `python3.10-config`, `python3.11-config` etc.
* fix(health): fix fetching url with python in provider health (#29594)Stanislav Asunkin2024-07-07
|
* refactor(lua): use tuple syntax everywhere #29111Ilia Choly2024-06-04
|
* refactor: fix luals type warningsdundargoc2024-05-27
|
* refactor: move provider-related to where they are useddundargoc2024-05-25
|
* refactor: replace deprecated vim.loop with vim.uvdundargoc2024-05-24
|
* fix: merge all provider healthchecks into a single health.luadundargoc2024-05-22
This will help manage the overly granular checkhealth completion to go from ``` vim.health vim.lsp vim.provider.clipboard vim.provider.node vim.provider.perl vim.provider.python vim.provider.ruby vim.treesitter ``` to ``` vim.health vim.lsp vim.provider vim.treesitter ```