Skip to content

goolmoos/telescope-live-grep-args.nvim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telescope live grep args

REUSE status

Live grep args picker for telescope.nvim.

What it does

It enables passing arguments to the grep command, rg examples:

  • --no-ignore foo
  • "foo bar" bazdir

Installation

Packer

Add telescope-live-grep-args.nvim as telescope.nvim dependency, e.g.:

use {
    "nvim-telescope/telescope.nvim",
    requires = {
        { "nvim-telescope/telescope-live-grep-args.nvim" }
    }
}

Usage

Load the extension

require("telescope").load_extension("live_grep_args")

Then call or map this command

:lua require("telescope").extensions.live_grep_args.live_grep_args()

Grep argument examples:

prompt args
foo bar foo bar
"foo bar" baz foo bar, baz
--no-ignore "foo bar --no-ignore, foo bar

If the prompt value does not begin with ', " or - the entire prompt is treatet as a single argument. This behaviour can be turned off by setting the auto_quoting option to false.

Configuration

local telescope = require("telescope")
telescope.setup {
  extensions = {
    live_grep_args = {
      auto_quoting = true, -- enable/disable auto-quoting
    }
  }
}

Development

Running the tests

Acknowledgements

Based on the idea of this pull request.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 93.5%
  • Vim Script 3.6%
  • Makefile 2.9%