diff --git a/README.md b/README.md index 34090e9..e960cdb 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,12 @@ Here's a basic example of how to use tsql.nvim: local ts = require('tsql') -- ts.t(, , ) -- 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') diff --git a/lua/tsql.lua b/lua/tsql.lua index fb384e6..6502e88 100644 --- a/lua/tsql.lua +++ b/lua/tsql.lua @@ -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