-
Notifications
You must be signed in to change notification settings - Fork 8
Telescope
Yuriy Artemyev edited this page Sep 18, 2022
·
3 revisions
You need this plugins:
In terminal art Unicode Symbols for Legacy Computing are used. They are available from Unicode 13. In this screenshot, Kitty terminal is used, which allows using different fonts for different code points, with DejaVu Sans Mono for Unicode characters. and Inconsolata for ASCII code points.
local Hydra = require('hydra')
local cmd = require('hydra.keymap-util').cmd
local hint = [[
_f_: files _m_: marks
๐ญ๐ฌญ๐ฌญ๐ฌญ๐ฌญ๐ฌญ๐ฌญ๐ฌญ๐ฌญ๐ฌผ _o_: old files _g_: live grep
๐ญ๐ญ๐ญ ๐ญ ๐ญฃ๐ญ๐ญ๐ฌพ _p_: projects _/_: search in file
๐ญ
โ ๎
โ โ๐ญ
โโ๐ฌฟ ๐ญโโ _r_: resume _u_: undotree
๐ญโ๐ฌ๐ฎ๐ฎ๐ฎ๐ฎ๐ฎ๐ฎ๐ฎ๐ฎ๐ฌโ๐ญ _h_: vim help _c_: execute command
๐ญค๐ญ๐ฌบ๐ฌน๐ฌฑ๐ฌญ๐ฌญ๐ฌญ๐ฌญ๐ฌต๐ฌน๐ฌน๐ญ๐ญ _k_: keymaps _;_: commands history
_O_: options _?_: search history
^
_<Enter>_: Telescope _<Esc>_
]]
Hydra({
name = 'Telescope',
hint = hint,
config = {
color = 'teal',
invoke_on_body = true,
hint = {
position = 'middle',
border = 'rounded',
},
},
mode = 'n',
body = '<Leader>f',
heads = {
{ 'f', cmd 'Telescope find_files' },
{ 'g', cmd 'Telescope live_grep' },
{ 'o', cmd 'Telescope oldfiles', { desc = 'recently opened files' } },
{ 'h', cmd 'Telescope help_tags', { desc = 'vim help' } },
{ 'm', cmd 'MarksListBuf', { desc = 'marks' } },
{ 'k', cmd 'Telescope keymaps' },
{ 'O', cmd 'Telescope vim_options' },
{ 'r', cmd 'Telescope resume' },
{ 'p', cmd 'Telescope projects', { desc = 'projects' } },
{ '/', cmd 'Telescope current_buffer_fuzzy_find', { desc = 'search in file' } },
{ '?', cmd 'Telescope search_history', { desc = 'search history' } },
{ ';', cmd 'Telescope command_history', { desc = 'command-line history' } },
{ 'c', cmd 'Telescope commands', { desc = 'execute command' } },
{ 'u', cmd 'silent! %foldopen! | UndotreeToggle', { desc = 'undotree' }},
{ '<Enter>', cmd 'Telescope', { exit = true, desc = 'list all pickers' } },
{ '<Esc>', nil, { exit = true, nowait = true } },
}
})