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

https://github.com/david-kunz/ts-quickfix

Neovim plugin to populate a quickfix list with Tree-Sitter queries
https://github.com/david-kunz/ts-quickfix

neovim plugin vim

Last synced: about 2 months ago
JSON representation

Neovim plugin to populate a quickfix list with Tree-Sitter queries

Awesome Lists containing this project

README

          

# ts-quickfix

Neovim plugin to populate a [quickfix](https://neovim.io/doc/user/quickfix.html) list with [Tree-Sitter](https://tree-sitter.github.io/tree-sitter/) queries

## Installation

```lua
use 'David-Kunz/ts-quickfix'
```

## Usage

```lua
require('ts-quickfix').query([[
((comment) @comment
(#match? @comment "[^a-zA-Z0-9](TODO|HACK|WARNING|BUG|FIXME|XXX|REVISIT)"))
]])
```

This example is shipped with `require('ts-quickfix').todo()`.

You can also define queries in your `queries` folder and reference them by name:

```lua
require('ts-quickfix').query_name('myName')
```

### Tip:

You can define user commands for your favorite queries, e.g.

```lua
vim.api.nvim_create_user_command('Todo', require('ts-quickfix').todo, {})
```