From 1ddbaa87bdb0aa7172d1fd9cdbc375c130921894 Mon Sep 17 00:00:00 2001 From: ctt4711 Date: Fri, 12 Sep 2025 09:59:58 -0400 Subject: [PATCH] adding fugitive --- README.md | 17 ++++++------- lazy-lock.json | 7 +++--- lua/clevertwain/plugins/fugitive.lua | 37 ++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 12 deletions(-) create mode 100644 lua/clevertwain/plugins/fugitive.lua diff --git a/README.md b/README.md index 9d96461..6710376 100644 --- a/README.md +++ b/README.md @@ -57,9 +57,6 @@ Neovim's configurations are located under the following paths, depending on your so that you have your own copy that you can modify, then install by cloning the fork to your machine using one of the commands below, depending on your OS. -> [!NOTE] -> Your fork's URL will be something like this: -> `https://github.com//kickstart.nvim.git` You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file too - it's ignored in the kickstart repo to make maintenance easier, but it's @@ -73,22 +70,24 @@ too - it's ignored in the kickstart repo to make maintenance easier, but it's git clone https://github.com/CeeWeasel/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim ``` +```sh +git clone https://gitea.clintweaver.com/clevergit/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim +``` +
Windows -If you're using `cmd.exe`: - -``` -git clone https://github.com/CeeWeasel/kickstart.nvim.git "%localappdata%\nvim" -``` - If you're using `powershell.exe` ``` git clone https://github.com/CeeWeasel/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim" ``` +``` +git clone https://gitea.clintweaver.com/clevergit/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim" +``` +
### Post Installation diff --git a/lazy-lock.json b/lazy-lock.json index d507df6..7474764 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -4,7 +4,7 @@ "brightburn.vim": { "branch": "master", "commit": "fc0d2fafc51e86d6065acd54b5e82e686019ff2f" }, "conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" }, "fidget.nvim": { "branch": "main", "commit": "4d5858bd4c471c895060e1b9f3575f1551184dc5" }, - "gitsigns.nvim": { "branch": "main", "commit": "6e3c66548035e50db7bd8e360a29aec6620c3641" }, + "gitsigns.nvim": { "branch": "main", "commit": "f780609807eca1f783a36a8a31c30a48fbe150c5" }, "gruvbox": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" }, "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, "harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" }, @@ -19,7 +19,7 @@ "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-dap": { "branch": "master", "commit": "7523676a4be17644587aa47e4d42f6f7646d4727" }, "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, - "nvim-lspconfig": { "branch": "master", "commit": "bc09aa236d7d2af66f56a5a35d0577588eca7800" }, + "nvim-lspconfig": { "branch": "master", "commit": "d89f4891f0720cd2598e4bdd60010d8784b2ac8a" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, "nvim-web-devicons": { "branch": "master", "commit": "6e51ca170563330e063720449c21f43e27ca0bc1" }, @@ -27,12 +27,13 @@ "rose-pine": { "branch": "main", "commit": "72a04c4065345b51b56aed4859ea1d884f734097" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, - "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, + "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }, "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, "undotree": { "branch": "master", "commit": "fe9a9d0645f0f5532360b5e5f5c550d7bb4f1869" }, "vim-be-good": { "branch": "master", "commit": "0ae3de14eb8efc6effe7704b5e46495e91931cc5" }, + "vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" }, "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }, "zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" } } diff --git a/lua/clevertwain/plugins/fugitive.lua b/lua/clevertwain/plugins/fugitive.lua new file mode 100644 index 0000000..4ad436e --- /dev/null +++ b/lua/clevertwain/plugins/fugitive.lua @@ -0,0 +1,37 @@ +return { + 'tpope/vim-fugitive', + config = function() + vim.keymap.set('n', 'gs', vim.cmd.Git) + + local CleverTwain_Fugitive = vim.api.nvim_create_augroup('CleverTwain_Fugitive', {}) + + local autocmd = vim.api.nvim_create_autocmd + autocmd('BufWinEnter', { + group = CleverTwain_Fugitive, + pattern = '*', + callback = function() + if vim.bo.ft ~= 'fugitive' then + return + end + + local bufnr = vim.api.nvim_get_current_buf() + local opts = { buffer = bufnr, remap = false } + vim.keymap.set('n', 'p', function() + vim.cmd.Git 'push' + end, opts) + + -- rebase always + vim.keymap.set('n', 'P', function() + vim.cmd.Git { 'pull', '--rebase' } + end, opts) + + -- NOTE: It allows me to easily set the branch i am pushing and any tracking + -- needed if i did not set the branch up correctly + vim.keymap.set('n', 't', ':Git push -u origin ', opts) + end, + }) + + vim.keymap.set('n', 'gu', 'diffget //2') + vim.keymap.set('n', 'gh', 'diffget //3') + end, +}