-
Notifications
You must be signed in to change notification settings - Fork 0
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
Git/VCS library #6
Comments
@wbthomason Why is this marked as in-progress? (More specifically, are you working on https://github.com/wbthomason/dotfiles/blob/linux/neovim/.config/nvim/lua/git.lua to eventually make it a library, or . . . ?) |
It was marked in progress because of https://github.com/wbthomason/dotfiles/blob/linux/neovim/.config/nvim/lua/git.lua; maybe I should move it back to the "idea" stage because I haven't split out that file into a separate plugin yet. I'd like to keep working on that module and make it a library; it's stable for what it provides, but it provides relatively little. Haven't had time for it lately, though. @smolck: Do you think it would be better to move this card back to "Ideas"? |
I'm happy to help out with expanding upon it as I'm able, but I'd probably need some specific direction first as to where you'd like to go with it. I'm also curious if having a UI for the library is something you'd want to add as part of this wish? My thought is we could have the library be something that can be used by itself (i.e.
Yes, I think so; maybe there should be some more specific criteria for what constitutes an "idea," an "in-progress" plugin, and a "done" plugin (which we've basically already decided in #2). I do think that "in-progress" implies that the plugin is actively being worked on in it's own repository though; what do you think? Also, do you think there should be a standard way for the plugins to be structured, i.e. neovim-plugin, in order for them to qualify as "in-progress" or "done"? I think if we are going to have a standard structure for Lua plugins, this might be a good place to start using it. Thoughts? |
I suppose I should split it out into its own repo, and then we/anyone who's interested in working on it can discuss this there. In short: I like the idea of making it a library with a separate or optional UI component (something like I did for
I buy that argument; I'll move the card until I get around to separating out a new repo. Would you be interested in making a PR on this repo to add more formal specifications of what constitutes an "idea", "in-progress" plugin, etc.? I think there's enough interest from you and @clason that we should think about how these should be defined.
Personally, I don't favor requiring all implementers of ideas to use a fixed structure. I think |
I don't think a detailed set of criteria is required; just some rule-of-thumb so it's not completely arbitrary. Having a dedicated repo with some code in it is fine for "in progress".
I think it makes sense to separate this into
My personal short-term interest would be in 2. rather than 3. (As well as maybe adding mercurial support.)
I don't think any requirements (besides being written in lua and doing something useful) should be made; this would send the wrong sign. A version of https://github.com/nanotee/nvim-lua-guide for "Writing lua plugins in neovim" that promotes |
Sure! I agree with @clason about having "just some rule-of-thumb so it's not completely arbitrary," so maybe a PR updating the README to list some basic distinctions between "idea," "in progress," and "done" is fine? We can of course decide on the exact wording/distinctions in the PR, but I think we're already decided for the most part, so it should be a straightforward update.
I agree, that sounds good! I wonder if 3 would make sense as a separate plugin that uses the library? Because if we're going for something like a magit equivalent (but better, of course :P), then it might belong as a separate plugin. That way if someone wants to use only the library they can pull that in by itself.
Good points. Maybe such a guide could be part of this repository (maybe in the Wiki)? Just a thought; I'm not sure if that's better than having it in a separate repo, or if that's outside the scope of this project. |
Arguably, 2 (and certainly 1) could be part of a standard lib, while 3 is definitely a plugin. (It's always possible to factor things out later, though, so that doesn't have to be fixed now.) |
I am very interested on working on this effort. I am planning to get a project started to start playing with ideas. |
@bryall Sounds good! That served as the final kick in the pants I needed to extract my own current WIP toward this from my dotfiles to its own plugin: https://github.com/wbthomason/nvim-vcs.lua Feel free to contribute to that repo or start your own; whatever you prefer. |
are some of you guys aware/planning to use https://libgit2.org/luagit2/modules/Commit.html ? |
@bfredl I wasn't aware core was planning to integrate Luarocks support - could you point me to a PR? That impacts this project idea, but also some of the work on |
Ping @tjdevries once his talk is over (20 mins ish) :] |
@wbthomason we might not be able to fully "commit" to a working solution inside nvim 0.5 release. However, I think packer.nvim could work nicely as a "sandbox" where we try to work out binary (luarocks) and plugin dependencies (i e plugin A depend on B), and maybe get something into neovim core in 0.6 or later. Does this sound alright with you? I might be able to help prototype libgit2 stuff myself, sometime soon. |
@bfredl i saw a PR for updating luagit2, do you need any help? I started looking at it when i saw it |
@bryall I have just had other as stuff to do :] but feel free to send a PR on top of my PR if you wanna accelerate the process. |
@bfredl Yes, that plan sounds good (I really need to make time to finish the I'll note that |
Just going to mention/plug I've been working on a lua plugin (gitsigns.nvim) as a drop in replacement for vim-gitgutter or coc-git. Still very WIP but pretty usable for my personal needs. |
I too would offer my help for development: is this being considered any time soon, practically, so that one could start drafting requirements and proof of concepts? Or is this being already developed here? |
@gennaro-tedesco I'd rather say it's being developed here: https://github.com/TimUntersberger/neogit |
To recap the current state:
|
@clason luagit2 needs alot more polishing to be usable. Just look at the issues mentioning libgit2 release 0.18 and the build crash issue. Since libgit2 is v1.0 since last May stuff does not break in the foreseeable future, so now would be the ideal time for you to push things. ;-) |
some work towards 1.0 has been done in luagit2, though I did not get the existing makefiles to cooperate without hacks. |
What?
A Lua library for working with git/other VCS information in Neovim. Kind of an equivalent to https://github.com/tpope/vim-fugitive or https://github.com/mhinz/vim-signify
Why?
The existing VCS solutions for Vim/Neovim are written in Vimscript and are fairly complicated and expensive to load. Additionally, interfacing with VCS is a common problem for some classes of plugin - plugin managers, statuslines, etc. A Lua library, using
vim.loop
to asynchronously run VCS software and handling things like branch detection, change counting while editing, cloning, displaying changes, making commits, and pushing/pulling (among other functionality) would reduce effort duplication and increase performance.Potential existing implementations:
Some rudimentary branch detection/change tracking functionality is implemented in https://github.com/wbthomason/dotfiles/blob/linux/neovim/.config/nvim/lua/git.lua. Vimscript plugins like
fugitive
andsignify
can be used as references for some of the tricker bits of working withgit
.Potential pitfalls:
fugitive
and the like are complex plugins to replicate.The text was updated successfully, but these errors were encountered: