aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/provider
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.
* refactor(api): omit optional paramJustin M. Keyes2026-07-13
|
* 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(provider): support python3.14 #38419Eisuke Kawashima2026-03-22
| | | Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
* 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`.
* feat(provider): detect venv python via "pynvim-python" tool #35273Michael Henry2025-08-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Detection of the pynvim module is currently done by finding the first Python interpreter in the `PATH` and checking if it can import pynvim. This has several problems: - Activation of an unrelated Python virtual environment will break automatic detection, unless pynvim is also installed in that environment. - Installing pynvim to the expected location is difficult. User installation into the system-wide or user-wide Python site area is now deprecated. On Ubuntu 24.04 with Python 3.12, for example, the command `pip install --user pynvim` now fails with the error message `error: externally-managed-environment`. - Users may create a dedicated virtual environment in which to install pynvim, but Nvim won't detect it; instead, they must either activate it before launching Nvim (which interferes with the user of other virtual environments) or else hard-code the variable `g:python3_host_prog` in their `init.vim` to the path of the correct Python interpreter. Neither option is desirable. Solution: Expose pynvim's Python interpreter on the `PATH` under the name `pynvim-python`. Typical user-flow: 1. User installs either uv or pipx. 2. User installs pynvim via: ``` uv tool install --upgrade pynvim # Or: pipx install --upgrade pynvim ``` With corresponding changes in pynvim https://github.com/neovim/pynvim/issues/593 the above user-flow is all that's needed for Nvim to detect the installed location of pynvim, even if an unrelated Python virtual environments is activated. It uses standard Python tooling to automate the necessary creation of a Python virtual environment for pyenv and the publication of `pynvim-python` to a directory on `PATH`.
* 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(provider)!: drop Python 3.7, 3.8 support #33088v1nh1shungry2025-03-28
| | | | | | Problem: #33022 didn't update `min_version` to 3.9, therefore Python 3.7 and 3.8 are still available. Solution: Update `min_version` to 3.9.
* feat(provider/python)!: add python 3.13, drop 3.7 and 3.8 (EOL) #33022Eisuke Kawashima2025-03-22
| | | | | https://devguide.python.org/versions/ Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
* 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 ```
* docs: move vim.health documentation to lua.txtdundargoc2024-05-22
| | | | | | `vim.health` is not a "plugin" but part of our Lua API and the documentation should reflect that. This also helps make the documentation maintenance easier as it is now generated.
* refactor!: remove `nvim` and `provider` module for checkhealthdundargoc2024-05-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The namespacing for healthchecks for neovim modules is inconsistent and confusing. The completion for `:checkhealth` with `--clean` gives ``` nvim provider.clipboard provider.node provider.perl provider.python provider.ruby vim.lsp vim.treesitter ``` There are now three top-level module names for nvim: `nvim`, `provider` and `vim` with no signs of stopping. The `nvim` name is especially confusing as it does not contain all neovim checkhealths, which makes it almost a decoy healthcheck. The confusion only worsens if you add plugins to the mix: ``` lazy mason nvim nvim-treesitter provider.clipboard provider.node provider.perl provider.python provider.ruby telescope vim.lsp vim.treesitter ``` Another problem with the current approach is that it's not easy to run nvim-only healthchecks since they don't share the same namespace. The current approach would be to run `:che nvim vim.* provider.*` and would also require the user to know these are the neovim modules. Instead, use this alternative structure: ``` vim.health vim.lsp vim.provider.clipboard vim.provider.node vim.provider.perl vim.provider.python vim.provider.ruby vim.treesitter ``` and ``` lazy mason nvim-treesitter telescope vim.health vim.lsp vim.provider.clipboard vim.provider.node vim.provider.perl vim.provider.python vim.provider.ruby vim.treesitter ``` Now, the entries are properly sorted and running nvim-only healthchecks requires running only `:che vim.*`.
* refactor: rewrite ruby provider in luadundargoc2024-01-24
|
* refactor: rewrite perl provider in luadundargoc2024-01-24
|
* refactor: rewrite python provider in luadundargoc2024-01-22