Commit Graph

47 Commits

Author SHA1 Message Date
Folke Lemaitre 8063523471
ci: added debug info when #topmods>1 2023-01-02 14:29:55 +01:00
Folke Lemaitre 0bc73db503
fix(cache): only autoload when plugins have been parsed. Needed to support `import` 2023-01-02 12:54:38 +01:00
Folke Lemaitre f6b0172e92
fix(cache): allow lazyvim as a plugin 2023-01-02 12:54:00 +01:00
Folke Lemaitre 919b7f5de3
feat(spec): added `import` to import other plugin modules 2023-01-02 09:44:28 +01:00
Folke Lemaitre 77ff7beaa4
perf(cache): cache all lua files till UIEnter instead of VimEnter 2023-01-02 09:39:28 +01:00
Folke Lemaitre 51c23b661e
fix(spec): allow a spec module to be on the rtp and not only in config 2023-01-01 20:31:34 +01:00
Folke Lemaitre 11eee43c7e
fix(cache): keep ordering of topmods the same as in rtp 2023-01-01 18:52:07 +01:00
Folke Lemaitre 730bb84364
perf(loader): re-use topmod cache to find `setup()` module 2022-12-30 20:14:46 +01:00
Folke Lemaitre def5cc5816
fix(cache): clear cached entry on errors 2022-12-30 11:52:20 +01:00
Folke Lemaitre 853d4d5838
fix(cache): added support for top level lua linked directories. Fixes #233 2022-12-29 18:40:28 +01:00
Folke Lemaitre 8544c389ab
fix(cache): always normalize modname separators 2022-12-29 18:26:39 +01:00
Folke Lemaitre 044e28bf8b
fix(cache): check package.loaded after auto-load and return existing module if present. Fixes #224 2022-12-29 09:06:23 +01:00
Folke Lemaitre b8c5ab5dae
fix(cache): reload file if compiled code is incompatible. Fixes #225 2022-12-29 08:25:24 +01:00
Folke Lemaitre e3ffcff7cc
fix(cache): ad jit.verion to cache version string. Fixes #225 2022-12-29 08:01:05 +01:00
Folke Lemaitre 95b9cf743c
fix(cache): properly get rtp during fast events 2022-12-29 01:25:17 +01:00
Folke Lemaitre 4b75d06c07
fix(cache): dont update rtp in fast events 2022-12-29 01:04:39 +01:00
Folke Lemaitre 9997523841
fix(cache): OptionSet is not triggered during startup, so use #rtp instead to see if it changed 2022-12-29 00:48:59 +01:00
Folke Lemaitre 370b1b982e
fix(cache): make it work again... #fixup 2022-12-28 23:50:25 +01:00
Folke Lemaitre 34977c2b80
perf: move autoloader to cache and always use lazy's modname path resolver which is much faster 2022-12-28 17:58:24 +01:00
Folke Lemaitre 021e54655f
feat(cache): update package.loaded on require 2022-12-28 17:58:23 +01:00
Folke Lemaitre bb53b8473c
fix(cache): never use packer paths from cache 2022-12-26 18:35:07 +01:00
Folke Lemaitre 4aa362e8dc
feat(cache): make ttl configurable 2022-12-25 16:26:17 +01:00
Folke Lemaitre cc6276e9b0
refactor!: default lazy cache path is now under cache instead of state 2022-12-23 07:48:45 +01:00
Folke Lemaitre 2200284165
fix(cache): overwrite cache entry with new modpath when loading a file. Fixes #90 2022-12-22 09:10:11 +01:00
Folke Lemaitre a345649510
fix(cache): if we can't load from the cache modpath, find path again instead of erroring right away 2022-12-21 14:56:46 +01:00
Folke Lemaitre 3606d62918
fix: add after directories to rtp to make after/ftplugin and others work. Fixes #47 2022-12-20 23:35:06 +01:00
Folke Lemaitre ffabe91b2d
fix(cache): if mod is loaded already in the loader, then return that 2022-12-20 16:41:11 +01:00
Folke Lemaitre 316503f124
fix: dont autoload cached modules when module=false 2022-12-20 16:02:22 +01:00
Folke Lemaitre 62c1542141
fix(cache): normalize paths 2022-12-20 08:31:19 +01:00
Folke Lemaitre b7bf18abd3
style: spelling 2022-12-19 21:11:33 +01:00
Folke Lemaitre 8a0da3b27e
config: move lazy cache to state/nvim/lazy/cache 2022-12-19 13:55:04 +01:00
Folke Lemaitre faac2dd11c
perf(cache): cache loadfile and no find modpaths without package.loaders 2022-12-19 13:34:37 +01:00
Folke Lemaitre 32f2b71ff8
fix(cache): do a fast check to see if a cached modpath is still valid. find it again otherwise 2022-12-19 12:21:20 +01:00
Folke Lemaitre 060cf23aca
perf: when reloading plugin specs always use cache 2022-12-16 15:08:09 +01:00
Folke Lemaitre e897524b1f
refactor: split autoload in autoload and check_load 2022-12-16 13:07:16 +01:00
Folke Lemaitre 5128d896c7
fix: destroy the cache when VIMRUNTIME has changed 2022-12-14 21:38:24 +01:00
Folke Lemaitre b2727d98a3
perf: disable cache by default on VimEnter or on BufReadPre 2022-12-03 18:59:53 +01:00
Folke Lemaitre afcba52b1a
fix: return nil when `fs_stat` fails and return nil in module loader 2022-12-02 19:16:21 +01:00
Folke Lemaitre e4cf8b1416
feat: added debug option 2022-12-02 16:52:22 +01:00
Folke Lemaitre 6fe425c91a
perf: caching strategy is now configurable 2022-12-02 12:43:34 +01:00
Folke Lemaitre e1c08d64b3
perf: merge module/cache and use ffi to pack cache data 2022-11-30 14:19:50 +01:00
Folke Lemaitre 4438faf9a9
perf: removed partial spec caching. not worth the tiny performance boost 2022-11-30 00:19:08 +01:00
Folke Lemaitre 3ec5a2ce4c
perf: run cache autosave after loading 2022-11-30 00:19:08 +01:00
Folke Lemaitre 0f5ceb9012
style: cache debug 2022-11-29 14:26:07 +01:00
Folke Lemaitre 80a2b71a09
refactor: less code for cache 2022-11-25 22:49:21 +01:00
Folke Lemaitre 2507fd5790
perf: tons of performance improvements. Lazy should now load in about 1.5ms for 97 plugins 2022-11-24 22:05:18 +01:00
Folke Lemaitre 54d5ff18f5
perf: split caching in state, cache and module 2022-11-22 21:12:33 +01:00