Open curious-toast opened 1 year ago
Check out :h telescope.defaults.vimgrep_arguments
. You can extend the default value with the arguments you want.
From what I understand, it should be possible to set it like this:
require("telescope").setup({
extensions = {
live_grep_args = {
vimgrep_arguments = { "rg", "--color=never", "--no-heading", "--with-filename", "--line-number", "--column", "--smart-case", "YOUR_ARGUMENT" },
}
}
})
but I couldn't get it to work. It's probably a bug in the extension since setting custom mappings doesn't work either. So for now a workaround solution is to set it inside your remap:
vim.keymap.set("n", "<leader>fg", function() telescope.extensions.live_grep_args.live_grep_args({vimgrep_arguments = { "rg", "--color=never", "--no-heading", "--with-filename", "--line-number", "--column", "--smart-case", "YOUR_ARGUMENT" }}) end)
or to set it globally, which will affect other pickers as well:
telescope.setup({
defaults = {
vimgrep_arguments = { "rg", "--color=never", "--no-heading", "--with-filename", "--line-number", "--column", "--smart-case", "YOUR_ARGUMENT" },
}
})
Hi there, awesome plug-in! I was wondering if there was a way to auto prefix an rg arg when calling live_grep_args.
As an example, anytime I open it I want all searches to use the -uuu arg instead of always having to type -uuu and then my search string.
Thanks!