Commit Graph

112 Commits

Author SHA1 Message Date
Folke Lemaitre 7d3f69104f
fix(rocks): better errors / warnings when something goes wrong with luarocks 2024-06-25 13:23:25 +02:00
Folke Lemaitre 62a47b921f
fix(loader): no need to check plugin.dir in auto_load 2024-06-24 23:42:53 +02:00
Folke Lemaitre 1446f6cfbb
perf: minimize meta rebuild when loading specs 2024-06-24 21:56:43 +02:00
Folke Lemaitre fcfd54835d feat: spec.rocks is no longer needed & added support for installing any luarock 2024-06-24 17:15:10 +02:00
Folke Lemaitre 75ffe56f70 feat: rewrite of spec resolving 2024-06-24 17:15:10 +02:00
Folke Lemaitre f1ba2e3d05 feat: luarocks support 2024-06-24 17:15:10 +02:00
Vlad 784a726f2e
style: Set vim.opt.rtp type to vim.Option (#1498)
## Details

There is an issue in the `neodev` repo that mentions this:
[#193](https://github.com/folke/neodev.nvim/issues/193)

I think the problem comes from a combination of 2 things:

1. As mentioned in the [Reddit post](https://www.reddit.com/r/neovim/comments/1cvrilk/diagnosticwarning_after_upgrade_to_neovim_010/):
   `Nvim never had Lua type annotations for vim.opt`.
2. Setting `vim.opt.rtp` anywhere in the config will cause Lua-LS to infer the
   type for `vim.opt.rtp`. While users are unlikely to do this it does happen
   in `lazy.nvim`, in places shown in this PR.
2024-06-04 06:58:19 +02:00
Folke Lemaitre 9e157df077
feat: refactor all vim.loop -> vim.uv and add a shim when needed 2024-03-22 08:58:36 +01:00
TheSast 0694651fd3
feat(loader): warn when maplocalleader is changed after init (#1326)
* feat(loader): warn when maplocalleader is changed after init

* docs: default maplocalleader

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-03-07 17:32:07 +01:00
Folke Lemaitre 670a6fec7f
fix(manage): better support for using the default colorscheme during install. See #1277 2024-01-23 21:51:13 +01:00
Serhii Karvatskyi 312e424a08
fix(loader): when reloading, clear plugin properties cache (#1153)
See #445
2023-10-25 20:00:50 +02:00
Folke Lemaitre daab5fe280
fix(loader): dont autoload when lazy handlers have not been setup yet. Fixes #1132 2023-10-17 17:44:14 +02:00
Folke Lemaitre cdfa788881
fix(loader): fixed event check in reload. Fixes #1124 2023-10-17 08:36:11 +02:00
Folke Lemaitre c8e2091e6d
fix(plugin): dont allow `dir` changes when we already loaded files from the plugin's old dir. Show an error in this case. Fixes #993 2023-10-15 08:51:54 +02:00
Folke Lemaitre 22bf6ae04b
style: sort requires 2023-10-09 11:25:42 +02:00
Folke Lemaitre 24f6b6f1c7
fix: properly setup handlers when loading a plugin before startup (build) etc 2023-09-27 12:39:39 +02:00
Folke Lemaitre e428c5ee4b
fix(loader): getscriptinfo compat with stable. Fixes #944 2023-07-22 08:24:26 +02:00
Folke Lemaitre ea5b2e00bf
feat(loader): `LazyLoad` event with plugin name as `data` field. Useful to do stuff when a plugin loads 2023-07-12 17:21:32 +02:00
Folke Lemaitre fbb0bea2db
feat(plugin)!: `cond` is now the same as `enabled`, but skips clean 2023-07-06 15:30:01 +02:00
Folke Lemaitre 36a91320f9
fix(loader): don't run ftdetect twice for paths already on the rtp during startup. Fixes #839 2023-05-28 11:02:40 +02:00
Folke Lemaitre a6c8f22362
feat(commands): added highly experimental `Lazy reload ...` command. See #445 2023-05-27 15:19:55 +02:00
Folke Lemaitre d8a5829fda
feat(loader): when reloading, always re-source loaded vimscript files. See #445 2023-05-27 15:19:55 +02:00
Folke Lemaitre aecdaab6a6
fix(loader): reset cache before installing plugins during startup. Fixes #803 2023-05-17 19:36:00 +02:00
Folke Lemaitre 80c4decc32
fix(loader): dont clear tasks when istalling missing plugins 2023-05-17 19:35:16 +02:00
Folke Lemaitre dab6cd5080
feat(loader): added explicit support for finding the main module for mini.nvim plugins 2023-05-13 16:10:15 +02:00
Folke Lemaitre a758588008
fix(build): make sure to properly load handlers for plugins that were built during startup. Fixes #744 2023-04-24 07:54:21 +02:00
Folke Lemaitre 6b55862d2d
refactor(cache): refactor for upstreaming to `vim.loader` 2023-03-15 15:10:56 +01:00
Folke Lemaitre 21a219a825
refactor(cache): revert all `vim.cache` changes and disable it if it would ever exist 2023-03-15 09:01:00 +01:00
Folke Lemaitre ea1a044e3c
feat(cache): use `vim.cache` everywhere. poly-fill when needed 2023-03-14 19:45:22 +01:00
Folke Lemaitre 1a34636094
refactor(cache): documented the cache in preparation to upstream 2023-03-14 12:56:58 +01:00
Folke Lemaitre 9afba388fa
feat(plugin): added config.defaults.cond. Fixes #640 2023-03-14 11:19:56 +01:00
Folke Lemaitre 10f5844abf
fix(loader): never load lua files from a plugin where cond=false. Show error instead 2023-03-14 11:19:56 +01:00
Folke Lemaitre 17a3c3acea
perf: more cache optims 2023-02-14 11:00:56 +01:00
Folke Lemaitre 462633bae1
perf: new file-based cache that ensures correct rtp order (#532)
* perf: new file-based cache that ensures rtp is alweays correct and will cache all files, including those after startup

* refactor: new cache

* test: fix tests

* fix(cache): cache file names on Windows

* feat(cache): allow to disable the cache

* docs: updated cache settings
2023-02-13 12:01:56 +01:00
Folke Lemaitre c83d2aeb27
fix(loader): don't deactivate when not loaded 2023-02-10 17:47:25 +01:00
Folke Lemaitre 57a3960faf
feat: deactivate WIP 2023-02-07 23:52:02 +01:00
Folke Lemaitre 49b43def14
fix(install): dont load the colorscheme again if a `config()` of the colorscheme also loads it. Fixes #488 2023-02-07 22:59:05 +01:00
Folke Lemaitre 7160ca419e
fix(loader): load plugin opts inside a `try` clause to report errors 2023-01-15 20:00:12 +01:00
Folke Lemaitre b73312aa32
fix: use `vim.api.nvim_exec_autocmds` instead of `vim.cmd[[do]]` to prevent weird `vim.notify` behavior 2023-01-13 09:01:24 +01:00
Folke Lemaitre 2128ca90fb
feat(spec): event, keys, ft and cmd can now also be a function that returns the values to be used 2023-01-12 13:08:43 +01:00
Folke Lemaitre e77be3cf3b
fix(spec): `Plugin.opts` is now always a table. Fixes #351 2023-01-08 18:45:40 +01:00
Folke Lemaitre 7260a2b28b
feat(spec)!: setting a table to `Plugin.config` is now deprecated. Please use `Plugin.opts` instead. (backward compatible for now) 2023-01-08 15:01:58 +01:00
Folke Lemaitre 102bc2722e
fix(loader): source runtime files without `silent`. Fixes #336 2023-01-06 19:16:39 +01:00
Folke Lemaitre eed1ef3c2d
feat(commands): `:Lazy! load` now skips `cond` checks when loading plugins. Fixes #330 2023-01-06 07:11:50 +01:00
Folke Lemaitre 2ef44e2dee
fix(loader): revert change that loaded /plugin after config. Fixes #328 2023-01-05 19:43:47 +01:00
Folke Lemaitre c59c05c7a8
fix(loader): run plugin config before sourcing runtime 2023-01-04 23:17:29 +01:00
Folke Lemaitre a7ac2ad020
feat(loader): disable plugins 2023-01-04 12:40:00 +01:00
Folke Lemaitre 09fd8fabd2
fix(loader): dont show error of missing plugins if they are disabled 2023-01-04 11:02:29 +01:00
Folke Lemaitre b4d4e6b41b
fix(loader): move mapleader check to loader, so it can be set by spec files 2023-01-04 09:07:30 +01:00
Folke Lemaitre c85f929bd9
fix(install): dont try re-installing failed missing plugins during startup. Fixes #303 2023-01-03 22:50:14 +01:00