5
5
--
6
6
7
7
local log = require (" papis.log" )
8
- local has_telescope , telescope = pcall (require , " telescope" )
9
- if not has_telescope then
10
- log .error (" The plugin telescope.nvim wasn't found but the search module is enabled and requires it." )
11
- return nil
12
- end
13
- local entry_display = require (" telescope.pickers.entry_display" )
14
8
local config = require (" papis.config" )
15
9
local commands = require (" papis.commands" )
16
10
local keymaps = require (" papis.keymaps" )
@@ -20,8 +14,6 @@ if not db then
20
14
end
21
15
22
16
local papis_entry_display = {}
23
- setmetatable (papis_entry_display , { __index = entry_display })
24
- papis_entry_display .truncate = function (a ) return a end -- HACK: there must better way to turn this off
25
17
26
18
local telescope_precalc = {}
27
19
local precalc_last_updated = 0
106
98
--- Sets up the papis.nvim telescope extension
107
99
function M .setup ()
108
100
log .debug (" Search: setting up module" )
101
+ local has_telescope , telescope = pcall (require , " telescope" )
102
+ if not has_telescope then
103
+ error (" The plugin telescope.nvim wasn't found but the search module is enabled and requires it." )
104
+ end
105
+
106
+ local entry_display = require (" telescope.pickers.entry_display" )
107
+ setmetatable (papis_entry_display , { __index = entry_display })
108
+ papis_entry_display .truncate = function (a ) return a end -- HACK: there must better way to turn this off
109
+
109
110
require (" papis.search.data" ).init ()
110
111
telescope .setup ({
111
112
extensions = {
0 commit comments