diff options
| author | Sebastián Estrella <2049686+sestrella@users.noreply.github.com> | 2022-09-30 12:27:06 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-30 19:27:06 +0200 |
| commit | 63e279049652b514b7c3cbe5f6b248db53d77516 (patch) | |
| tree | df54c3697b6f2da41b4542104d894c24deee1a05 /README.md | |
| parent | d4204618dddf1628e7a19ad4a7b910864d1120a5 (diff) | |
docs: Add Lua-only key mappings examples (#2174)
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -116,6 +116,8 @@ to get an understanding of how to use Telescope and how to configure it. Try the command `:Telescope find_files<cr>` to see if `telescope.nvim` is installed correctly. +Using VimL: + ```viml " Find files using Telescope command-line sugar. nnoremap <leader>ff <cmd>Telescope find_files<cr> @@ -130,6 +132,16 @@ nnoremap <leader>fb <cmd>lua require('telescope.builtin').buffers()<cr> nnoremap <leader>fh <cmd>lua require('telescope.builtin').help_tags()<cr> ``` +Using Lua: + +```lua +local builtin = require('telescope.builtin') +vim.keymap.set('n', 'ff', builtin.find_files, {}) +vim.keymap.set('n', 'fg', builtin.live_grep, {}) +vim.keymap.set('n', 'fb', builtin.buffers, {}) +vim.keymap.set('n', 'fh', builtin.help_tags, {}) +``` + See [builtin pickers](#pickers) for a list of all builtin functions. ## Customization |
