Coder Social home page Coder Social logo

neogit's People

Contributors

ascandella avatar athepeanut4 avatar avimitin avatar azzamsa avatar cheeze2000 avatar cjgibbons avatar ckolkey avatar emmanueltouzery avatar gollth avatar ivaaaan avatar jarviliam avatar kessejones avatar kjughx avatar laytan avatar milkias17 avatar morgsmccauley avatar ofseed avatar p00f avatar postcyberpunk avatar pricehiller avatar rawlingsr avatar rianfuro avatar seniormars avatar sindrets avatar smatting avatar star-szr avatar ten3roberts avatar theherk avatar timuntersberger avatar ttytm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

neogit's Issues

Set cwd for git commands

Currently various git commands break when nvim is started in a subdirectory under the git repository, due to file paths not lining up with the cwd of nvim.

We'd need to search upwards for the root (or is there a git command for that?) and use that as a cwd for all git commands

Keep folds open when staging

When debugging #7 , I realized Neogit constantly falls back to mode 2 after I stage the hunks. I guess the ideal would be to not revert, since one can probably add another hunk from that same file, for example. An alternative would be to make the behavior configurable.

Status Buffer

Actions

  • Stage file
  • Stage hunk
  • Stage selection
  • Stage unstaged changes
  • Stage everything (includes untracked files)
  • Unstage file
  • Unstage hunk
  • Unstage selection
  • Unstage staged changes
  • Toggle diff
    • Modified files
    • New files
    • Deleted files
  • Go to file
  • Change foldlevel
  • Restore file
  • Restore hunk
  • Restore selection

(Git) Split Diff viewer

90% of my fugitive use is :Gdiffsplit, it's the most useful git command (for me) by far.

I would love to see a method for viewing (and stepping through) diffs. Happy to contribute to this if you think it is in scope.

Unrelated but @RianFuro @TimUntersberger do you all actively lurk on our gitter/IRC? I'm a huge fan of this plugin and would like to make sure we're doing whatever we can in core to support your work.

attempt to index global 'popups' (a nil value)

Hello, it's really a pleasure to see this ambitious project being worked on, being both a VIm and Emacs (at work, not by choice) user and wishing we had something like Magit over here.

I understand this is a WIP project, but after a quick little test I found one small issue. In the status buffer, if and only if the help popup (?) is displayed, some of the commands emit an error, such as Log (L):

E5108: Error executing lua ...ano/.data/nvim/plugins/neogit/lua/neogit/popups/help.lua:38: attempt to index global 'popups' (a nil value)

Neogit autocmd for integration with outside plugins

Use case:

Whenever neogit updates the state of git, other plugins that deal with git need a mechanism to be informed of changes. Otherwise, the state of those plugins become inconsistent with the actual state of the project.

For example, vim-gitgutter will still display code as uncommitted when actually it's been committed with neogit

Solution:

Create an autocmd for neogit that other plugins (or the user) can use to update those plugins. For example: we already have a __NeogitStatusRefresh function. If we expose that as an autocmd it would allow us to do:

autocmd User NeogitStatusRefresh :GitGutter to inform vim-gitgutter that our project state has changed

Commit Popup

Actions

  • Commit
  • Extend
  • Reword
  • Amend
  • Fixup
  • Squash
  • Augment
  • Instant Fixup
  • Instant Squash

Push Popup

Actions

  • Push to pushremote
  • Push to upstream
  • Push to branch

Please read this

If you notice a feature is missing, please look for an existing umbrella issue and if one exists that matches your request then comment under the issue.

Floating status buffer doesn't quite work

When starting neogit like this:

require('neogit').status.create('floating')

The status buffer appears correctly, but any popup windows appear in the previous buffer. I don't know how to fix this.

Errors when git status buffer is open in a repo on a branch without an upstream

Thanks for your work on this plugin ๐Ÿš€ I'm really excited to see where things go ๐Ÿ’ฏ .

I just wanted to note a bug I encountered whilst using it (I appreciate it's WIP but thought you might want to have this tracked). When calling NeogitStatus whilst on a branch without an upstream I get repeated command error popups. Looking at the log via $ I see

 128 git log --oneline @{upstream}.. --
  | fatal: no upstream configured for branch 'feature/multiple-carer-notes'
 128 git log --oneline ..@{upstream} --
  | fatal: no upstream configured for branch 'feature/multiple-carer-notes'
  0 git log --max-count=1 --pretty=%B --
  | fix: refetch the token for every request
  | 
  | This prevents it going out of sync when logging out and in to the app as
  | different users
 128 git log --max-count=1 --pretty=%B @{upstream} --
  | fatal: no upstream configured for branch 'feature/multiple-carer-notes'
  0 git status --porcelain=1 -b --
  | ## feature/multiple-carer-notes
  |  M lib/services/api.dart

When I run the erroring commands in a terminal it prints

git log --oneline ..@{upstream}.. --
fatal: no upstream configured for branch 'feature/multiple-carer-notes'

I wonder if there should be a check for if there is a valid upstream before upstream related commands are tried? not sure the best way round this based on how this plugin is structured but in this case I don't really think this is a real error in this case since it's expected as I just created the branch and haven't pushed it yet

EDIT: also not sure if it's intended but -- is being appended to all commands it looks like without any further arguments not sure if that's intentional or not

Demo of neogit

Hello. Please add some demo video or photos of neogit:)
Thanks!

I don't quite understand the " neogit.status.create(<kind>)" command

I guess i am not getting this straight. How can i configure Neogit to open in a split, or popup properly?

I created a config file, like neogit.lua, and put this on the file:

local neogit = require('neogit')

neogit.status.create('split')

But this way, everytime i open nvim, it automatically opens neogit in a split way, as soon as i open a file. And then if i close the buffer, and open :Neogit again, it opens in the default tab way. So how do i properly configure this to everytime open in a split way?

Prompt to set upstream when pushing local branch

The push operation should prompt the user to select an upstream to synchronize the branch to, if the branch does not have an upstream yet.

On that topic, since we've copied over the pushRemote vs upstream distinction from magit, do we want to keep going with that?

Stash List Buffer

Actions

  • Apply stash
  • Drop stash
  • Create and checkout a new branch from stash

Neogit doesn't use the user's configured .gitmessages file

image

Just to flag this although it might be a known issue already but whilst using neogit it doesn't read my .gitmessages from my .gitconfig. I've set the commit message text to use a different placeholder to match the commit style I use. The screen shot show the commit buffer with vim fugitive and neogit. Fugitive somehow is reading this information whereas neogit doesn't.

It's not a blocking issue at all just worth pointing out.

Log Popup

Actions

  • Log current
  • Log other
  • Log HEAD
  • Log local branches
  • Log all branches
  • Log all references
  • Reflog current
  • Reflog other
  • Reflog HEAD

Git error (128) !

I keep seeing

Git error (128) !
Press $ to see the command history

as notifications.

Not only that but pressing $ does nothing.
Is there a way to suppress these notifications ?
Btw I like your notification system and you may be interested in neovim/neovim#13843

Vimmier mappings

I apologize for the click-baity issue title...

My request is quite specific: Right now, the commit window uses the Emacs mapping <c-c><c-c> to save the commit message and perform the commit. Coming from vim-fugitive, I just can't add this to my muscle memory -- I always try to do this with the standard vim mapping :wq (like in vim-fugitive).

Can this be (optionally) supported?

Help Popup

This should describe every supported popup and action.

Sections

  • Popups
  • Status buffer actions
  • Common actions

Including luaunit?

Should we include luaunit to be able to run some unit tests? Judging from our discussions from #30 we could really benefit from some :)

Pull Popup

Actions

  • Pull from pushremote
  • Pull from upstream
  • Pull from elsewhere

use libgit2?

Interesting project. Are you planning/considering to use libgit2? There seems to be nice lua bindings. I was thinking on prototyping my own git integration from scratch, but I could start with your stuff and try to move things over from cli to luagit2. If this sounds interesting.

Save commit message

When in a repo that uses git hooks, commit might not go through. Saving the commit message and reopening it if the last command didn't go through would be good. If it's stored in a file, not overriding the content of the file if it exists (only replacing the commented lines) would solve the issue.

Utilize extmarks

Currently a lot of manual calculations is done to know where each section and so on is. This can be completely avoided by using extmarks.

Help popup

Having something like the ? popup in magit for neogit, would be really cool. I keep forgetting about keybindings that I rarely use and then I have to look them up in the documentation. Implementing this popup would simplify these steps and also makes neogit easier to learn.

Fold colors suddenly change to difficult to read colors while scrolling buffer

When I scroll the status buffer with an expanded unstaged/staged file, I see nicely colored changes with a red/green highlight. However, suddenly as I scroll, the red/green turn into a gray color, that is very difficult to read, and the only way to get it back to the nice colors seems to be to scroll far enough so the colored region is more than half way off screen, and then click somewhere outside of that region. Example:

Good:

Scrolling down with mouse wheel, and at some point it looks like this:

Allow to override keybindings

Hey,

Iโ€™m a using a non QWERTY keyboard layout (bรฉpo) and I need to redefine a bunch of keys (i j k l are redefined and I map them to c t s r, which means that those keys are important to me), so I need to remap things such as stage / rebase.

Is it possible? Thanks in advance.

async from plenary

There's an open pull request at nvim-lua/plenary.nvim#83 that takes the same approach we did with async (with inspriation from us apparently ๐Ÿ˜), makes it actually good (they already fixed a few performance concerns I had with my implementation) and adds it to plenary.
Now, I have no idea how widespread plenary actually is, so I have this question to @TimUntersberger and anyone who uses neogit and sees this: If this will be merged, should we actually depend on plenary (and not just for tests) and use their async library?

This would mean users would need to add plenary to their list of plugins if they'd want to use neogit.

Error message when I open status

I use command :lua require'neogit.status.create('floating')' to create a float buffer to display git message with this message:
ๅ›พ็‰‡

Should I be seeing something in the NeogitStatus buffer?

Hi there, I'm using the master version on a days-old NeoVim 0.5 and issuing :NeoGit opens up a new tab with an empty buffer. The various commands listed in the help bring up some other buffers but nothing ever shows up on the NeoGit buffer. ctrl-r doesn't do anything or bring up an error message.

I'm happy to add more diagnostics if I can find out how to generate them :)

Thanks for putting this out there, I'm currently using vim-fugitive but it's not ideal...

Merge conflicts

Being able to quickly look at all of the conflicts in a file would greatly improve the merge experience. I imagine an interface similar to the diff view, with additional functionality where needed.

Document keymaps

Hi, thanks for the plugin.

Can I ask for a keybinding (like ?) that shows which keybinding does what? Or maybe just add it to README/doc?

Add Neogit commands

It'd be nice if one could bypass the main Neogit status window by directly entering, say :Neogit commit (or lua neogit.commit()) to save some keystrokes.

(In this case, it might make sense to refactor a bit to introduce a setup function that allows specifying default options like float window, key mappings, etc.?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.