-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Telescope app
and Telescope dotfiles
#51
Comments
我参考你的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 } }) |
看起来是 #41 合进来的,最开始还没有😂 |
Lines 20 to 22 in 608e5fe
因为Dashboard更新,上面三个也不能用了 DashboardNewFile可以换成: { '<Leader>n', cmd('lua require(\'dashboard\'):new_file()'), opts(noremap, silent) }, 另外两个需要引入dbsession.nvim,看你的文档,这个插件从dashboard-nvim剥离出来是因为速度原因,我不确定把dbsession.nvim引进来是不是合适的,如果没问题的话我就在 #50 上改了 |
好久没更新dope 了 很多都变了。 session可以lazyload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Telescope app
和Telescope dotfiles
这两个是在你自己的配置里写的Telescope自定义扩展,在dope里没有,而且似乎不是很通用,是否考虑在dashboard的配置里移除?或者如果能换个更通用的模板的话就更好了。
The text was updated successfully, but these errors were encountered: