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

Ability to stage files/buffers/hunks in project_* functions #135

Closed
fedoranvar opened this issue Sep 27, 2021 · 4 comments · Fixed by #152
Closed

Ability to stage files/buffers/hunks in project_* functions #135

fedoranvar opened this issue Sep 27, 2021 · 4 comments · Fixed by #152
Labels
enhancement New feature or request
Milestone

Comments

@fedoranvar
Copy link

Good day to you!

Is there any sense in adding ability to stage/unstage in project_* (qf or diff_preview)?

e.g.

if i'm in project_* UI, then :VGit buffer_hunk_stage will stage selected file/buffer/hunk

Thank you!

@fedoranvar fedoranvar added the enhancement New feature or request label Sep 27, 2021
@tanvirtin
Copy link
Owner

@fedoranvar hey and thanks for the feature request. I have always had plans to eventually add hunk staging and file staging/unstaging to project_diff_preview. I am not so sure how it would work on projects_hunks_qf though.

The biggest struggle right now is how keymaps and events are wired up within the plugin. The Neovim internal library and it's designs around autocmd and keymapping makes it challenging to add actions to buffers, since you can't really pass functions around.

I might need to redesign events in VGit before attempting this feature.

@tanvirtin tanvirtin added this to the v0.1.0 milestone Dec 26, 2021
tanvirtin added a commit that referenced this issue Dec 26, 2021
New Features:
- Much better user interface
- Much more performant
- Users can now cycle through the table view
- Reduced bloat from project
- Split diff view in hunk preview
- Ability for users to perform existing commands across Project Diff Preview.
- VGit now recognizes git files outside of the project's working directory
- VGit will now recognize if a file has been renamed.
- New preview called `project_hunks_preview` to open a quick preview of all the hunks in your entire project which looks similar to the quickfix preview, but with the VGit `CodeComponent` baked inside it. Allowing you to quickly see all the diffs in your project in both split and unified diff views.
- Ton of quality life improvements

Removed Features:
- diff base for gutter (current implementation makes the system very convoluted to use, e.g VSCode doesn't even support this)
- telescope integration (unnecessary bloat)
- Removed theming support (useless features makes makes codebase messy and complex)
- Removed layout support (too much configuration makes code harder to maintain)
- Renamed `buffer_staged_diff_preview` to `buffer_diff_staged_preview`

Closes issues:
- #120
- #119
- #100
- #79
- #145
- #155
- #154
- #135
tanvirtin added a commit that referenced this issue Dec 27, 2021
New Features:
- Much better user interface
- Much more performant
- Users can now cycle through the table view
- Reduced bloat from project
- Split diff view in hunk preview
- Ability for users to perform existing commands across Project Diff Preview.
- VGit now recognizes git files outside of the project's working directory
- VGit will now recognize if a file has been renamed.
- New preview called `project_hunks_preview` to open a quick preview of all the hunks in your entire project which looks similar to the quickfix preview, but with the VGit `CodeComponent` baked inside it. Allowing you to quickly see all the diffs in your project in both split and unified diff views.
- Ton of quality life improvements
- Optimized diff rendering

Removed Features:
- diff base for gutter (current implementation makes the system very convoluted to use, e.g VSCode doesn't even support this)
- telescope integration (unnecessary bloat)
- Removed theming support (useless features makes makes codebase messy and complex)
- Removed layout support (too much configuration makes code harder to maintain)
- Renamed `buffer_staged_diff_preview` to `buffer_diff_staged_preview`

Closes issues:
- #120
- #119
- #100
- #79
- #145
- #155
- #154
- #135
tanvirtin added a commit that referenced this issue Dec 28, 2021
New Features:
- Much better user interface
- Much more performant
- Users can now cycle through the table view
- Reduced bloat from project
- Split diff view in hunk preview
- Ability for users to perform existing commands across Project Diff Preview.
- VGit now recognizes git files outside of the project's working directory
- VGit will now recognize if a file has been renamed.
- New preview called `project_hunks_preview` to open a quick preview of all the hunks in your entire project which looks similar to the quickfix preview, but with the VGit `CodeComponent` baked inside it. Allowing you to quickly see all the diffs in your project in both split and unified diff views.
- Ton of quality life improvements
- Optimized diff rendering

Removed Features:
- diff base for gutter (current implementation makes the system very convoluted to use, e.g VSCode doesn't even support this)
- telescope integration (unnecessary bloat)
- Removed theming support (useless features makes makes codebase messy and complex)
- Removed layout support (too much configuration makes code harder to maintain)
- Renamed `buffer_staged_diff_preview` to `buffer_diff_staged_preview`

Closes issues:
- #120
- #119
- #100
- #79
- #145
- #155
- #154
- #135
tanvirtin added a commit that referenced this issue Dec 28, 2021
New Features:
- Much better user interface
- Much more performant
- Users can now cycle through the table view
- Reduced bloat from project
- Split diff view in hunk preview
- Ability for users to perform existing commands across Project Diff Preview.
- VGit now recognizes git files outside of the project's working directory
- VGit will now recognize if a file has been renamed.
- New preview called `project_hunks_preview` to open a quick preview of all the hunks in your entire project which looks similar to the quickfix preview, but with the VGit `CodeComponent` baked inside it. Allowing you to quickly see all the diffs in your project in both split and unified diff views.
- Ton of quality life improvements
- Optimized diff rendering

Removed Features:
- diff base for gutter (current implementation makes the system very convoluted to use, e.g VSCode doesn't even support this)
- telescope integration (unnecessary bloat)
- Removed theming support (useless features makes makes codebase messy and complex)
- Removed layout support (too much configuration makes code harder to maintain)
- Renamed `buffer_staged_diff_preview` to `buffer_diff_staged_preview`

Closes issues:
- #120
- #119
- #100
- #79
- #145
- #155
- #154
- #135
tanvirtin added a commit that referenced this issue Dec 28, 2021
New Features:
- Much better user interface
- Much more performant
- Users can now cycle through the table view
- Reduced bloat from project
- Split diff view in hunk preview
- Ability for users to perform existing commands across Project Diff Preview.
- VGit now recognizes git files outside of the project's working directory
- VGit will now recognize if a file has been renamed.
- New preview called `project_hunks_preview` to open a quick preview of all the hunks in your entire project which looks similar to the quickfix preview, but with the VGit `CodeComponent` baked inside it. Allowing you to quickly see all the diffs in your project in both split and unified diff views.
- Ton of quality life improvements
- Optimized diff rendering

Removed Features:
- diff base for gutter (current implementation makes the system very convoluted to use, e.g VSCode doesn't even support this)
- telescope integration (unnecessary bloat)
- Removed theming support (useless features makes makes codebase messy and complex)
- Removed layout support (too much configuration makes code harder to maintain)
- Renamed `buffer_staged_diff_preview` to `buffer_diff_staged_preview`

Closes issues:
- #120
- #119
- #100
- #79
- #145
- #155
- #154
- #135
@tanvirtin tanvirtin linked a pull request Dec 28, 2021 that will close this issue
tanvirtin added a commit that referenced this issue Dec 28, 2021
New Features:
- Much better user interface
- Much more performant
- Users can now cycle through the table view
- Reduced bloat from project
- Split diff view in hunk preview
- Ability for users to perform existing commands across Project Diff Preview.
- VGit now recognizes git files outside of the project's working directory
- VGit will now recognize if a file has been renamed.
- New preview called `project_hunks_preview` to open a quick preview of all the hunks in your entire project which looks similar to the quickfix preview, but with the VGit `CodeComponent` baked inside it. Allowing you to quickly see all the diffs in your project in both split and unified diff views.
- Ton of quality life improvements
- Optimized diff rendering

Removed Features:
- diff base for gutter (current implementation makes the system very convoluted to use, e.g VSCode doesn't even support this)
- telescope integration (unnecessary bloat)
- Removed theming support (useless features makes makes codebase messy and complex)
- Removed layout support (too much configuration makes code harder to maintain)
- Renamed `buffer_staged_diff_preview` to `buffer_diff_staged_preview`

Closes issues:
- #120
- #119
- #100
- #79
- #145
- #155
- #154
- #135
tanvirtin added a commit that referenced this issue Dec 28, 2021
New Features:
- Much better user interface
- Much more performant
- Users can now cycle through the table view
- Reduced bloat from project
- Split diff view in hunk preview
- Ability for users to perform existing commands across Project Diff Preview.
- VGit now recognizes git files outside of the project's working directory
- VGit will now recognize if a file has been renamed.
- New preview called `project_hunks_preview` to open a quick preview of all the hunks in your entire project which looks similar to the quickfix preview, but with the VGit `CodeComponent` baked inside it. Allowing you to quickly see all the diffs in your project in both split and unified diff views.
- Ton of quality life improvements
- Optimized diff rendering

Removed Features:
- diff base for gutter (current implementation makes the system very convoluted to use, e.g VSCode doesn't even support this)
- telescope integration (unnecessary bloat)
- Removed theming support (useless features makes makes codebase messy and complex)
- Removed layout support (too much configuration makes code harder to maintain)
- Renamed `buffer_staged_diff_preview` to `buffer_diff_staged_preview`

Closes issues:
- #120
- #119
- #100
- #79
- #145
- #155
- #154
- #135
@Shatur
Copy link
Contributor

Shatur commented Jan 2, 2022

@tanvirtin how can I do it? I tried to stage a hunk using the action, but it doesn't work.

@tanvirtin
Copy link
Owner

@Shatur stage hunk is not implemented yet. But you can execute commands such as buffer_stage, buffer_unstage, buffer_reset, stage_all and unstage_all

@Shatur
Copy link
Contributor

Shatur commented Jan 3, 2022

@tanvirtin got it, thanks!
These command currently missing in README.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants