From b91b7854a264143f6d9fb86eec999cf803311f3e Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Thu, 1 Aug 2024 15:54:17 +0200 Subject: [PATCH] remove needful --- lua/plugins/needful.lua | 70 ----------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 lua/plugins/needful.lua diff --git a/lua/plugins/needful.lua b/lua/plugins/needful.lua deleted file mode 100644 index 4272633..0000000 --- a/lua/plugins/needful.lua +++ /dev/null @@ -1,70 +0,0 @@ -local opts = { - tasks = { - { - name = 'ripgrep current directory', - cmd = 'rg ${pattern} ${cwd}', - tags = { 'ripgrep', 'cwd', 'search', 'pattern' }, - ask = { - ['${pattern}'] = { - title = 'Pattern to use', - default = 'error', - }, - }, - window = { - name = 'Ripgrep', - close = false, - keep_current = true, - }, - }, - { - name = 'ast-grep current directory', - cmd = 'ast-grep -p "${pattern}" ${cwd}', - tags = { 'ripgrep', 'cwd', 'search', 'pattern' }, - ask = { - ['${pattern}'] = { - title = 'Pattern to use', - default = '', - }, - }, - window = { - name = 'ast-grep', - close = false, - }, - }, - }, - edit_mode = 'buffer', -- buffer, tab, split, vsplit - config_file = '.tasks.json', -- name of json config file for project/global config - config_order = { -- default: { project, global, opts }. Order in which - -- tasks are aggregated - 'project', -- .task.json in project directory - 'global', -- .tasks.json in stdpath('data') - 'opts', -- tasks defined in setup opts - }, - tag_source = true, -- display #project, #global, or #opt after tags - global_tokens = { - ['${cwd}'] = vim.fn.getcwd, - ['${do-the-needful}'] = 'please', - ['${projectname}'] = function() - return vim.fn.system 'basename $(git rev-parse --show-toplevel)' - end, - }, - ask_functions = { - get_cwd = function() - return vim.fn.getcwd() - end, - current_file = function() - return vim.fn.expand '%' - end, - }, -} - -return { - 'catgoose/do-the-needful.nvim', - event = 'BufReadPre', - keys = { - { 'np', [[Telescope do-the-needful please]], 'n' }, - { 'nn', [[Telescope do-the-needful]], 'n' }, - }, - dependencies = 'nvim-lua/plenary.nvim', - opts = opts, -}