You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had 2 questions - I tried reading the code and all posts and trial/error and wasn't able to find what the recommendation or behavior is - especially since I saw this line : https://lazy.folke.io/spec
Always use opts instead of config when possible. config is almost never needed.
I currently had something like this -
{
'nvim-telescope/telescope.nvim',
tag='0.1.8',
dependencies= {
'nvim-lua/plenary.nvim',
{'nvim-telescope/telescope-fzf-native.nvim', build='cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build'},
},
opts= {
defaults= {
mappings= {
n={ -- if config is not passed - are we allowed to call require('') within opts?
["<CR>"] =require('telescope.actions').select_default+require('telescope.actions').center,},
},
},
},
config=function(_, opts)
-- opts would call setup() - but for the fzf one, what is the approach?require('telescope').setup(opts)
-- how would this run without specifying it in config ? -- if the functions need it that I define in keys?require('telescope').load_extension('fzf')
localbuiltin=require('telescope.builtin')
vim.keymap.set('n','<Leader>pp',require('customutil').fn_that_requires('telescope')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
vim.keymap.set('n', 'gd', builtin.lsp_definitions, { noremap=true, silent=true })
end
}
}
Basically - without config - how would we be able to call the require('telescope').load_extension('fzf')?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey!
I had 2 questions - I tried reading the code and all posts and trial/error and wasn't able to find what the recommendation or behavior is - especially since I saw this line : https://lazy.folke.io/spec
I currently had something like this -
Basically - without
config
- how would we be able to call therequire('telescope').load_extension('fzf')
?Beta Was this translation helpful? Give feedback.
All reactions