mirror of
https://github.com/zoriya/dotfiles.git
synced 2026-05-27 00:23:58 +00:00
Adding a commit binding in the git status telescope
This commit is contained in:
@@ -4,7 +4,7 @@ if not status_ok then
|
||||
end
|
||||
|
||||
configs.setup({
|
||||
ensure_installed = "maintained",
|
||||
ensure_installed = "all",
|
||||
sync_install = false,
|
||||
highlight = {
|
||||
enable = true,
|
||||
|
||||
@@ -4,6 +4,12 @@ if not status_ok then
|
||||
end
|
||||
|
||||
local actions = require "telescope.actions"
|
||||
local transform_mod = require('telescope.actions.mt').transform_mod
|
||||
local local_actions = transform_mod({
|
||||
commit = function()
|
||||
vim.cmd(":Git commit")
|
||||
end,
|
||||
})
|
||||
|
||||
telescope.setup({
|
||||
defaults = {
|
||||
@@ -38,6 +44,13 @@ telescope.setup({
|
||||
hidden = true,
|
||||
find_command = { "fd", "--type", "f", "--strip-cwd-prefix", "-E", ".git" },
|
||||
},
|
||||
git_status = {
|
||||
mappings = {
|
||||
i = {
|
||||
["<c-c>"] = local_actions.commit,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user