Commit Graph

181 Commits

Author SHA1 Message Date
Andre Toerien 72c0dc9462
fix(git): local plugin fixes (#1624)
## Description

As I described in
https://github.com/folke/lazy.nvim/pull/1512#issuecomment-2212474372,
this makes it so that local plugins will only show as needing updates if
the local branch is behind the upstream branch. This is done by checking
the output of the `git log` command, and only setting `plugin._.updates`
if the output is not empty.

This seems to solve my issue where local plugins with unpushed changes
always show as needing updates, but if there's a easier/better way of
doing it then please feel free to edit/close this. Or if you don't agree
that the current behaviour is a bug, then that's also fine - it's not a
big deal and I can easily just ignore the "updates available" notice.

I also came across a minor issue where the plugin diff view (press `d`)
compares the wrong commits for local plugins, because
[lua/lazy/view/init.lua](c771cf4928/lua/lazy/view/init.lua (L268))
always uses `get_target`. I fixed this by moving `get_local_target` into
`get_target` - I think this is simpler and more straightforward than the
alternative of adding a ternary everywhere `get_target` is called.

This second bugfix is a very small change, so I've just included it
here, but I'm happy to make a second PR if you'd like.

## Related Issue(s)

Related PR: #1512
2024-07-07 17:13:49 +02:00
Folke Lemaitre 81d2bfffdc
fix(git): only check for new commits for local plugins. Closes #1512 2024-07-07 08:42:21 +02:00
Folke Lemaitre baac551777
fix(lockfile): keep cond=false and enabed=false in lockfile. Fixes #1535. Fixes #1606 2024-07-05 09:01:04 +02:00
Folke Lemaitre 1fad61712b
fix(async): make asyncs abortable 2024-06-30 13:35:14 +02:00
Folke Lemaitre 2f4ac035bc
perf: suspend when tasks are active 2024-06-30 09:13:04 +02:00
Folke Lemaitre c7ed87f9ca
perf: automatically suspend the scheduler when all threads are waiting (#1591)
* perf: automatically suspend the scheduler when all threads are waiting

* ci: fix ci

* test: cleanup
2024-06-30 08:48:03 +02:00
Folke Lemaitre a75d950b8f
fix(process): deal with process errors 2024-06-29 13:52:50 +02:00
Folke Lemaitre 9cf745939d
feat(task): build procs can now yield a LazyMsg for more control 2024-06-28 20:17:35 +02:00
Folke Lemaitre 2a6a2dce1b
fix(git): tagrefs 2024-06-28 18:31:12 +02:00
Folke Lemaitre ab46edbd47
perf: async render 2024-06-28 17:44:21 +02:00
Folke Lemaitre a36ebd2a75
refactor: async processes 2024-06-28 16:08:26 +02:00
Folke Lemaitre 60fe75c88d
fix(task): run on_exit async. See #1569 2024-06-28 00:35:41 +02:00
Folke Lemaitre 461552474c
refactor: cleanup 2024-06-28 00:35:40 +02:00
Folke Lemaitre 68cee30cdb
perf: prevent active waiting in coroutines. suspend/resume instead 2024-06-27 13:06:39 +02:00
Folke Lemaitre 82276321f5
fix(rocks): if installing with luarocks (binaries) fails, then build from source. Fixes #1563 2024-06-27 11:33:11 +02:00
Folke Lemaitre e02c5b1b57
fix(runner): only check for errors when a task is no longer running 2024-06-27 11:32:30 +02:00
Folke Lemaitre a0391c3e21
fix(manage): dont skip install for plugins that need a build, but dont have an url (like local plugins). Fixes #1563 2024-06-27 11:32:00 +02:00
Folke Lemaitre 591ded8309
feat(ui): keep cursor position when rendering view 2024-06-26 22:45:21 +02:00
Folke Lemaitre 249902ab31
fix(ui): diagnostics without status 2024-06-26 22:44:57 +02:00
Folke Lemaitre a0a51c06c2
feat: added `opts.headless` to control ansi output when running headless 2024-06-26 21:38:28 +02:00
Folke Lemaitre 93b3a77286
fix(runner): wait_step 2024-06-26 20:17:32 +02:00
Folke Lemaitre 66a4170f0e
fix(runner): properly do concurrency 2024-06-26 19:58:45 +02:00
Folke Lemaitre 97f4df0824
fix(runner): only use Config.plugins when updated. Fixes #1560 2024-06-26 19:39:28 +02:00
Folke Lemaitre 56075b57c4
fix(runner): bring concurrency back 2024-06-26 18:45:40 +02:00
Folke Lemaitre 206d208018
test: fix tests 2024-06-26 18:42:52 +02:00
Folke Lemaitre 6c7ef7e27a
refactor: logging 2024-06-26 18:31:31 +02:00
Folke Lemaitre 765773a176
refactor: use new async code for runner and simplify task class 2024-06-26 17:06:56 +02:00
Folke Lemaitre 768de1ebf6
refactor: move scheduler to async 2024-06-26 15:11:31 +02:00
Folke Lemaitre bbe136bda6
test: fix tests 2024-06-26 14:30:38 +02:00
Folke Lemaitre 0614ca6ca6
perf: tasks are now fully async 2024-06-26 14:28:53 +02:00
Folke Lemaitre 28e435b7f3
fix(git): fetch commit from origin or local to check if branch was changed. See #1549 2024-06-26 07:15:12 +02:00
Folke Lemaitre b6eba0d026
ci: auto-get rockspec mappings for rock name => github short url or url 2024-06-25 17:41:16 +02:00
Folke Lemaitre 7d3f69104f
fix(rocks): better errors / warnings when something goes wrong with luarocks 2024-06-25 13:23:25 +02:00
Folke Lemaitre 45cd8d3f0f
fix(rocks): hererocks paths on windows 2024-06-25 06:40:50 +02:00
Folke Lemaitre d87da76679
feat(rocks): use hererocks to install luarocks when luarocks is not found 2024-06-25 07:55:30 +02:00
Folke Lemaitre 77edda11bf
test: fixes 2024-06-24 19:55:11 +02:00
Folke Lemaitre 105d4805ad
fix(runner): sync package specs after installing and before building 2024-06-24 19:38:33 +02:00
Folke Lemaitre b73c57ed9e fix(luarocks): cleanup luarocks when deleting a plugin 2024-06-24 17:15:10 +02:00
Folke Lemaitre 368747bc9a feat(build): build files and functions are now async. use coroutine.yield to interrupt and report progress 2024-06-24 17:15:10 +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 3be55a4615 feat: added support for plugin packages by lazy, rockspec and packspec 2024-06-24 17:15:10 +02:00
Folke Lemaitre f1ba2e3d05 feat: luarocks support 2024-06-24 17:15:10 +02:00
Folke Lemaitre 8eba74c3fc feat: packspec 2024-06-24 17:15:10 +02:00
Folke Lemaitre f4d57485b0
refactor: reloader 2024-06-18 00:36:11 +02:00
Kevin Traver 2e04a0c02c
fix(checker): ignore dev plugins (#1384) 2024-05-18 10:14:12 +02:00
Folke Lemaitre d2a4ce22dc
fix(git): force `autocrlf=false`. Fixes #1055 2024-05-13 08:34:39 +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
Piotr Król d0d410bc22
fix(git): comment sign detection in get_config function (#1281)
- Modify the condition in the get_config function to correctly ignore
  comments and blank lines.
- Update the regular expression to exclude lines starting with '#' or
  ';'.
- This change ensures that only valid key-value pairs are added to the
  configuration table.
2024-01-20 15:05:26 +01:00
Folke Lemaitre 47d4baafcc
fix(fs): error when plugin directory to delete is not a valid directory 2024-01-19 16:09:28 +01:00