added fugitive
This commit is contained in:
parent
876322112e
commit
bf1e52d87a
|
@ -1,35 +0,0 @@
|
||||||
---
|
|
||||||
name: Bug report
|
|
||||||
about: Create a report to help us improve
|
|
||||||
title: ''
|
|
||||||
labels: ''
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
<!-- Any bug report not following this template will be immediately closed. Thanks -->
|
|
||||||
|
|
||||||
## Before Reporting an Issue
|
|
||||||
- I have read the kickstart.nvim README.md.
|
|
||||||
- I have read the appropriate plugin's documentation.
|
|
||||||
- I have searched that this issue has not been reported before.
|
|
||||||
|
|
||||||
- [ ] **By checking this, I confirm that the above steps are completed. I understand leaving this unchecked will result in this report being closed immediately.**
|
|
||||||
|
|
||||||
## Describe the bug
|
|
||||||
<!-- A clear and concise description of what the bug is. -->
|
|
||||||
|
|
||||||
## To Reproduce
|
|
||||||
<!-- Steps to reproduce the behavior. -->
|
|
||||||
1. ...
|
|
||||||
|
|
||||||
## Desktop
|
|
||||||
<!-- please complete the following information. -->
|
|
||||||
- OS:
|
|
||||||
- Terminal:
|
|
||||||
|
|
||||||
## Neovim Version
|
|
||||||
<!-- Output of running `:version` from inside of neovim. -->
|
|
||||||
|
|
||||||
```
|
|
||||||
```
|
|
|
@ -0,0 +1 @@
|
||||||
|
/nix/store/sxkaavdlrf0762h3k07j2jm9b7d3656n-home-manager-files/.config/git/templates/.github/ISSUE_TEMPLATE/bug_report.md
|
|
@ -0,0 +1 @@
|
||||||
|
/nix/store/sxkaavdlrf0762h3k07j2jm9b7d3656n-home-manager-files/.config/git/templates/.github/ISSUE_TEMPLATE/config.yml
|
|
@ -0,0 +1 @@
|
||||||
|
/nix/store/sxkaavdlrf0762h3k07j2jm9b7d3656n-home-manager-files/.config/git/templates/.github/ISSUE_TEMPLATE/feature_request.md
|
|
@ -1,8 +0,0 @@
|
||||||
***************************************************************************
|
|
||||||
**NOTE**
|
|
||||||
Please verify that the `base repository` above has the intended destination!
|
|
||||||
Github by default opens Pull Requests against the parent of a forked repository.
|
|
||||||
If this is your personal fork and you didn't intend to open a PR for contribution
|
|
||||||
to the original project then adjust the `base repository` accordingly.
|
|
||||||
**************************************************************************
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
/nix/store/sxkaavdlrf0762h3k07j2jm9b7d3656n-home-manager-files/.config/git/templates/.github/pull_request_template.md
|
|
@ -1,21 +0,0 @@
|
||||||
# Check Lua Formatting
|
|
||||||
name: Check Lua Formatting
|
|
||||||
on: pull_request_target
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
stylua-check:
|
|
||||||
if: github.repository == 'nvim-lua/kickstart.nvim'
|
|
||||||
name: Stylua Check
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout Code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
|
||||||
- name: Stylua Check
|
|
||||||
uses: JohnnyMorganz/stylua-action@v3
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
version: latest
|
|
||||||
args: --check .
|
|
||||||
|
|
|
@ -0,0 +1,73 @@
|
||||||
|
return {
|
||||||
|
-- Fugitive - Git integration
|
||||||
|
{
|
||||||
|
'tpope/vim-fugitive',
|
||||||
|
cmd = { 'Git', 'G', 'Gdiff', 'Gread', 'Gwrite', 'Ggrep', 'GMove', 'GDelete', 'GBrowse', 'GRemove' },
|
||||||
|
keys = {
|
||||||
|
{ '<leader>gs', '<cmd>Git<cr>', desc = 'Git status' },
|
||||||
|
{ '<leader>gd', '<cmd>Gdiff<cr>', desc = 'Git diff' },
|
||||||
|
{ '<leader>gc', '<cmd>Git commit<cr>', desc = 'Git commit' },
|
||||||
|
{ '<leader>gb', '<cmd>Git blame<cr>', desc = 'Git blame' },
|
||||||
|
{ '<leader>gl', '<cmd>Git log<cr>', desc = 'Git log' },
|
||||||
|
{ '<leader>gp', '<cmd>Git push<cr>', desc = 'Git push' },
|
||||||
|
{ '<leader>gf', '<cmd>Git fetch<cr>', desc = 'Git fetch' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- Gitsigns - Git gutter and hunk operations
|
||||||
|
{
|
||||||
|
'lewis6991/gitsigns.nvim',
|
||||||
|
opts = {
|
||||||
|
signs = {
|
||||||
|
add = { text = '+' },
|
||||||
|
change = { text = '~' },
|
||||||
|
delete = { text = '_' },
|
||||||
|
topdelete = { text = '‾' },
|
||||||
|
changedelete = { text = '~' },
|
||||||
|
},
|
||||||
|
on_attach = function(bufnr)
|
||||||
|
local gitsigns = require('gitsigns')
|
||||||
|
|
||||||
|
local function map(mode, l, r, opts)
|
||||||
|
opts = opts or {}
|
||||||
|
opts.buffer = bufnr
|
||||||
|
vim.keymap.set(mode, l, r, opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Navigation
|
||||||
|
map('n', ']c', function()
|
||||||
|
if vim.wo.diff then
|
||||||
|
vim.cmd.normal({']c', bang = true})
|
||||||
|
else
|
||||||
|
gitsigns.nav_hunk('next')
|
||||||
|
end
|
||||||
|
end, { desc = 'Next git hunk' })
|
||||||
|
|
||||||
|
map('n', '[c', function()
|
||||||
|
if vim.wo.diff then
|
||||||
|
vim.cmd.normal({'[c', bang = true})
|
||||||
|
else
|
||||||
|
gitsigns.nav_hunk('prev')
|
||||||
|
end
|
||||||
|
end, { desc = 'Previous git hunk' })
|
||||||
|
|
||||||
|
-- Actions
|
||||||
|
map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'Stage hunk' })
|
||||||
|
map('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'Reset hunk' })
|
||||||
|
map('v', '<leader>hs', function() gitsigns.stage_hunk {vim.fn.line('.'), vim.fn.line('v')} end, { desc = 'Stage hunk' })
|
||||||
|
map('v', '<leader>hr', function() gitsigns.reset_hunk {vim.fn.line('.'), vim.fn.line('v')} end, { desc = 'Reset hunk' })
|
||||||
|
map('n', '<leader>hS', gitsigns.stage_buffer, { desc = 'Stage buffer' })
|
||||||
|
map('n', '<leader>hu', gitsigns.undo_stage_hunk, { desc = 'Undo stage hunk' })
|
||||||
|
map('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'Reset buffer' })
|
||||||
|
map('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'Preview hunk' })
|
||||||
|
map('n', '<leader>hb', function() gitsigns.blame_line{full=true} end, { desc = 'Blame line' })
|
||||||
|
map('n', '<leader>tb', gitsigns.toggle_current_line_blame, { desc = 'Toggle line blame' })
|
||||||
|
map('n', '<leader>hd', gitsigns.diffthis, { desc = 'Diff this' })
|
||||||
|
map('n', '<leader>hD', function() gitsigns.diffthis('~') end, { desc = 'Diff this ~' })
|
||||||
|
map('n', '<leader>td', gitsigns.toggle_deleted, { desc = 'Toggle deleted' })
|
||||||
|
|
||||||
|
-- Text object
|
||||||
|
map({'o', 'x'}, 'ih', ':<C-U>Gitsigns select_hunk<CR>', { desc = 'Select hunk' })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
|
@ -7,6 +7,7 @@ return {
|
||||||
-- { import = 'custom.plugins.completion' },
|
-- { import = 'custom.plugins.completion' },
|
||||||
{ import = 'custom.plugins.debug' },
|
{ import = 'custom.plugins.debug' },
|
||||||
{ import = 'custom.plugins.formatting' },
|
{ import = 'custom.plugins.formatting' },
|
||||||
|
{ import = 'custom.plugins.git' },
|
||||||
{ import = 'custom.plugins.lsp' },
|
{ import = 'custom.plugins.lsp' },
|
||||||
{ import = 'custom.plugins.nvim-tmux-navigator' },
|
{ import = 'custom.plugins.nvim-tmux-navigator' },
|
||||||
{ import = 'custom.plugins.telescope' },
|
{ import = 'custom.plugins.telescope' },
|
||||||
|
|
Loading…
Reference in New Issue