summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/health.lua
AgeCommit message (Collapse)AuthorFiles
2026-04-24feat(api): nvim_echo(percent=nil) means "unknown" progress #39029Peter Cardenas1
Problem: No way to signal "unknown" or "indeterminate" progress percentage. Solution: Treat percent=nil as "indeterminate" percent.
2026-04-20refactor(excmd): migrate ex_checkhealth to LuaJustin M. Keyes1
2026-03-28fix(progress): require "source" for progress-message #38514Shadman1
Problem: - Progress-events are filtered by "source". But "source" is not required by nvim_echo. - Without "++nested" (force=false), nvim_echo in an event-handler does not trigger Progress events. - vim.health does not declare a "source". Solution: - Make source mandatory for progress-messages - Enable ++nested (force=true) by default when firing Progress event. - Set "source" in vim.health module.
2026-03-21feat(lua): replace `buffer` with `buf` in vim.keymap.set/del #38360skewb1k1
The `buffer` option remains functional but is now undocumented. Providing both will raise an error. Since providing `buf` was disallowed before, there is no code that will break due to using `buffer` alongside `buf`.
2026-03-20feat(stdlib): vim.fs.ext() returns file extension #36997Yochem van Rosmalen1
Problem: Checking the extension of a file is done often, e.g. in Nvim's codebase for differentiating Lua and Vimscript files in the runtime. The current way to do this in Lua is (1) a Lua pattern match, which has pitfalls such as not considering filenames starting with a dot, or (2) fnamemodify() which is both hard to discover and hard to use / read if not very familiar with the possible modifiers. vim.fs.ext() returns the file extension including the leading dot of the extension. Similar to the "file extension" implementation of many other stdlibs (including fnamemodify(file, ":e")), a leading dot doesn't indicate the start of the extension. E.g.: the .git folder in a repository doesn't have the extension .git, but it simply has no extension, similar to a folder named git or any other filename without dot(s).
2026-03-12refactor: integer functions, optimize asserts #34112Lewis Russell1
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
2026-01-27fix(health): add back `vim.cmd.redraw()` call (#37576)Olivia Kinnear1
Was erroneously removed by #37462 during rebase.
2026-01-26fix(ui): only internal messages are unsafe #37462luukvbaal1
Problem: Fast context for msg_show event inhibits vim.ui_attach from displaying a stream of messages from a single command. Solution: Remove fast context from msg_show events emitted as a result of explicit API/command calls. The fast context was originally introduced to prevent issues with internal messages.
2026-01-26fix(health): redraw after emitting progress message #37567Olivia Kinnear1
Problem: `vim.cmd.redraw()` is not called after displaying a progress message, so vim will display progress for the previous health check, not the current one. Solution: Call `vim.cmd.redraw()` so that the correct progress message is displayed.
2026-01-09fix(health): emit Progress message #37123Yochem van Rosmalen1
Problem: The `"Running healthchecks..."` message doesn't inform the user much and is a hack from before we got a way to emit actual progress messages. Solution: Use `nvim_echo` to emit progress messages showing the name of the report that is currently running.
2025-12-17fix(health): "q" keymap not set when health.style=float #37007glepnir1
Problem: The q keymap is already set in open_floating_preview, so maparg('q') is not empty. Solution: Add a health.style check before setting the q keymap.
2025-07-08fix(health): floating window closes when opening TOC (gO) #34794glepnir1
Problem: Health check floating window gets closed when pressing 'gO' to show TOC because LSP floating preview system auto-closes on BufEnter events triggered by :lopen. Solution: Temporarily disable BufEnter event for the current window during TOC operations and adjust window layout to prevent overlap.
2025-04-27feat(checkhealth): trigger FileType event after showing report #33677Justin M. Keyes1
Problem: `FileType` event is fired before checkhealth report is finished, so user can't override report settings or contents. https://github.com/neovim/neovim/pull/33172#issuecomment-2833513916 Solution: - Trigger FileType event later. - Document how to remove emojis.
2025-04-26fix(health): checkhealth float opens extra empty buffer #33648Andre Toerien1
2025-04-09feat(health): summary in section heading #33388Yochem van Rosmalen1
Problem: As checkhealth grows, it is increasingly hard to quickly glance through the information. Solution: Show a summary of ok, warn, and error outputs per section.
2025-03-30feat(checkhealth): emoji for OK/WARN/ERROR #33172Justin M. Keyes1
Problem: Health status can be much more visually distinct. Solution: Use emoji next to each status.
2025-03-29fix(checkhealth): don't override user "q" keymap #33132phanium1
2025-03-19fix(checkhealth): module not found when `&rtp` has nested paths #32988phanium1
Problem: `:checkhealth` fail to find the module when `&rtp` have nested paths. Solution: find in order all existed `&rtp/lua` path rather than `&rtp` to ensure prefix exist before trim `&rtp`. In this case one module can be searched out from two different `&rtp/lua`, we use the first `&rtp/lua` contain the module (like how require() works).
2025-03-16fix(checkhealth): handle nested lua/ directory #32918phanium1
Problem: :checkhealth fails if plugin has nested "lua/" directory Solution: trim `{runtimepath}/lua` from fullpath to get subpath (`./**/{health, health/init.lua}`)
2025-02-26feat(lua): vim.text.indent()Justin M. Keyes1
Problem: Indenting text is a common task in plugins/scripts for presentation/formatting, yet vim has no way of doing it (especially "dedent", and especially non-buffer text). Solution: Introduce `vim.text.indent()`. It sets the *exact* indentation because that's a more difficult (and thus more useful) task than merely "increasing the current indent" (which is somewhat easy with a `gsub()` one-liner).
2025-01-27fix: resolve all remaining LuaLS diagnosticsLewis Russell1
2025-01-23fix(checkhealth): failed if 'lua' in plugin namephanium1
2025-01-09docs: misc #31867Justin M. Keyes1
2025-01-07feat(health): show :checkhealth in floating window #31086glepnir1
Problem: health can not shown in a floating window Solution: add g:health variable
2025-01-05fix(health): "q" should not close last window #31876Justin M. Keyes1
2025-01-05feat(health): close checkhealth buffers with q #31870Maria José Solano1
2025-01-05fix(health): set nomodifiable in checkhealth buffersMaria José Solano1
2024-09-26feat(health): highlight headings #30525Justin M. Keyes1
Problem: checkhealth report sections are not visually separated. Solution: Highlight with "reverse". TODO: migrate checkhealth filetype to use treesitter. TODO: default :help should also highlight headings more boldy!
2024-09-11fix(health): return correct name from 'path2name()'monkoose1
`path2name()` function doesn't process `'pluginname/health/init.lua'` correctly. Instead of retruning `'pluginname'` it returns `'pluginname.health'`
2024-09-01docs: misc #28970Justin M. Keyes1
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-24docs: extract health to its own filedundargoc1
2024-05-22docs: move vim.health documentation to lua.txtdundargoc1
`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-16feat: remove deprecated featuresdundargoc1
Remove following functions: - vim.lsp.util.extract_completion_items - vim.lsp.util.get_progress_messages - vim.lsp.util.parse_snippet() - vim.lsp.util.text_document_completion_list_to_complete_items - LanguageTree:for_each_child - health#report_error - health#report_info - health#report_ok - health#report_start - health#report_warn - vim.health.report_error - vim.health.report_info - vim.health.report_ok - vim.health.report_start - vim.health.report_warn
2024-04-22fix: unreliable "checkhealth completions" testJustin M. Keyes1
ref https://github.com/neovim/neovim/issues/19596 FAILED test/functional/plugin/health_spec.lua @ 37: :checkhealth completions can be listed via getcompletion() test/functional/plugin/health_spec.lua:40: Expected objects to be the same. Passed in: (string) 'provider.node' Expected: (string) 'provider.clipboard' stack traceback: test/functional/plugin/health_spec.lua:40: in function <test/functional/plugin/health_spec.lua:37>
2024-04-22refactor(lua): deprecate tbl_flattenJustin M. Keyes1
Problem: Besides being redundant with vim.iter():flatten(), `tbl_flatten` has these problems: - Has `tbl_` prefix but only accepts lists. - Discards some results! Compare the following: - iter.flatten(): ``` vim.iter({1, { { a = 2 } }, { 3 } }):flatten():totable() ``` - tbl_flatten: ``` vim.tbl_flatten({1, { { a = 2 } }, { 3 } }) ``` Solution: Deprecate tbl_flatten. Note: iter:flatten() currently fails ("flatten() requires a list-like table") on this code from gen_lsp.lua: local anonym = vim.iter({ -- remove nil anonymous_num > 1 and '' or nil, '---@class ' .. anonymous_classname, }):flatten():totable() Should we enhance :flatten() to work for arrays?
2024-04-13revert: "feat(health): fold successful healthchecks #22866"dundargoc1
This reverts commit 4382d2ed564b80944345785d780cf1b19fb23ba8. The story for this feature was left in an incomplete state. It was never the intention to unilaterally fold all information, only the ones that did not contain relevant information. This feature does more harm than good in its incomplete state.
2024-04-06refactor: remove fn_booldundargoc1
It's better to use vim.fn directly instead of creating minor abstractions like fn_bool.
2024-01-11fix(doc): improve doc generation of types using lpegLewis Russell1
Added a lpeg grammar for LuaCATS and use it in lua2dox.lua
2024-01-01refactor(health): refactor provider healthchecksGregory Anders1
* Prefer pure Lua functions over vim.fn * Split up provider healthchecks into separate modules to help manage complexity
2023-12-30refactor: fix luals warningsdundargoc1
2023-12-28docs: small fixes (#26651)dundargoc1
Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: WillLillis <wlillis@umass.edu>
2023-12-25feat(health): make :checkhealth support more split modifiers (#26731)zeertzjq1
2023-12-25feat(health): checkhealth buffer can show in a split window (#26714)Pablo Arias1
:checkhealth now respects :vertical and :horizontal. For example: :vertical checkhealth foo bar will open the healthcheck buffer in a vertical split.
2023-06-06feat(health): fold successful healthchecks #22866Alexandre Teoi1
Problem: checkhealth can be noisy, but we don't want to omit info. Solution: Fold OK results by default, if 'foldenable' is enabled. Resolves #22796
2023-04-16fix(checkhealth): fix crash due to incorrect argument typedundargoc1
2023-04-15refactor: deprecate checkhealth functionsdundargoc1
The following functions are deprecated and will be removed in Nvim v0.11: - health#report_start() - health#report_info() - health#report_ok() - health#report_warn() - health#report_error() - vim.health.report_start() - vim.health.report_info() - vim.health.report_ok() - vim.health.report_warn() - vim.health.report_error() Users should instead use these: - vim.health.start() - vim.health.info() - vim.health.ok() - vim.health.warn() - vim.health.error()
2023-01-16health: migrate to Lua #21661TJ DeVries1
* refactor: remove all vimscript from nvim/health * fixup: previous method broke if you had a folder named 'x-lua'