Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Provide indication in :Lazy modal that shows when local plugins are used vs not #1802

Open
1 task done
Drew-Daniels opened this issue Nov 5, 2024 · 0 comments
Open
1 task done
Labels
enhancement New feature or request

Comments

@Drew-Daniels
Copy link

Did you check the docs?

  • I have read all the lazy.nvim docs

Is your feature request related to a problem? Please describe.

Thanks for making this plugin! lazy.nvim has been incredibly easy to use and massively helpful in my development workflow.

Feature Request

It seems like when you run :Lazy there are different colors that are supposed to indicate whether or not you are using a plugin locally or one downloaded from a remote source like GitHub. In my case, downloaded plugins have an orange circle and local ones have a pink circle.

image

I think this is helpful, but I've noticed a couple issues with this:

  1. It looks like the "local" color is just based on whether or not you have configured a plugin with the dir property set
  • I.e., it doesn't matter if the dir points to a non-existent folder on your filesystem
  1. This doesn't tell users if the local or remote version of this plugin is actually being used
  • I have forks of many plugins, where I just leave the dir property set in my plugin configuration, but comment out the dev = true property, so I can use the remote version in most cases, but use my local version when I need to debug something (by uncommenting the dev = true line.

I would expect that the circle would be colored orange in this case, because I'm using the remote version of the plugin, but it still remains the "local" color, which I feel like it gives users the wrong idea that a local plugin is being used when it may not be.

Describe the solution you'd like

I think it would make more sense for:

  • The "local" (pink) color to be used when all of the following conditions are true:
    • You have configured the dir property of a plugin configuration
    • This dir property points to an existent folder
    • The dev property of a plugin configuration is set to true
  • The "remote" (orange) color to be used when one of the above is false

Describe alternatives you've considered

N/A

Additional context

The screenshot below shoes that the codeium.vim entry has a pink circle next to it, when I think it should be orange to indicate that this local plugin is not being used (in this case, because I have dev = false for this plugin)

image

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable", -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)

return require("lazy").setup({
  -- ...
  {
    "Exafunction/codeium.vim",
    event = "BufEnter",
    dir = "~/projects/codeium.vim",
    -- dev = true,
  },
  -- ...
})
@Drew-Daniels Drew-Daniels added the enhancement New feature or request label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant