Skip to content

A tiny 🀏 wrapper around ripgrep for making search πŸ” blazingly fast ⚑ and easy to use πŸ‘Œ in your favorite editor πŸ₯°.

License

Notifications You must be signed in to change notification settings

mistweaverco/tafuta.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

tafuta logo

tafuta.nvim

Lua GitHub release (latest by date)

Install β€’ Usage

A tiny 🀏 wrapper around ripgrep for making search πŸ” blazingly fast ⚑ and easy to use πŸ‘Œ in your favorite editor πŸ₯°.

Tafuta is swahili for "search".

It allows you to search for text in your project.

screenshot

Install

Warning

Requires Neovim 0.10.0+

Via lazy.nvim:

Configuration

require('lazy').setup({
  -- blazingly fast ⚑ search πŸ”
  {
    'mistweaverco/tafuta.nvim',
    -- Make sure this matches the command you want to use and the command pass to setup
    -- as user_command_prompt and user_command_cursor
    -- e.g. if you want to use `:Rg` then the cmd should be `Rg`
    -- If you don't want to use a command, you can omit this option completely
    cmd = { "Tf", "Tfc" },
    config = function()
      -- Setup is required, even if you don't pass any options
      require('tafuta').setup({
        -- The user command to run the search e.g. `:Tf <query>`
        -- Default: "Tf", but it can be anything you want.
        -- If you don't want a command, you can set it to `nil`
        user_command_prompt = "Tf",
        user_command_cursor = "Tfc",
        -- rg options, a lua table of options to pass to rg,
        -- e.g. { "--hidden", "--no-ignore" }
        -- Default: nil
        -- See `rg --help` for more options
        rg_options = nil,
      })
    end,
  },
})

Usage

Search for text in your project via the command:

:Tf <search-term>

or via calling a lua function:

require('tafuta').run("[search term here, can be regex too]")

If you omit the search term, it will prompt you for one (via input()).

You can also search for the word under the cursor via:

:Tfc

or via calling a lua function:

require('tafuta').cursor()

About

A tiny 🀏 wrapper around ripgrep for making search πŸ” blazingly fast ⚑ and easy to use πŸ‘Œ in your favorite editor πŸ₯°.

Topics

Resources

License

Stars

Watchers

Forks