mirror of
https://github.com/smoka7/hop.nvim.git
synced 2026-11-30 10:34:32 -06:00
* chore: add small profile (timing) script Run it with `make profile`, which runs scripts doing `hop.setup` with different settings, and print the elapsed time (in nanoseconds). This would be helpful to determine the cost of setup. Currently mainly target on the `match_mappings` option, when all mappings were loaded, it increases time about 0.3 ms on my machine. * chore: load match_mappings on demand - In setup, only prepare an empty loaded_mappings table. - When really using the feature (only in mappings.checkout), try load the wanted tables (e.g., zh_sc) on demand. - Notify user if the loading failed. Rather than raising E5108 with lua not-found error (original behavior).
14 lines
489 B
Makefile
14 lines
489 B
Makefile
# run tests located at «lua/tests/» (files named *_spec.lua)
|
|
TESTS_INIT=tests/minimal_init.lua
|
|
TESTS_DIR=tests/
|
|
PROFILE_DIR=tests/profile/
|
|
|
|
.PHONY: test profile
|
|
|
|
test:
|
|
nvim --headless --noplugin -u ${TESTS_INIT} -c "PlenaryBustedDirectory ${TESTS_DIR} { minimal_init = '${TESTS_INIT}' }"
|
|
|
|
profile:
|
|
@nvim --headless --noplugin -u ${PROFILE_DIR}init.lua -V1 -l '${PROFILE_DIR}setup.lua'
|
|
@nvim --headless --noplugin -u ${PROFILE_DIR}init.lua -V1 -l '${PROFILE_DIR}setup_mappings.lua'
|