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

Extension contribution #116

Closed
gldtn opened this issue Aug 8, 2024 · 2 comments · Fixed by #118
Closed

Extension contribution #116

gldtn opened this issue Aug 8, 2024 · 2 comments · Fixed by #118
Labels
question Further information is requested

Comments

@gldtn
Copy link
Contributor

gldtn commented Aug 8, 2024

Question or Suggestion

Hello @scottmckendry , I would like to contribute with Neogit extension but I'm not totally sure how to do it as I'm not very good at managing github repos. I followed the instructions on contributing page, but what is the best way to go about it and submit a PR? Should I clone your repo, make the changes and submit a PR? Currently for testing purpose I edit the nvim file directly, which I'm sure it not the correct way to do it.

Thanks for your patience!

@gldtn gldtn added the question Further information is requested label Aug 8, 2024
@scottmckendry
Copy link
Owner

scottmckendry commented Aug 8, 2024

Thanks for showing interest in the project @gldtn! I want the contribution process to be as streamlined as possible so it's always good to get feedback from first-time contributors.

If you use lazy.nvim as your neovim plugin manager you can configure it to look for local copies of plugins in a specific folder, like I have done here:

https://github.com/scottmckendry/Windots/blob/eec6734e91d556b203f765d3bb6b9fc2f9fb5f49/nvim/lua/core/lazy.lua#L21C5-L24C7

From the configuration docs:

dev = {
   ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects
   path = "~/projects",
  ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub>
   patterns = {}, -- For example {"folke"}
   fallback = false, -- Fallback to git when local plugin doesn't exist
}

Once this is setup, you can clone your fork of cyberdream.nvim to the local directory you've configured in lazy.nvim.

Then in your plugin config, add dev = true, to get lazy to load your local copy instead of it's own cloned version.

Here's an example from my config:

https://github.com/scottmckendry/Windots/blob/eec6734e91d556b203f765d3bb6b9fc2f9fb5f49/nvim/lua/plugins/colourscheme.lua#L4C9-L4C20

This will let you test your changes locally before committing/merging upstream. Let me know if you have any other questions!

@gldtn
Copy link
Contributor Author

gldtn commented Aug 9, 2024

I think I did everything right, and submitted a PR 🎉

Thanks for you help!

Dev would not work until I added the imports inside specs table:

spec = {
        { import = "plugins" },
        { import = "plugins.lsp" },
    },

before I just had:

 { import = "plugins" },
        { import = "plugins.lsp" },

Leaving it registered here just in case someone has the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants