tanvirtin / vgit.nvim Goto Github PK
View Code? Open in Web Editor NEWVisual git plugin for Neovim
License: MIT License
Visual git plugin for Neovim
License: MIT License
Hello. When I restore my session with vim-obsession
(https://github.com/tpope/vim-obsession) vgit
doesn't track it.
Highlight Groups are not being set automatically.
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?
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
}
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.
Hello. Can I somehow toggle git blame for whole file or block of lines?
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
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 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
There are bounds issues when navigating through a file with hunks with lnum at the top and or at the bottom.
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.
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.
Describe the solution you'd like
Plenary merge #148 implements a faster coroutine manager. Goal would to convert exsting async
and await
functionality to the new faster approach to coroutines in lua.
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.
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
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:
Using the new folding lists enhance the look and feel of project_diff_preview
further to match that of the screenshot.
Describe the solution you'd like
When navigating previews with hunk_up
or hunk_down
on a VGit preview, its really hard to figure out exactly what hunks you are currently on while navigating.
Solution:
Having the hunk currently being navigated somewhere within the preview would resolve this issue.
Opening an closing buffer multiple times prevents the hunk prediction feature disabled
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.
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 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
λ ›
Describe the solution you'd like
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'
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:
Operating system:
Love your works and thanks!
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!
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.
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
Describe the solution you'd like
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 v0.5.0
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
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)
As a user VGit should be usable when current working directory is not a git directory. Currently this feature exists on text editors like VScode which can be really helpful sometimes.
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
Describe the solution you'd like
VGit has the following reusable components:
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:
Must support the following feature:
Describe the solution you'd like
In previews which show diff, users should be able to navigate the hunks if there are any.
It would be nice to be able to change the base on the fly to another commit.
This allows for example to keep committing on a feature branch, but compare the current state against the develop branch.
Or, check out a Pull Request and compare it to the target branch.
Other plugins implement this, eg.
https://github.com/airblade/vim-gitgutter#the-base-of-the-diff
Describe the solution you'd like
Add option to unstage a hunk
buffer_hunk_unstage
VGit fails for projects with repositories without a remote
Expected Behavior
Previews should always be highlighted
Actual Behavior
Previewers are sometimes not highlighted
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.
Describe the solution you'd like
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
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.
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.
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
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.
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?
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
Problem: Highlight from current line blame kills the cursor line as it sits on top of it.
Expected: Line blame virtual text should not effect bg of cursorline.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.