diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 2219726..623b640 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -166,12 +166,6 @@ return require('packer').startup(function() 'akinsho/toggleterm.nvim', config = get_setup('toggleterm'), }) - use({ - 'gfeiyou/command-center.nvim', - requires = { 'nvim-telescope/telescope.nvim' }, - config = get_setup('my_command_center'), - disable = true - }) use({ 'mrjones2014/legendary.nvim', config = get_setup('my_legendary') diff --git a/lua/setup/my_command_center.lua b/lua/setup/my_command_center.lua deleted file mode 100644 index 6a6a0a9..0000000 --- a/lua/setup/my_command_center.lua +++ /dev/null @@ -1,245 +0,0 @@ -require('telescope').load_extension('command_center') - -local command_center = require('command_center') -local noremap = { noremap = true } -local silent_noremap = { noremap = true, silent = true } - -project_files = function() - local opts = {} -- define here if you want to define something - local ok = pcall(require "telescope.builtin".git_files, opts) - if not ok then require "telescope.builtin".find_files(opts) end -end - -command_center.add({ - { - description = 'Open command_center', - cmd = 'Telescope command_center', - keybindings = { - { 'n', 'p', noremap }, - { 'x', 'p', noremap }, - }, - }, - { - description = 'Open a new tab', - cmd = 'tabnew .', - keybindings = { - { 'n', 'F2', silent_noremap }, - }, - }, - { - description = 'Open a new vertical split', - cmd = 'vsplit .', - keybindings = { - { 'n', '', silent_noremap }, - }, - }, - { - description = 'Open a new horizontal split', - cmd = 'split .', - keybindings = { - { 'n', '', silent_noremap }, - }, - }, - { - description = 'CMake build all', - cmd = 'CMake build_all', - }, - { - description = 'CMake build selected target', - cmd = 'CMake build', - keybindings = { - { 'n', '', silent_noremap }, - }, - }, - { - description = 'CMake configure', - cmd = 'CMake configure', - }, - { - description = 'CMake select target', - cmd = 'CMake select_target', - }, - { - description = 'CMake clear cache', - cmd = 'CMake clear_cache', - }, - { - description = 'List snippets', - cmd = 'LuaSnipListAvailable', - }, - { - description = 'Add comment', - cmd = 'Neogen', - keybindings = { - { 'n', 'n', silent_noremap }, - }, - }, - { - description = 'Select project', - cmd = 'Telescope projects', - keybindings = { - { 'n', 'p', silent_noremap }, - }, - }, - { - description = 'Find file', - cmd = 'lua require("telescope.builtin").find_files({no_ignore=true})', - keybindings = { - { 'n', 'f', silent_noremap }, - }, - }, - { - description = 'Find git files', - cmd = 'lua project_files()', - keybindings = { - { 'n', 'g', silent_noremap }, - }, - }, - { - description = 'Find old files', - cmd = 'Telescope oldfiles', - keybindings = { - { 'n', 'o', silent_noremap }, - }, - }, - { - description = 'Open command history', - cmd = 'Telescope command_history', - keybindings = { - { 'n', 'h', silent_noremap }, - }, - }, - { - description = 'Select buffer', - cmd = 'Telescope buffers', - keybindings = { - { 'n', 'b', silent_noremap }, - }, - }, - { - description = 'Quickfix list with telescope', - cmd = 'Telescope quickfix', - keybindings = { - { 'n', 'q', silent_noremap }, - }, - }, - { - description = 'Search in project', - cmd = 'Telescope live_grep', - keybindings = { - { 'n', 'l', silent_noremap }, - { 'n', '', silent_noremap }, - }, - }, - { - description = 'Search in open files', - cmd = "lua require('telescope.builtin').live_grep({ prompt_title = 'find string in open buffers...', grep_open_files = true })", - }, - { - description = 'Open clipboard history', - cmd = 'Telescope neoclip', - keybindings = { - { 'n', '', silent_noremap }, - }, - }, - { - description = 'Open jumplist', - cmd = 'Telescope jumplist', - keybindings = { - { 'n', 'j', silent_noremap }, - }, - }, - { - description = 'Find in buffer', - cmd = 'Telescope current_buffer_fuzzy_find', - keybindings = { - { 'n', '', silent_noremap }, - }, - }, - { - description = 'Find in workspace', - cmd = 'Telescope grep_string', - keybindings = { - { 'n', 'd', silent_noremap }, - }, - }, - { - description = 'Open lazygit', - cmd = 'lua _lazygit_toggle()', - keybindings = { - { 'n', 'g', silent_noremap }, - }, - }, - { - description = 'Word under cursor into register a', - cmd = '"ayiw', - keybindings = { - { 'n', 'a', silent_noremap }, - }, - }, - { - description = 'Toggle fold', - cmd = 'za', - keybindings = { - { 'n', 'x', silent_noremap }, - }, - }, - { - description = 'Yanky cycle forward', - cmd = '(YankyCycleForward)', - keybindings = { - { 'n', '', silent_noremap }, - }, - }, - { - description = 'Yanky cycle backward', - cmd = '(YankyCycleBackward)', - keybindings = { - { 'n', '', silent_noremap }, - }, - }, - { - description = 'Github list PRs', - cmd = 'Octo pr list', - }, - { - description = 'Github checkout PR', - cmd = 'Octo pr checkout', - }, - { - description = 'Github open PR in browser', - cmd = 'Octo pr browser', - }, - { - description = 'Comment line', - cmd = '(comment_toggle_linewise_current)', - keybindings = { - { 'n', '', silent_noremap }, - { 'n', '', silent_noremap }, - }, - }, - { - description = 'Comment line', - cmd = '(comment_toggle_linewise_visual)gv', - keybindings = { - { 'x', '', silent_noremap }, - { 'x', '', silent_noremap }, - }, - }, - { - description = 'Symbols outline', - cmd = 'AerialToggle', - keybindings = { - { 'n', 's', silent_noremap }, - { 'n', 's', silent_noremap }, - }, - }, - { - description = 'Big font size', - cmd = 'set guifont=JetBrainsMonoNL\\ NF:h12', - }, - { - description = 'Reset font size', - cmd = 'set guifont=JetBrainsMonoNL\\ NF:h9', - }, -})