Giter Site home page Giter Site logo

vgit.nvim's Issues

Highlight Groups Unset

Description

Highlight Groups are not being set automatically.

  • nvim --version output: 0.5
  • Operating system: MacOS BigSur 11.5.2

Invalid command "project_diff_preview"

Description

enter :
:VGit project_diff_preview
Got above errors

Is this command out of date?

Also a few commands not working (no output)
e.g. VGit buffer_history

My config:

require('vgit').setup()

Is there any field that needs to setup to non-default to allow those commands to be working?

  • nvim --version output: nvim-0.6.0
  • Operating system: Mac

Keymapping

It would be nice for users to pass in key mappings for commands in VGit. Based on how users instantiate the plugin, this could be a nice alternative that our plugin provides. An example of an interface might look like this:

function set_keymap(mode, key, action)
  options = options or {}
  vim.api.nvim_set_keymap(mode, key, action, {
    noremap = true,
    silent = true
  })
end

The function above can then be used to create something like this:

keymap = {
   '<mode> <key>' = 'hunk_down',
   'n <c-k' = function(vgit) vgit.hunk_up() end
}

Configurable Popups

Describe the solution you'd like

Telescope is a great example of a plugin that is highly extensible. Users can customize the size and position of the windows. In addition, users can even create their own layout themes (Could be possibly another issue).

VGit's current project structure should easily make us add this feature. Each popup's state could store the following parameters that can be passed in from within setup, which are:

  • height
  • width
  • row
  • col

These four parameters should be enough for a user to configure the window as much as they want. A place where these would go to would be here. Which can used to replace the values used here.

Buffer Lens Preview

Description

Provide a full width horizontal buffer preview window, which hovered on a hunk takes the height of the hunk, otherwise a fixed height. This lens can also be used to navigate through other hunks.

This preview is also an improved version of the hunk_preview feature that currently exists

A bug related to scheduling?

Description

I don't know why but continuously i am getting Error executing vim.schedule lua callback: ...acker/start/plenary.nvim/lua/plenary/async/async.lua:14: The coroutine failed with this message: /home/shantnu/.config/nvim/lua/config/vgit-nvim.lua:91: attempt to call global 'round' (a nil value) for some reason. What is this and how do I stop it? This error is irritating ast i have to press enter whenever it pops up

  • nvim --version output:
NVIM v0.6.0-dev
Build type: RelWithDebInfo
Lua 5.1
Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-d07uyf/neovim-0.5.0+ubuntu2+git202107201521-2475161de-d569569c9=. -fstack-protector-str
ong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unus
ed-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common
 -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build
/neovim-d07uyf/neovim-0.5.0+ubuntu2+git202107201521-2475161de-d569569c9/build/config -I/build/neovim-d07uyf/neovim-0.5.0+ubuntu2+git202107201521-2475161
de-d569569c9/src -I/build/neovim-d07uyf/neovim-0.5.0+ubuntu2+git202107201521-2475161de-d569569c9/.deps/usr/include -I/usr/include -I/build/neovim-d07uyf
/neovim-0.5.0+ubuntu2+git202107201521-2475161de-d569569c9/build/src/nvim/auto -I/build/neovim-d07uyf/neovim-0.5.0+ubuntu2+git202107201521-2475161de-d569
569c9/build/include
Compiled by buildd@bos02-arm64-021

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info
  • Operating system: Ubuntu arm64

Repositories without a remote

Describe the solution you'd like

Right now, every interactions you have with VGit is all related to the repository having a remote. There currently exists no feature related to repositories that have no remote.

This feature request is also related to the issue of detecting changes that have been staged. No computation in this plugin is done based on git staging.

Staged hunks or changes should be highlighted with a different highlight, do distinguish between changes that are staged vs changes that are not present in remote.

Widget focus issue without a mouse

Description

Having no mouse support makes it very difficult to navigate through different window components of a widget. There should be a distinction between widgets. Some of them should act like only popups, others should behave like views.

  • nvim --version output: NVIM v0.5.0-dev+1459-g384f9870f
  • Operating system: Ubuntu 20.04

Floating dialogs get stuck

Description

When I install the plugin and call lua vim.lsp.buf.hover() the hover dialog gets stuck. Without the plugin installed the hover windows work absolutely fine.

  • nvim --version output:
  • NVIM v0.5.0
Build type: Release
LuaJIT 2.1.0-beta3
Compilation: clang -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -DNDEBUG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/tmp/neovim-20210702-97973-1wtbty6/neovim-0.5.0/build/config -I/tmp/neovim-20210702-97973-1wtbty6/neovim-0.5.0/src -I/opt/homebrew/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/opt/homebrew/opt/gettext/include -I/tmp/neovim-20210702-97973-1wtbty6/neovim-0.5.0/build/src/nvim/auto -I/tmp/neovim-20210702-97973-1wtbty6/neovim-0.5.0/build/include
Compiled by [email protected]

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.5.0/share/nvim"

Run :checkhealth for more info
  • Operating system: MacOS Big Sur 11.5.2

Show staged and unstaged changes in `project_diff_preview`

Describe the solution you'd like

Having the ability to show not only changed files but also staged and unstaged files in the project_diff_preview would be very helpful similar to that found in VSCode:

Capture

Using the new folding lists enhance the look and feel of project_diff_preview further to match that of the screenshot.

E5113: Error while calling lua chunk: ...hare/nvim/site/pack/paqs/start/vgit.nvim/lua/vgit/ui.lua:72: attempt to index local 'config' (a nil value)

Description

Thanks a lot for this awesome plugin.

I use Paq as plugin manager.
I tried to uninstall and reinstall VGit.
I keep getting E5113: Error while calling lua chunk: ...hare/nvim/site/pack/paqs/start/vgit.nvim/lua/vgit/ui.lua:72: attempt to index local 'config' (a nil value) error.

Screenshot 2021-08-03 at 12 32 49 AM

After this error, I'm not able to use the plugin (i.e. VGit command doesn't appear/work in commandbar at the bottom).
This problem has appeared just recently after updating the plugin.

  • nvim --version output:
λ › nvim --version                                                                                                                                     Blocks/cloche_api ueberauth
Found existing alias for "nvim". You should use: "n"
NVIM v0.5.0
Build type: Release
LuaJIT 2.1.0-beta3
Compilation: clang -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -DNDEBUG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/tmp/neovim-20210702-14987-rep9di/neovim-0.5.0/build/config -I/tmp/neovim-20210702-14987-rep9di/neovim-0.5.0/src -I/usr/local/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/opt/gettext/include -I/tmp/neovim-20210702-14987-rep9di/neovim-0.5.0/build/src/nvim/auto -I/tmp/neovim-20210702-14987-rep9di/neovim-0.5.0/build/include
Compiled by brew@BigSur

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.5.0/share/nvim"

Run :checkhealth for more info
λ ›                                                          
  • Operating system: Mac Big Sur
  • Terminal: Kitty

Git Diff

Describe the solution you'd like

  • Users usually want to changes made in a repository quickly
  • Since this plugin is all things git, this feature would really be a great addition
  • Similar to history plugin, there should be a bottom view listing all the files that have changes in it with number of addition and deletion, along with other metadata related to the diff
  • Pressing enter should show show the diff that exists for the file
  • This feature should also transform into the quckfix action when user presses c-q

Highlight Word Changes in Previews

Having ability to highlight words that were changes within a line is a great way for a programmer to keep track of changes. Mostly all git integrations provide this feature. Here's is a screenshot of the intended feature:

Capture

Error: module 'plenary.async' not found

Description

After installation I get next error:

line    3:
E5108: Error executing lua ...iles/nvim/.config/nvim/vendor/vgit.nvim/lua/vgit/git.lua:3: module 'plenary.async' not found:
        no field package.preload['plenary.async']
        no file './plenary/async.lua'
        no file '/usr/share/luajit-2.0.5/plenary/async.lua'
        no file '/usr/local/share/lua/5.1/plenary/async.lua'
        no file '/usr/local/share/lua/5.1/plenary/async/init.lua'
        no file '/usr/share/lua/5.1/plenary/async.lua'
        no file '/usr/share/lua/5.1/plenary/async/init.lua'
        no file './plenary/async.so'
        no file '/usr/local/lib/lua/5.1/plenary/async.so'
        no file '/usr/lib/lua/5.1/plenary/async.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file './plenary.so'
        no file '/usr/local/lib/lua/5.1/plenary.so'
        no file '/usr/lib/lua/5.1/plenary.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
  • nvim --version output:
    NVIM v0.5.0-dev+1318-g61aefaf29
    Build type: RelWithDebInfo
    LuaJIT 2.0.5
    Compilation: /usr/bin/cc -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/var/tmp/pamac-build-me/neovim-nightly-git/src/build/config -I/var/tmp/pamac-build-me/neovim-nightly-git/src/neovim-nightly-git/src -I/usr/include -I/var/tmp/pamac-build-me/neovim-nightly-git/src/build/src/nvim/auto -I/var/tmp/pamac-build-me/neovim-nightly-git/src/build/include
  • Operating system:
    ArchLinux

Signs not showing on edit/write when PWD is not the git root.

Description

If the nvim PWD is a subdirectory of the git repo, diff signs do now show when a file is opened or saved.
They do show when an open buffer is changed, but disappear when the buffer is saved.

To reproduce using this repo as an example:

# This works as expected
cd path/to/vgit.nvim
nvim lua/vgit/init.lua
# Modify file - signs appear
:w
# Signs persist
# Reproduce error
cd path/to/vgit.nvim/lua
nvim vgit/init.lua
# Modify file - signs appear
:w
# Signs disappear

Setting debug = true then running :VGit show_debug_logs shows the error:

VGit[11:43:48]: VGit[11:43:45][init.lua/_blame_line]: fatal: no such path 'lua/lua/vgit/init.lua' in HEAD
  • nvim --version output:

    • NVIM v0.6.0-dev+14-gdf33f30e8
    • NVIM v0.5.0
  • Operating system:

    • Macos
    • Centos 8

Love your works and thanks!

:VGit hunk_stage

Describe the solution you'd like

Thank you for time and effort for this plugin.
Currently, i've switched from gitsigns over to it

But i miss ability to stage hunks from within buffer
... or i overlooked it?

Thank you!

Blame Preview

Goal of this plugin is to make the git life easier. This plugin takes inspiration from various sources, even including the Github website itself.

This new preview should look exactly this.

Horizontal View

Describe the solution you'd like

horizontal_diff

  • The image above shows the desired result to be achieved.
  • Users should have the ability to switch to this view as they are using 'Buffer Preview' feature.
  • A command should be provided which the users can use on these buffers to switch between the views.

Support new files for showing signs

Describe the solution you'd like

Showing 'add signs' for whole buffer in sign-column for untracked files

Thank you!

UPD.

It shows add signs for 'unstaged file' if i stage it

Getting the error on startup

I'm getting the following error on startup after updating the vgit.nvim.

Screenshot 2021-08-20 at 8 50 05 AM

Please let me know if more information is required.

Suppress errors shown to users

Describe the solution you'd like

  • If any error occurs we should use some sort of debugging instead of showing users that something went wrong.
  • This will allow us to build a cleaner interface and perhaps only show users errors that we really want/need them to see such as the ones we see in the popup.
  • Having finer control is always better.

VGit doesn't work on first opened buffer

Description

Most of the plugin doesn't work on the first opened buffer, only on subsequent ones. Doing :e file to reload the file fixes the issue. The plugin works on new buffers created using splits or tabs. Only a couple of functions like VGit diff and VGit hunks_quickfix_list still work all of the time.

  • nvim --version output:
NVIM v0.5.0
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
  • Operating system:
    Ubuntu LTS running on windows wsl2

WSL operating system:
Ubuntu 20.04.2 LTS (Focal Fossa)

WSL version:
5.10.16.3-microsoft-standard-WSL2

Windows version:
Windows 11 Version 21H2 (OS Build 22000.51)

Failed to retrieve tracked files for the project

Description

Expected Behavior

Actual Behavior
image

Details

Reproduce 1. nvim helloWorld.cc
Environment - nvim --version output: NVIM v0.5.0-dev+1362-g3cd688ff7 - Operating system: arch linux - VGit commit:

Failed Preview Highlights

Description

Open a file via telescope, use some preview feature and then close, it. After this, open the same file with nvim-tree.lua and you will notice that nvim-treesitter fails add highlights to the preview.

Expected Behavior
Previews should always be highlighted

Actual Behavior
Previewers are sometimes not highlighted

Details

Reproduce 1. Open a file via [telescope](https://github.com/nvim-telescope/telescope.nvim) 2. Use some preview feature and then close, it 3. Repeat Step-1 and Step-2 4. After this, open the same file with [nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua) 5. You will notice that [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) fails add highlights to the preview.
Environment - nvim --version output: NVIM v0.5.0-dev+1372-g056c464e8 - Operating system: Any

Foldable Lists Component

Describe the solution you'd like

VGit has the following reusable components:

  • Code (Used for previewing code and diff changes via Preview.lua)
  • Table (Can be used to construct table with rows and columns and column header via Preview.lua)

An addition to the UI components having foldable lists would be absolutely amazing from a usability perspective. there are some awesome plugins out there with similar features such as Trouble.nvim.

The goal is to use this foldable list and enhance project_diff_preview and bring out the usability of what can be seen in VSCode:

Capture

Must support the following feature:

  • The folds can be closed and opened by clicking or entering the fold header.
  • Folds should also show the number of elements inside the fold using virtual signs on the fold header.
  • Folds should be stackable.
  • Fold list items should be highly customizable.
  • Implementation must be decoupled to increase reusability in future components. Several other git features will be able to use this in the future, such as:
    • Branches
    • Commits
    • Stashes
  • Folds should be nestable.

Blame Preview

Describe the solution you'd like

As a user it would be really convenient to get a detailed view of the blame the user is currently on. Please see the screenshot below.

Screen Shot 2021-06-15 at 9 17 37 PM

Hunk navigation on previews

Describe the solution you'd like

In previews which show diff, users should be able to navigate the hunks if there are any.

undo hunk stage

Describe the solution you'd like
Add option to unstage a hunk
buffer_hunk_unstage

VGit fails for projects with repositories without a remote

Description

VGit fails for projects with repositories without a remote

Expected Behavior
Previews should always be highlighted

Actual Behavior
Previewers are sometimes not highlighted

Details

Reproduce 1. Create a repository not associated with any remote 2. Observe VGit failing to work 3.
Environment - nvim --version output: NVIM v0.5.0-dev+1372-g056c464e8 - Operating system: Any

Add Layout themes

Describe the solution you'd like

Layout support to configure previews.

Popups might not be everyone's thing. Themes will allow alternate ways of looking at vgit.nvim.

We want users of this plugin to have fine grained control on how they want to assemble vgit.nvim.

This feature will allow users to create their own layouts and submit future PRs for predefined configurations.

Hunk Prediction

Describe the solution you'd like

  • As the users are typing, the hunks should be calculated as I am typing
  • As I am typing, and as the buffer is unsaved, every single action available related to the hunks should all be workable

Buffer History with no commits

Description

On a repository with no commits, git log shows a error on the views.

Expected Behavior
Buffer history should show that there are no commits in the repository

Actual Behavior
Shows a view with an error message

Details

Reproduce 1. Open a file via [telescope](https://github.com/nvim-telescope/telescope.nvim) 2. Use some preview feature and then close, it 3. Repeat Step-1 and Step-2 4. After this, open the same file with [nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua) 5. You will notice that [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) fails add highlights to the preview.
Environment - nvim --version output: NVIM v0.5.0-dev+1372-g056c464e8 - Operating system: Any

Tests

Describe the solution you'd like

VGit has been falling behind test coverage. Before version v0.1.0 is released, the whole application must be secured by unit tests.

Investigate if there is a way to show test coverage for the project as well so that a baseline can be maintained at all costs.

Prevent Carriage Return Symbols

Description

In non Unix system, some files may indicate line breaks as carriage returns instead of line breaks. These symbols appear in previews and should be hidden.

A clear and concise description of your bug.

  • nvim --version output: NVIM v0.6.0-dev+13-ga6cdfa27d
  • Operating system: Ubuntu 20.04

Improve command output

Describe the solution you'd like

Would be great has auto complete when you press <Tab>

E.g.
When I input

:VGit buf<Tab>

I got hints of buff_hunk_next buff_diff_view etc

Also When input either VGit and VGit help
Instead shows missing argument error messages, output
all the available subcommands

Animated Spinner

We can have things that are nicer in the terminal. Loading spinners add a great user experience. Right now users only see a static text indicating that VGit view is currently loading something.

It would also be amazing if the spinner can be configurable by the users themselves.

Doesn't track updates from external program

Description

Hello. I'm using lazygit to work with git. When I got to lazygit in external terminal window and make some changes (commit, revert, or whatever) and then back to nvim with enabled vgit it doesn't react to any changes.

Can you fix it please?

  • nvim --version 0.5;
  • Nixo unstable

Support lazyload

Issue

When setup VGIt, the VGit buffer attach is hook to events.on('BufWinEnter', ':lua require("vgit")._buf_attach()')

This can be a problem if I would like to load the plugin on first VGit command, or, maybe on event BufWinEnter/CmdlineEnter.

Describe the solutions you'd like

  • In setup, attach the current buffer
  • BufferCache, if cache missed, try to load the buffer and return nil only when the buffer add is failed.

Window Focus Indicator

Describe the solution you'd like

As a user it can sometimes be confusing to know which window I am currently focused when a widget is open. Since this plugin is all about making git visually appealing to the users while being inside Neovim, it would really be useful if the user had an indicator to which window they are currently focusing in.

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.