From 1bfc8a44c1c26aec090e8b5d0212b1a557b7bd59 Mon Sep 17 00:00:00 2001 From: TJ DeVries Date: Fri, 19 Nov 2021 14:47:44 -0500 Subject: [PATCH] fixup --- developers.md | 4 +++- lua/telescope/mappings.lua | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/developers.md b/developers.md index 23e842268c..e8db4fc508 100644 --- a/developers.md +++ b/developers.md @@ -194,6 +194,8 @@ We will now try to define our entry maker for our example by providing an `entry_maker` to `finders.new_table` and changing our table to be a little bit more interesting. We will end up with the following new code for `finders.new_table`: +TODO: Explain more about entry_index when that's finalized. + ```lua finder = finders.new_table { results = { @@ -238,7 +240,7 @@ to be more complex with icons and special indicators but `ordinal` could be a si sorting key. There are other important keys which can be set but do not make sense in the -current context as we are not dealing wiht files: +current context as we are not dealing with files: - `path`: to set the absolute path of the file to make sure its always found - `lnum`: to specify a line number in the file. This will allow the `conf.grep_previewer` to show that line and the default action to jump to diff --git a/lua/telescope/mappings.lua b/lua/telescope/mappings.lua index d5add9d34f..33aae0eb53 100644 --- a/lua/telescope/mappings.lua +++ b/lua/telescope/mappings.lua @@ -282,6 +282,10 @@ local mode_mt = { rawset(t, k, val) return val end, + + __newindex = function(t, k, v) + rawset(t, string.lower(k), v) + end, } -- Apply the keymaps for a given set of configurations