summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/provider
AgeCommit message (Collapse)AuthorFiles
2026-04-12feat(provider): support bun as node.js provider #38517Owen1
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.
2026-03-22fix(provider): support python3.14 #38419Eisuke Kawashima1
Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2026-03-05fix(checkhealth): don't wrap command in cmd.exe (#38158)zeertzjq1
This was introduced in #6608 and is unnecessary since #9516 and #31109.
2026-01-28refactor(lua): use vim.fs instead of fnamemodifyYochem van Rosmalen1
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`.
2025-09-21fix(health): errors in :checkhealth with pyenv-virtualenv #35865SkrrtBacharach1
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.
2025-09-18fix(health): hard fail on invalid "python-*" bin #35382Judit Novak1
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>
2025-08-31fix(health): update advice for Python #35564Michael Henry1
Problem: `:checkhealth` advice for Python is out-of-date. Solution: Update the advice to point to `:help provider-python`.
2025-08-16feat(provider): detect venv python via "pynvim-python" tool #35273Michael Henry1
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`.
2025-07-23refactor(lua): use vim.system #34707Yochem van Rosmalen3
2025-03-30fix(checkhealth): check outdated pynvim version properly #33175zeertzjq1
Fixes #33174, a regression from #22962.
2025-03-29fix(checkhealth): check g:loaded_xx_provider for all providers #33168Justin M. Keyes1
2025-03-28fix(provider)!: drop Python 3.7, 3.8 support #33088v1nh1shungry1
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.
2025-03-22feat(provider/python)!: add python 3.13, drop 3.7 and 3.8 (EOL) #33022Eisuke Kawashima1
https://devguide.python.org/versions/ Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2025-01-27fix: resolve all remaining LuaLS diagnosticsLewis Russell1
2024-10-23docs: miscdundargoc1
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>
2024-09-23fix(vim.fs): dirname() returns "." on mingw/msys2 #30480Justin M. Keyes1
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.
2024-07-24fix(health): fix pyenv root and python exepath detect issueAbao Zhang1
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.
2024-07-07fix(health): fix fetching url with python in provider health (#29594)Stanislav Asunkin1
2024-06-04refactor(lua): use tuple syntax everywhere #29111Ilia Choly1
2024-05-27refactor: fix luals type warningsdundargoc1
2024-05-25refactor: move provider-related to where they are useddundargoc1
2024-05-24refactor: replace deprecated vim.loop with vim.uvdundargoc1
2024-05-22fix: merge all provider healthchecks into a single health.luadundargoc5
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 ```
2024-05-22docs: move vim.health documentation to lua.txtdundargoc5
`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.
2024-05-19refactor!: remove `nvim` and `provider` module for checkhealthdundargoc5
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.*`.
2024-01-24refactor: rewrite ruby provider in luadundargoc3
2024-01-24refactor: rewrite perl provider in luadundargoc1
2024-01-22refactor: rewrite python provider in luadundargoc1