Skip to content
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 } },
   }
})
Clone this wiki locally