Git may complain if init.defaultBranch is not set up on the system:
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
hint:
hint: Disable this message with "git config set advice.defaultBranchName false"
Use "git init -m main" to suppress this message.
Adds a new scripts/run-luatest.sh script to provide a consistent,
self-contained way to run project unit tests, including locally.
The script handles:
- Checking for necessary tools (rg, ag)
- Cloning or updating plenary.nvim into the target/tests/deps directory
The Makefile is updated to use this new script, making make luatest the
single entry point for running unit tests.
The lua.yaml workflow is simplified to use this new make target,
ensuring the CI environment uses the exact same testing logic.
This implements mode mirroring github workflow in scripts/lua-typecheck.sh
so that it can run locally.
A supporting script scripts/setup_deps.sh is created to define and
download/clone dependencies (plugins), as well as download luals, neovim
runtime, and create luarc.json. setup_deps.sh is now the only and
authoritative source of dependencies and luals version. Neovim version
still comes from lua.yaml.
To fetch neovim version from lua.yaml as well as figure out the right
source of neovim package, dependency on yq is introduced when running
locally in "managed" mode.
Dependencies, neovim runtime, and luals are downloaded to
target/tests subdirectory on local machine. luarc.json is created
from a template there as well.
The ability to run against the live system is preserved with "--live"
option. In this case it assumes that neovim is using lazy package
manager and optionally Mason, so if luals is not present in path the
script will try to see if it is installed by Mason.
When running in github CI neovim is set up through github action while
dependencies and luals are handled by the scripts.
Instead of implementing synchronous call to a command line utility via
vim.uv.spawn() switch to using vim.system(). Its return value (object)
wait() method allows to specify timeout too.
This makes code much simpler.
As discussed in https://github.com/yetone/avante.nvim/pull/2536 the
project should either use luv bindings from luals or luvit-meta
library, but not both, as they conflict with each other (especially
with uv.uv_timer_t). Given that other projects such as kickstart.nvim
and lazydev.nvim are switching to use the former, we should do the same
and drop luvit-meta dependency.
Also adjust code that was using luvit-meta's annotations for timers.