fix: filter_on is not a method somehow

master
Hung 2023-06-02 20:29:37 -07:00
parent 2a0a1629d5
commit edcceb144c
2 changed files with 9 additions and 3 deletions

View File

@ -51,7 +51,12 @@ Here's a basic example of how to use tsql.nvim:
local ts = require('tsql')
-- ts.t(<buf_match>, <ts_query>, <sink>)
-- Matches all strings in our neovim workspace.
ts.t(ts.buf_match.any(), ts.ts_query.from_scm("string"), ts.sink_by.print())
ts.t(ts.buf_match.any(), ts.ts_query.from_scm("string"), ts.sink_by.print()):do_nvim()
```
Here's the same thing in a one-liner
```lua
:lua local ts = require('tsql'); ts.t(ts.buf_match.any(), ts.ts_query.from_scm("string"), ts.sink_by.print()):do_nvim()
```
## Installation
@ -66,7 +71,8 @@ Don't forget to run `:PlugInstall` to actually install the plugin.
## Configuration
To configure tsql.nvim, you can provide a configuration table to the `M.setup` function. Here's an example:
To configure tsql.nvim, you can provide a configuration table to the `M.setup` function.
Here's an example (and is the default configuration):
```lua
local tsql = require('tsql')

View File

@ -150,7 +150,7 @@ end
---NOTE: requires nvim runtime
function M.Tsql:q_nodes()
return self.codeql:find_nodes(
self.buf_match:filter_on(M.nvim_get_qbufs())
self.buf_match.filter_on(self.buf_match, M.nvim_get_qbufs())
)
end