Add git fixup in telescope

This commit is contained in:
2025-02-05 15:59:56 +01:00
parent 58a4cc53d6
commit c360287100
2 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -151,7 +151,7 @@ in {
services.transmission = {
enable = true;
package = pkgs.transmission_4;
# Make downloaded items readable/writtable by users
# Make downloaded items readable/writable by users
group = "users";
settings = {
incomplete-dir-enabled = false;
+10 -2
View File
@@ -55,6 +55,12 @@ return {
vim.cmd("Gedit " .. entry.value)
end
local function git_fixup(bufr)
actions.close(bufr)
local entry = action_state.get_selected_entry()
vim.cmd("G commit --fixup=" .. entry.value)
end
local telescope = require("telescope")
telescope.setup({
@@ -87,7 +93,8 @@ return {
mappings = {
i = {
["<CR>"] = git_show,
["<C-g>"] = git_show_split
["<C-g>"] = git_show_split,
["<C-f>"] = git_fixup,
},
},
},
@@ -96,7 +103,8 @@ return {
mappings = {
i = {
["<CR>"] = git_show,
["<C-g>"] = git_show_split
["<C-g>"] = git_show_split,
["<C-f>"] = git_fixup,
},
},
},