Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/allcentury/telescope_csearch.nvim

Telescope plugin fuzzy finder that is blazing fast thanks to codesearch
https://github.com/allcentury/telescope_csearch.nvim

codesearch neovim neovim-config neovim-plugin search telescope telescope-plugin

Last synced: 16 days ago
JSON representation

Telescope plugin fuzzy finder that is blazing fast thanks to codesearch

Awesome Lists containing this project

README

        

## telescope_csearch

This [Telescope](https://github.com/nvim-telescope/telescope.nvim) plugin uses [codesearch](https://github.com/google/codesearch/tree/master) to search code in your project.

### Installation

Using [packer.nvim](https://github.com/wbthomason/packer.nvim):

```lua
use {
'allcentury/telescope-csearch',
requires = { 'nvim-telescope/telescope.nvim' },
config = function()
require('telescope_csearch').setup({
index_path = '~/.csearchindex'
})
end
}
```

Using [lazy](https://github.com/folke/lazy.nvim):

```lua
return {
'allcentury/telescope-csearch',
requires = { 'nvim-telescope/telescope.nvim' },
config = function()
require('telescope_csearch').setup({
index_path = '~/.csearchindex'
})
end,
cond = function()
return vim.fn.executable('csearch')
end
}
```

## Usage

```lua
-- search by pressing cs
vim.keymap.set('n', 'cs', function()
require('telescope_csearch').csearch()
end, { desc = 'CSearch grep' })

-- search for word under cursor
vim.keymap.set('n', 'csw', function()
require('telescope_csearch').csearch({
default_text = vim.fn.expand('')
})
end, { desc = 'CSearch word under cursor' })
```

## License

MIT