update to new command center format

This commit is contained in:
Oliver Hartmann 2022-04-19 09:29:36 +02:00
parent 7f99415c02
commit 8a000f811c

View File

@ -7,7 +7,7 @@ local silent_noremap = { noremap = true, silent = true }
command_center.add({ command_center.add({
{ {
description = 'Open command_center', description = 'Open command_center',
command = 'Telescope command_center', cmd = '<CMD>Telescope command_center<CR>',
keybindings = { keybindings = {
{ 'n', '<Leader>p', noremap }, { 'n', '<Leader>p', noremap },
{ 'v', '<Leader>p', noremap }, { 'v', '<Leader>p', noremap },
@ -15,118 +15,118 @@ command_center.add({
}, },
{ {
description = 'Open a new tab', description = 'Open a new tab',
command = 'tabnew .', cmd = '<CMD>tabnew .<CR>',
keybindings = { keybindings = {
{ 'n', 'F2', silent_noremap }, { 'n', 'F2', silent_noremap },
}, },
}, },
{ {
description = 'Open a new vertical split', description = 'Open a new vertical split',
command = 'vsplit .', cmd = '<CMD>vsplit .<CR>',
keybindings = { keybindings = {
{ 'n', '<C-F2>', silent_noremap }, { 'n', '<C-F2>', silent_noremap },
}, },
}, },
{ {
description = 'Open a new horizontal split', description = 'Open a new horizontal split',
command = 'split .', cmd = '<CMD>split .<CR>',
keybindings = { keybindings = {
{ 'n', '<S-F2>', silent_noremap }, { 'n', '<S-F2>', silent_noremap },
}, },
}, },
{ {
description = 'CMake build all', description = 'CMake build all',
command = 'CMake build_all', cmd = '<CMD>CMake build_all<CR>',
}, },
{ {
description = 'CMake build selected target', description = 'CMake build selected target',
command = 'CMake build', cmd = '<CMD>CMake build<CR>',
keybindings = { keybindings = {
{ 'n', 'F5', silent_noremap }, { 'n', 'F5', silent_noremap },
}, },
}, },
{ {
description = 'CMake configure', description = 'CMake configure',
command = 'CMake configure', cmd = '<CMD>CMake configure<CR>',
}, },
{ {
description = 'CMake select target', description = 'CMake select target',
command = 'CMake select_target', cmd = '<CMD>CMake select_target<CR>',
}, },
{ {
description = 'CMake clear cache', description = 'CMake clear cache',
command = 'CMake clear_cache', cmd = '<CMD>CMake clear_cache<CR>',
}, },
{ {
description = 'List snippets', description = 'List snippets',
command = 'LuaSnipListAvailable', cmd = '<CMD>LuaSnipListAvailable<CR>',
}, },
{ {
description = 'Add comment', description = 'Add comment',
command = 'Neogen', cmd = '<CMD>Neogen<CR>',
keybindings = { keybindings = {
{ 'n', '<leader>n', silent_noremap }, { 'n', '<leader>n', silent_noremap },
}, },
}, },
{ {
description = 'Select project', description = 'Select project',
command = 'Telescope projects', cmd = '<CMD>Telescope projects<CR>',
keybindings = { keybindings = {
{ 'n', '<space>p', silent_noremap }, { 'n', '<space>p', silent_noremap },
}, },
}, },
{ {
description = 'Find file', description = 'Find file',
command = 'lua require("telescope.builtin").find_files({no_ignore=true})', cmd = '<CMD>lua require("telescope.builtin").find_files({no_ignore=true})<CR>',
keybindings = { keybindings = {
{ 'n', '<leader>f', silent_noremap }, { 'n', '<leader>f', silent_noremap },
}, },
}, },
{ {
description = 'Find file (with gitignore)', description = 'Find file (with gitignore)',
command = 'lua require("telescope.builtin").find_files({no_ignore=false})', cmd = '<CMD>lua require("telescope.builtin").find_files({no_ignore=false})<CR>',
keybindings = { keybindings = {
{ 'n', '<C-p>', silent_noremap }, { 'n', '<C-p>', silent_noremap },
}, },
}, },
{ {
description = 'Find git files', description = 'Find git files',
command = 'Telescope git_files', cmd = '<CMD>Telescope git_files<CR>',
keybindings = { keybindings = {
{ 'n', '<leader>g', silent_noremap }, { 'n', '<leader>g', silent_noremap },
}, },
}, },
{ {
description = 'Find old files', description = 'Find old files',
command = 'Telescope oldfiles', cmd = '<CMD>Telescope oldfiles<CR>',
keybindings = { keybindings = {
{ 'n', '<leader>o', silent_noremap }, { 'n', '<leader>o', silent_noremap },
}, },
}, },
{ {
description = 'Open command history', description = 'Open command history',
command = 'Telescope command_history', cmd = '<CMD>Telescope command_history<CR>',
keybindings = { keybindings = {
{ 'n', '<leader>h', silent_noremap }, { 'n', '<leader>h', silent_noremap },
}, },
}, },
{ {
description = 'Select buffer', description = 'Select buffer',
command = 'Telescope buffers', cmd = '<CMD>Telescope buffers<CR>',
keybindings = { keybindings = {
{ 'n', '<leader>b', silent_noremap }, { 'n', '<leader>b', silent_noremap },
}, },
}, },
{ {
description = 'Quickfix list with telescope', description = 'Quickfix list with telescope',
command = 'Telescope quickfix', cmd = '<CMD>Telescope quickfix<CR>',
keybindings = { keybindings = {
{ 'n', '<leader>q', silent_noremap }, { 'n', '<leader>q', silent_noremap },
}, },
}, },
{ {
description = 'Search in project', description = 'Search in project',
command = 'Telescope live_grep', cmd = '<CMD>Telescope live_grep<CR>',
keybindings = { keybindings = {
{ 'n', '<leader>l', silent_noremap }, { 'n', '<leader>l', silent_noremap },
{ 'n', '<c-s-f>', silent_noremap }, { 'n', '<c-s-f>', silent_noremap },
@ -134,28 +134,28 @@ command_center.add({
}, },
{ {
description = 'Open clipboard history', description = 'Open clipboard history',
command = 'Telescope neoclip', cmd = '<CMD>Telescope neoclip<CR>',
keybindings = { keybindings = {
{ 'n', '<C-y>', silent_noremap }, { 'n', '<C-y>', silent_noremap },
}, },
}, },
{ {
description = 'Open jumplist', description = 'Open jumplist',
command = 'Telescope jumplist', cmd = '<CMD>Telescope jumplist<CR>',
keybindings = { keybindings = {
{ 'n', '<leader>j', silent_noremap }, { 'n', '<leader>j', silent_noremap },
}, },
}, },
{ {
description = 'Find in buffer', description = 'Find in buffer',
command = 'Telescope current_buffer_fuzzy_find', cmd = '<CMD>Telescope current_buffer_fuzzy_find<CR>',
keybindings = { keybindings = {
{ 'n', '<c-f>', silent_noremap }, { 'n', '<c-f>', silent_noremap },
}, },
}, },
{ {
description = 'Open lazygit', description = 'Open lazygit',
command = 'lua _lazygit_toggle()', cmd = '<CMD>lua _lazygit_toggle()<CR>',
keybindings = { keybindings = {
{ 'n', '<Space>g', silent_noremap }, { 'n', '<Space>g', silent_noremap },
}, },