* perf: async enum file read
Problem: parse_enums read the bash-completion file with blocking
io.open/fd:read on the main thread, stalling the event loop.
Solution: read the file via vim.uv.fs_open/fstat/read with callbacks,
running in parallel with the ghostty config system call using the
same remaining-counter pattern as the other blink-cmp plugins.
* fix: lint warning and test mocks for async file read
Problem: selene flagged unused err3 variable, and test mock_enums
still mocked io.open instead of the new vim.uv.fs_* calls.
Solution: rename err3 to _, replace io.open mock with synchronous
vim.uv.fs_open/fs_fstat/fs_read/fs_close mocks using a sentinel fd.
* feat: add healthcheck
Problem: users had no way to diagnose why completions were missing or
incomplete beyond checking for the ghostty executable.
Solution: add a :checkhealth module that verifies blink.cmp is
installed, ghostty is on PATH, +show-config --docs produces output,
and the bash completion file exists for enum values.
* fix: revert blanket diagnostics.disable and selene comments
Problem: .luarc.json blanket-disabled four diagnostic categories
project-wide, and selene inline directives were added to suppress
warnings on io.open monkey-patching in tests.
Solution: revert .luarc.json to match main and remove selene comments.
* refactor: reuse main module's bash completion path resolution in healthcheck
Problem: health.lua duplicated the entire bash completion file
resolution chain (exepath -> realpath -> prefix match -> path
construction) from the main module, risking drift if the logic changes.
Solution: extract M.bash_completion_path() from parse_enums() and call
it from both parse_enums and the healthcheck.
* perf: async cache initialization and remove deepcopy
Problem: first completion request blocked the UI with a synchronous
vim.system():wait() call, and every subsequent key completion
unnecessarily deep-copied the entire cache.
Solution: use vim.system with an async callback to initialize the cache
without blocking. Queue pending completion requests during loading and
serve them once parsing finishes. Return cached keys directly instead
of deep-copying.
* fix: revert blanket diagnostics.disable and selene comments
Problem: .luarc.json blanket-disabled four diagnostic categories
project-wide, and selene inline directives were added to suppress
warnings on io.open monkey-patching in tests.
Solution: revert .luarc.json to match main and remove selene comments.
* feat: detect ghostty config files by canonical path
Problem: enabled() only checked for the 'ghostty' filetype, but many
users have ghostty config files detected as 'config' or with no
filetype set. These users got no completions.
Solution: check canonical ghostty config directories
($XDG_CONFIG_HOME/ghostty, ~/.config/ghostty, /etc/ghostty) when the
filetype is 'config' or empty, resolving symlinks to handle indirect
paths.
* fix: revert blanket diagnostics.disable and selene comments
Problem: .luarc.json blanket-disabled four diagnostic categories
project-wide, and selene inline directives were added to suppress
warnings on io.open monkey-patching in tests.
Solution: revert .luarc.json to match main and remove selene comments.
* fix(ci): resolve selene and lua-ls CI failures
Problem: selene flags io.open assignments in test mocks as
incorrect_standard_library_use, and lua-ls reports undefined blink.cmp
types and a need-check-nil on enums_cache. These are pre-existing
issues on main that surface when Lua files change.
Solution: add targeted selene allow comments on the two io.open
mock lines, add minimal blink.cmp type stubs for lua-ls, and
include enums_cache in the nil guard.