`Telescope app` and `Telescope dotfiles`
Opened this issue · 4 comments
WindyValley commented
Telescope app
和 Telescope dotfiles
这两个是在你自己的配置里写的Telescope自定义扩展,在dope里没有,而且似乎不是很通用,是否考虑在dashboard的配置里移除?或者如果能换个更通用的模板的话就更好了。
WindyValley commented
我参考你的dotfiles写了一个搜索nvim配置文件的
local telescope = require('telescope')
local finders = require('telescope.finders')
local pickers = require('telescope.pickers')
local make_entry = require('telescope.make_entry')
local conf = require('telescope.config').values
local config_path = vim.fn.stdpath('config')
local config_file_list = function()
local list = {}
local p = io.popen('rg --files --ignore .git ' .. config_path)
for file in p:lines() do
table.insert(list, file)
end
return list
end
local nvim_user_config = function(opts)
opts = opts or {}
local results = config_file_list()
pickers
.new(opts, {
prompt_title = 'find in nvim user config files',
results_title = 'Nvim User Configs',
finder = finders.new_table({
results = results,
entry_maker = make_entry.gen_from_file(opts),
}),
previewer = conf.file_previewer(opts),
sorter = conf.file_sorter(opts),
})
:find()
end
return telescope.register_extension({ exports = { nvim_user_config = nvim_user_config } })
WindyValley commented
看起来是 #41 合进来的,最开始还没有😂
WindyValley commented
glepnir commented
好久没更新dope 了 很多都变了。 session可以lazyload