Skip to content
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

Fix Telescope live_grep showing preview in the Results pane #44

Closed
AndreasNasman opened this issue Feb 23, 2023 · 3 comments
Closed

Fix Telescope live_grep showing preview in the Results pane #44

AndreasNasman opened this issue Feb 23, 2023 · 3 comments

Comments

@AndreasNasman
Copy link
Owner

It seems quite redundant to show the search match in the Results pane when it's shown and highlighted in the Preview pane.

@AndreasNasman
Copy link
Owner Author

This seems to be tightly coupled to rg, as that's what live_grep uses under the hood.
You can give --files-with-matches as an additional_argument to live_grep, but that removes the highlights from the Preview pane.

BurntSushi/ripgrep#103
nvim-telescope/telescope.nvim#770
https://www.reddit.com/r/neovim/comments/qru0w2/finergrained_control_over_your_telescope_grepping/

Having only_sort_text option available for live_grep I think would some the problem.
nvim-telescope/telescope.nvim#419

@AndreasNasman
Copy link
Owner Author

Tested giving these options to Telescope

		opts = {
			pickers = {
				live_grep = {
					additional_args = function(opts)
						-- return opts
						return vim.tbl_deep_extend("force", opts, { "-l" })
					end,
				},
			},
		},

but it doesn't quite work.

@AndreasNasman
Copy link
Owner Author

Having this behavior is actually quite handy, let's keep it as is for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant