radiant.nvim/lua/core/keybinds.lua
Muhammad Nauman Raza 2f864fbed0
feat: neogit use current buffer as cwd
Current working directory for git is now the current buffer.
2024-01-16 20:51:47 +00:00

32 lines
936 B
Lua

local wk = require("which-key")
wk.register({
f = {
name = "file",
f = { "<cmd>Telescope find_files<cr>", "Find File" },
g = { "<cmd>Telescope live_grep<cr>", "Find Word" },
s = { "<cmd>:w<cr>", "Write" },
w = { "<cmd>:w!<cr>", "Force Write" },
e = { ":e ", "Edit File", silent = false },
},
t = {
name = "tabs",
n = { "<cmd>tabnew<cr>", "New Tab" },
j = { "<cmd>tabprev<cr>", "Previous Tab" },
k = { "<cmd>tabnext<cr>", "Next Tab" },
},
l = {
name = "lazy",
u = { "<cmd>Lazy update<cr>", "Update" },
s = { "<cmd>Lazy sync<cr>", "Sync" },
},
g = {
name = "git",
p = { "<cmd>Neogit cwd=" .. vim.fn.expand("%:p:h") .. " push<cr>", "Push Popup" },
c = { "<cmd>Neogit cwd=" .. vim.fn.expand("%:p:h") .. " commit<cr>", "Commit Popup" },
g = { "<cmd>Neogit<cr>", "Neogit" },
},
["."] = { ":e ", "Edit File", silent = false },
}, { prefix = "<leader>" })