aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/health
Commit message (Collapse)AuthorAge
* fix(health): report when 'paste' is enabled #42389Volodymyr Chernetskyi4 days
| | | | | | | | | | Problem: The configuration check compares the boolean 'paste' option to 1, so it never reports that the option is enabled. Solution: Check the boolean value directly and cover enabled and disabled states. AI-assisted
* ci(lua): enable annotation and style checksLewis Russell2026-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: - annotation-usage-error and code-style-check are disabled. - vim.inspect relies on a dummy self-assignment for docgen, and its help omits parameter and option details. - LuaLS fallback types obscure iterator inference. - Docgen hardcodes public function names and appends separately sorted files, leaving shared helpers under the inspector heading. Solution: - Enable annotation-usage-error and code-style-check, and fix misplaced annotations. - Document vim.inspect's callable module directly, removing the dummy assignment. Describe its parameters, option defaults and process callback. - Remove LuaLS iterator fallbacks, correct iterator signatures and check values that the improved inference identifies as optional. - Parse callable modules, require bindings and parent module references. Derive public names and inherited function docs from these links, including missing help for vim.async.semaphore() and vim.version(). - Export vim.lsp.tagfunc directly with lazy loading and document its implementation instead of maintaining a wrapper. - Group files in section_order, replacing append_only and merge_files. Merge declarations before sorting each section, placing shared helpers in the main vim section and keeping vim.inspect in alphabetical order. - Add basic parser coverage for callable modules and module links. 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 unnecessary-assert diagnosticLewis Russell2026-09-28
| | | | AI-assisted
* fix(lua): enable assignment type checking in runtime codeLewis Russell2026-09-25
| | | | | | | | | | | Enable EmmyLua's assign-type-mismatch diagnostic after correcting the runtime annotations and assignments it flags. Correct option, tuple, and return types, and use separate locals when a value changes representation. Add guards and narrow casts where needed so the runtime passes the stricter check. Regenerate the affected docs. 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
* perf(lua): share compatible file watchersLewis Russell2026-09-24
| | | | | | | | | | | | | | | | | | Problem: LSP servers can register identical file watchers before removing old registrations. Each registration creates another watcher tree, making setup and teardown expensive in large workspaces. Solution: Move glob compilation into vim._watch and accept rules for multiple roots alongside existing single-path and LPeg inputs. Share compatible backends until their last subscription is cancelled. Ref: #23291 AI-assisted
* fix(lua): add missing param annotations (#41911)Lewis Russell2026-09-15
|
* feat(health): async healthchecks #41673Barrett Ruth2026-09-11
| | | | | | | | | Problem: :checkhealth blocks as healthchecks perform slow work. Solution: Partially fix it: run Lua healthchecks in vim.async tasks and await vim.health subprocesses. Existing synchronous checks still block until they leverage the new apis.
* build: enable more EmmyLua checksLewis Russell2026-09-09
| | | | | | | | | | Enable checks for unused code, deprecated calls, return types, and annotations. Fix the warnings and replace the deprecated highlight function. Keep exceptions where old APIs are still needed or the checker gets it wrong. AI-assisted
* fix(health): correct reporting messages #41632Volodymyr Chernetskyi2026-09-02
| | | | | | | | | | | | | Problems: - Slow shell check measures time in nanoseconds, but reports seconds. - `kdch1` check incorrectly tests `kbs_entry` instead. - curl version is passed as an advice, so it is never reported. Solutions: - Scale the elapsed time to seconds before reporting. - Test `kdch1_entry` for `kdch1` check. - Format curl warning with `string.format()`. AI-assisted
* fix(health): powershell "echo" fails without an arg #41477Rafli Surya Wijaya2026-08-26
|
* feat(health): improvements to :checkhealth #40935Olivia Kinnear2026-07-24
| | | | | | | Changes: - Removed the blank line before the first healthcheck header. - Fixed a bug where the entire "Terminal" section of `vim.health` would not appear if the `infocmp` executable was not found. - Fixed a typo in `vim.lsp` when displaying the LSP log level.
* feat(health): rearrange vim.ui.img checks #40782Olivia Kinnear2026-07-17
|
* feat(health): report ulimit infoJustin M. Keyes2026-07-01
| | | | | | | | | Problem: Nvim shows `(libuv) kqueue(): Too many open files` on macos. ref https://github.com/neovim/neovim/issues/40238 Solution: Add a healthcheck for this situation.
* fix(health): check more "old" filesJustin M. Keyes2026-06-20
|
* refactor: introduce nvim_on internally #39883Justin M. Keyes2026-05-20
| | | | | | | | | Problem: `nvim_create_autocmd` is too verbose and its `callback` requires extra "nesting". Solution: Introduce `nvim_on`. Start using it internally. Then we can get a feel for how it should look before making it public.
* fix(health): "Create bug report" buttonJustin M. Keyes2026-05-20
|
* fix(health): cleanup LSP healthcheckJustin M. Keyes2026-05-20
| | | | | | | | | Problem: filewatcher and position-encoding info is reported after the big list of client details. Solution: - report the info in the top-level, not in dedicated subsections.
* feat(fswatch): report filewatchers in :checkhealthJustin M. Keyes2026-05-20
|
* fix(health): workaround nil vim.system():wait() resultJustin M. Keyes2026-04-20
| | | | Workaround until https://github.com/neovim/neovim/issues/37922 is fixed.
* refactor: update usages of deprecated "buffer" param #39089Justin M. Keyes2026-04-15
|
* fix(health): recognize Zig build optimization levels #38804Dan Drennan2026-04-08
| | | | | | | | | | | | Problem: When Neovim is built with Zig, `:checkhealth` falsely reports "Non-optimized debug build" for release builds. The extraction regex stops at the first space, and the validation regex only lists CMake build type names. Solution: Fix the extraction regex to capture the full build type string and add Zig optimization levels (ReleaseFast, ReleaseSafe, ReleaseSmall) to the validation regex. AI-assisted: Claude Code
* refactor: integer functions, optimize asserts #34112Lewis Russell2026-03-12
| | | | | | | | | | | | refactor(lua): add integer coercion helpers Add vim._tointeger() and vim._ensure_integer(), including optional base support, and switch integer-only tonumber()/assert call sites in the Lua runtime to use them. This also cleans up related integer parsing in LSP, health, loader, URI, tohtml, and Treesitter code. supported by AI
* docs: use "ev" convention in event-handlersJustin M. Keyes2026-03-12
| | | | | | | | | Problem: In autocmd examples, using "args" as the event-object name is vague and may be confused with a user-command. Solution: Use "ev" as the conventional event-object name.
* fix(health): improve version check for nightly builds #38147glepnir2026-03-06
| | | | | | | | | Problem: nightly builds were always compared against HEAD, causing false outdated warnings. Solution: fetch both HEAD and refs/tags/nightly, match local commit against HEAD first, fall back to nightly if no match. Fix #38141
* fix(health): check more "old" files #38028Justin M. Keyes2026-02-23
|
* fix(health): avoid silent failureJustin M. Keyes2026-02-12
|
* docs: lsp, options, promptbufJustin M. Keyes2026-02-12
| | | | | | | | | | | | | Close #37630 Close #37682 Close #37762 Close #37785 Co-authored-by: Daniel Schmitt <d.schmitt@lansoftware.de> Co-authored-by: Duane Hilton <duane9@gmail.com> Co-authored-by: NeOzay <colpaert.benoit@gmail.com> Co-authored-by: Yi Ming <ofseed@foxmail.com> Co-authored-by: "Justin M. Keyes" <justinkz@gmail.com>
* fix(health): check stable release for non-nightly build #36715glepnir2026-02-10
| | | | | | | Problem: Nvim version is always compared to latest upstream HEAD. Solution: If current Nvim is not a nightly build, check upstream stable version.
* 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): use FileType autocmd for bug report winbar #37486glepnir2026-01-27
| | | | | | | Problem: In float mode, vim.schedule() may run before filetype is set, so winbar is not shown. Solution: Use FileType autocmd to ensure winbar is set after filetype. Also use type=Bug in URL.
* feat(health): check `vim.ui.open()` tool #37569skewb1k2026-01-27
| | | | | | | | | Problem: `:checkhealth` does not report when no `vim.ui.open()` handler is available. Solution: Factor command resolution into `_get_open_cmd()` and reuse it from `:checkhealth` to detect missing handlers.
* fix(health): show full curl outputChristian Clason2026-01-17
| | | | | | | Problem: The health check for `curl` strips the first line of the version output, which contains potentially useful information. Solution: Only trim empty lines.
* docs: misc (#37281)zeertzjq2026-01-12
| | | | | | | Close #37289 Close #37348 Co-authored-by: Marc Jakobi <marc@jakobi.dev> Co-authored-by: Anton Kesy <anton@kesy.de>
* fix(health): check shell performance using vim.fn.system() #36980Yochem van Rosmalen2025-12-15
| | | | | | | | | Problem: `vim.system()` doesn't invoke a shell, while the Vimscript function `system()` does. Solution: Revert the change from 35af766de6 and use `vim.fn.system()` again to actually invoke a shell.
* fix(health): bug-report formatting, version check #36809Justin M. Keyes2025-12-02
| | | | | | | | | Problem: Version check failed because of "equality" comparison, so a version string of "123abc" would not match "123abcdef". Solution: - Adjust verison check. - Improve bug-report formatting.
* fix(health): git check and autocmd clean #36713glepnir2025-11-26
| | | | | Problem: Incorrect Git check and improper autocmd cleanup Solution: Add once to the autocmd and fix the Git check condition
* feat(health): create a bug report #31842glepnir2025-11-25
| | | | | | | | | Problem: Creating a bug report is somewhat tedious for users. Bug reports sometimes are missing useful info. Solution: Add a feature to :checkhealth which automatically gets system info and includes it in a new bug report.
* fix(pack): relax minimal Git version to be 2.0 #36573Evgeni Chasnovski2025-11-16
| | | | | | | | | | | Problem: Current requirement is Git>=2.36 as `--also-filter-submodules` flag for `git clone` was introduced there. This is problematic since default Git version on Ubuntu 22.04 is 2.34. Solution: Relax minimal Git version to be (at least) 2.0 by selectively applying necessary flags based on the current Git version. As 2.0.0 was released in 2014-05-28 (almost the same age as Neovim project itself), it is reasonable to drop any mention and checks on minimal version altogether.
* fix(health): attempt to concatenate table value #36369Justin M. Keyes2025-10-28
|
* fix(health): accept TERM=tmux-direct #35511Meriel Luna Mittelbach2025-08-27
| | | | | tmux-direct is functionally the same as tmux-256color, except it directly reports 24-bit color and how to set them (setaf/setab) via ncurses 6.x's extended terminfo format.
* refactor(lua): use vim.system #34707Yochem van Rosmalen2025-07-23
|
* feat(net): vim.net.request(), :edit [url] #34140Tom Ampuero2025-07-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Nvim depends on netrw to download/request URL contents. Solution: - Add `vim.net.request()` as a thin curl wrapper: - Basic GET with --silent, --show-error, --fail, --location, --retry - Optional `opts.outpath` to save to a file - Operates asynchronously. Pass an `on_response` handler to get the result. - Add integ tests (requires NVIM_TEST_INTEG to be set) to test success and 404 failure. - Health check for missing `curl`. - Handle `:edit https://…` using `vim.net.request()`. API Usage: 1. Asynchronous request: vim.net.request('https://httpbingo.org/get', { retry = 2 }, function(err, response) if err then print('Fetch failed:', err) else print('Got body of length:', #response.body) end end) 2. Download to file: vim.net.request('https://httpbingo.org/get', { outpath = 'out_async.txt' }, function(err) if err then print('Error:', err) end end) 3. Remote :edit integration (in runtime/plugin/net.lua) fetches into buffer: :edit https://httpbingo.org/get
* fix(health): bad format() call #34904Justin M. Keyes2025-07-12
| | | | | | | | | | Problem: Bad format() call on PUC Lua #34901 Error: Failed to run healthcheck for "vim.health" plugin. Exception: runtime/lua/vim/health/health.lua:89: bad argument #1 to 'format' (string expected, got nil) Solution: Avoid passing nil.
* feat(pack): add built-in plugin manager `vim.pack`Evgeni Chasnovski2025-07-04
| | | | | | | | Problem: No built-in plugin manager Solution: Add built-in plugin manager Co-authored-by: Lewis Russell <lewis6991@gmail.com>
* refactor(health): use vim.system():wait() #34702Tom Ampuero2025-06-29
| | | | | | | Problem: - The ripgrep probe still used the legacy `vim.fn.system()` Solution: - Replace `vim.fn.system()` with `vim.system({rg_path, '-V'}):wait()`
* fix(checkhealth): check g:loaded_xx_provider for all providers #33168Justin M. Keyes2025-03-29
|
* fix(provider): misleading :checkhealth if user sets ↵Sathya Pramodh2025-03-29
| | | | | | | | | | | | g:loaded_python3_provider=1 #32696 Problem: :checkhealth shows a confusing message if user sets g:loaded_python3_provider=1. Solution: - Show a warning if that var is set to 1. - Update provider modules to default to 0. Any user code that is checking for 1, is like already broken because these may be set to 2.
* fix: resolve all remaining LuaLS diagnosticsLewis Russell2025-01-27
|