From b834788f7dc110e4a4f79b0356f1293d6d129b13 Mon Sep 17 00:00:00 2001 From: Nicholas Hall Date: Wed, 29 Apr 2026 20:42:44 -0500 Subject: Omarchy lazyvim --- after/plugin/telescope.lua | 74 ---------------------------------------------- 1 file changed, 74 deletions(-) delete mode 100644 after/plugin/telescope.lua (limited to 'after/plugin/telescope.lua') diff --git a/after/plugin/telescope.lua b/after/plugin/telescope.lua deleted file mode 100644 index 16187c6..0000000 --- a/after/plugin/telescope.lua +++ /dev/null @@ -1,74 +0,0 @@ -local builtin = require('telescope.builtin') -local Job = require("plenary.job") - -local vks = function(mode, key, action, desc) - vim.keymap.set(mode, key, action , { noremap = true, desc = desc }) -end - -local function search_emoji() - builtin.symbols({ sources = {'emoji'} }) -end - -local function grep_string() - builtin.grep_string({ search = "", only_sort_text = true }) -end - --- borrowed from ThePrimeagen/harpoon/utils.lua -local function get_os_command_output(cmd, cwd) - if type(cmd) ~= "table" then - print("Harpoon: [get_os_command_output]: cmd has to be a table") - return {} - end - local command = table.remove(cmd, 1) - local stderr = {} - local stdout, ret = Job - :new({ - command = command, - args = cmd, - cwd = cwd, - on_stderr = function(_, data) - table.insert(stderr, data) - end, - }) - :sync() - return stdout, ret, stderr -end - -local function project_files() - local _, ret, _ = get_os_command_output({ - 'git', 'rev-parse', '--is-inside-wirk-tree', - }) - if ret == 0 then - builtin.git_files({ prompt_title = 'Git Files', prompt_prefix = '>>' }) - else - builtin.find_files() - end -end - --- direct commands -vks('n', 'b', builtin.buffers, 'Buffers') -vks('n', 'r', builtin.grep_string, 'References') -vks('n', 'p', project_files, 'Paths' ) --- project_files unifies git_files and find_files --- vks('n', 'sf', builtin.git_files, 'Git files') --- vks('n', 'sp', builtin.find_files, 'Paths' ) - --- search submenu -vks('n', 'sc', builtin.commands, 'Commands') -vks('n', 's:', builtin.command_history, 'Command history') -vks('n', 'sC', builtin.colorscheme, 'Colorchemes') -vks('n', 'ss', grep_string, 'String (like ag)') -- Emulate fzf's Ag: -vks('n', 'sb', builtin.buffers, 'Buffers') -vks('n', 'se', search_emoji, 'Emojis') -vks('n', 'sg', builtin.live_grep, 'Find/grep' ) -vks('n', 'sh', builtin.help_tags, 'Help') -vks('n', 'sk', builtin.keymaps, 'Key mappings') -vks('n', 'so', builtin.oldfiles, 'Recent Opened files') -vks('n', 'sr', builtin.registers, 'Registers') -vks('n', 'sd', builtin.lsp_document_symbols, 'Symbols - document') -vks('n', 'sw', builtin.lsp_workspace_symbols, 'Symbols - workspace') -vks('n', 'st', builtin.tags, 'Tags') -vks('n', 's?', builtin.resume, 'Resume previous search') - --- vim.keymap.set('n', '/', builtin.current_buffer_fuzzy_find, { desc = '[/] Fuzzily search in current buffer]' }) --- E5108: Error executing lua: ...r/start/telescope.nvim/lua/telescope/builtin/__files.lua:413: attempt to call method '_get_hl_from_capture' (a nil value) -- cgit v1.2.3