From 63e279049652b514b7c3cbe5f6b248db53d77516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Estrella?= <2049686+sestrella@users.noreply.github.com> Date: Fri, 30 Sep 2022 12:27:06 -0500 Subject: docs: Add Lua-only key mappings examples (#2174) --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 4b8c5bb..21287b8 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,8 @@ to get an understanding of how to use Telescope and how to configure it. Try the command `:Telescope find_files` to see if `telescope.nvim` is installed correctly. +Using VimL: + ```viml " Find files using Telescope command-line sugar. nnoremap ff Telescope find_files @@ -130,6 +132,16 @@ nnoremap fb lua require('telescope.builtin').buffers() nnoremap fh lua require('telescope.builtin').help_tags() ``` +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 -- cgit v1.2.3