initial import
This commit is contained in:
commit
f9f53656f7
32 changed files with 1064 additions and 0 deletions
154
lua/plugins/commander.lua
Normal file
154
lua/plugins/commander.lua
Normal file
|
|
@ -0,0 +1,154 @@
|
|||
return {
|
||||
{
|
||||
"FeiyouG/commander.nvim",
|
||||
dependencies = { "nvim-telescope/telescope.nvim" },
|
||||
init = function()
|
||||
require("commander").setup({
|
||||
integration = {
|
||||
telescope = {
|
||||
enable = true,
|
||||
theme = require("telescope.themes").commander,
|
||||
},
|
||||
lazy = {
|
||||
enable = true,
|
||||
set_plugin_name_as_cat = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
require("commander").add({
|
||||
{
|
||||
desc = "Find git files",
|
||||
cmd = ":FzfLua git_files<CR>",
|
||||
},
|
||||
{
|
||||
cmd = ":FzfLua files<CR>",
|
||||
desc = "Find files",
|
||||
},
|
||||
{
|
||||
cmd = ":FzfLua buffers<CR>",
|
||||
desc = "Buffer list",
|
||||
},
|
||||
{
|
||||
cmd = ":FzfLua quickfix<CR>",
|
||||
desc = "Quickfix",
|
||||
},
|
||||
{
|
||||
cmd = ":FzfLua quickfix_stack<CR>",
|
||||
desc = "Quickfix History",
|
||||
},
|
||||
{
|
||||
cmd = ":FzfLua command_history<CR>",
|
||||
desc = "Command History",
|
||||
},
|
||||
{
|
||||
cmd = ":FzfLua git_commits<CR>",
|
||||
desc = "Git commits",
|
||||
},
|
||||
{
|
||||
cmd = ":FzfLua git_bcommits<CR>",
|
||||
desc = "Git buffer commits",
|
||||
},
|
||||
{
|
||||
cmd = ":FzfLua git_branches<CR>",
|
||||
desc = "Git branches",
|
||||
},
|
||||
{
|
||||
cmd = ":GV<CR>",
|
||||
desc = "Git log",
|
||||
},
|
||||
{
|
||||
cmd = ":Git blame",
|
||||
desc = "Git blame",
|
||||
},
|
||||
{
|
||||
cmd = ":DiffviewOpen<CR>",
|
||||
desc = "Diff view",
|
||||
},
|
||||
{
|
||||
cmd = ":UndotreeToggle<CR>",
|
||||
desc = "Undotree",
|
||||
},
|
||||
{
|
||||
cmd = ":EslintFixAll<CR>",
|
||||
desc = "ESLint: autofix all problems",
|
||||
},
|
||||
{
|
||||
cmd = ":'<,'>sort",
|
||||
desc = "Sort",
|
||||
},
|
||||
{
|
||||
cmd = ":Fidget history<CR>",
|
||||
desc = "Error/notification history",
|
||||
},
|
||||
{
|
||||
cmd = ":lua Snacks.terminal.toggle()<CR>",
|
||||
desc = "Terminal",
|
||||
keys = { "n", "<leader>t" },
|
||||
set = false,
|
||||
},
|
||||
{
|
||||
cmd = ":GitConflicts<CR>",
|
||||
desc = "Git conflicts to quickfix",
|
||||
},
|
||||
{
|
||||
cmd = ":LastCommitToQuickfix<CR>",
|
||||
desc = "Last Commit To quickfix",
|
||||
},
|
||||
{
|
||||
cmd = ":ForkToQuickfix<CR>",
|
||||
desc = "Branch commits to quickfix",
|
||||
},
|
||||
{
|
||||
cmd = ":Trouble diagnostics toggle focus=false filter.buf=0<CR>",
|
||||
desc = "Diagnostic window (current buffer)",
|
||||
},
|
||||
{
|
||||
cmd = ":Trouble symbols toggle pinned=true results.win.relative=win results.win.position=right<CR>",
|
||||
desc = "Symbols",
|
||||
},
|
||||
{
|
||||
cmd = ":PackageInfoShow<CR>",
|
||||
desc = "Show package.json versions",
|
||||
},
|
||||
{
|
||||
cmd = ":PackageInfoHide<CR>",
|
||||
desc = "Hide package.json versions",
|
||||
},
|
||||
{
|
||||
cmd = ":PackageInfoUpdate<CR>",
|
||||
desc = "Update package.json dependency",
|
||||
},
|
||||
{
|
||||
cmd = ":CoAuthor<CR>",
|
||||
desc = "Add Git CoAuthor",
|
||||
},
|
||||
{
|
||||
cmd = ":TailwindConcealToggle<CR>",
|
||||
desc = "Toggle conceal tailwind classes",
|
||||
},
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("Commander", function(args)
|
||||
require("commander").show()
|
||||
end, {
|
||||
desc = "Show commands",
|
||||
nargs = "*",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("LastCommitToQuickfix", function(args)
|
||||
require("utils.telescope").last_commit_to_quickfix()
|
||||
end, {
|
||||
desc = "Last Commit To quickfix",
|
||||
nargs = "?",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("ForkToQuickfix", function(args)
|
||||
require("utils.telescope").fork_to_quickfix(args.fargs[1])
|
||||
end, {
|
||||
desc = "Branch changes to quickfix",
|
||||
nargs = "?",
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue