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: autodetect non github urls #357

Closed
1 task done
sarmong opened this issue Jan 9, 2023 · 4 comments · Fixed by #352
Closed
1 task done

feature: autodetect non github urls #357

sarmong opened this issue Jan 9, 2023 · 4 comments · Fixed by #352
Labels
enhancement New feature or request

Comments

@sarmong
Copy link

sarmong commented Jan 9, 2023

Did you check the docs?

  • I have read all the lazy.nvim docs

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

I added a sourcehut url and lazy tried to pull https://github.com/https://git.sr.ht.... which made all my config fail.

Describe the solution you'd like

If a short plugin url starts with https:// or git@ - don't append config.git.url_format to it. It would be easier and more consistent then adding url key.

Describe alternatives you've considered

Additional context

No response

@sarmong sarmong added the enhancement New feature or request label Jan 9, 2023
@folke
Copy link
Owner

folke commented Jan 9, 2023

I understand, but for performance reasons I want to keep it simple. Custom url uses the url= attribute. Local directories use dir=

Git supports a gazillion ways to specify a repo url, so there would always be cases not covered.

@folke folke closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2023
@sarmong
Copy link
Author

sarmong commented Jan 9, 2023

How would it decrease performance? Lua pattern matching is extremely fast.

@folke folke reopened this Jan 9, 2023
@folke folke closed this as completed in 4304035 Jan 9, 2023
@folke
Copy link
Owner

folke commented Jan 9, 2023

It does add up I would want to support other correct git uris as well, but you;re right that for http and git@ urls it should be fine. Just added this

@duarm
Copy link

duarm commented Jan 9, 2023

just for the record, the first thing I tried was

https://gitlab.com/plug/repo.git, then
git+https://gitlab.com/plug/repo.git (because of pacman), then
git@gitlab.com:plug/repo.git

then I looked at the manual. If any of the first had worked, I would've tried file:/// for sure had I needed a local plugin.

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

Successfully merging a pull request may close this issue.

3 participants