diff options
author | Christian Clason <c.clason@uni-graz.at> | 2023-04-30 11:01:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-30 11:01:54 +0200 |
commit | 668f16bac779ac52d7bd9452e6001a7a6d1e9965 (patch) | |
tree | ae8e2a079d122393436f1267e9a6a4c2fa78063d /runtime/doc/treesitter.txt | |
parent | fa20c12ba358066858d1d2cd20d21316fe4b467b (diff) | |
download | rneovim-668f16bac779ac52d7bd9452e6001a7a6d1e9965.tar.gz rneovim-668f16bac779ac52d7bd9452e6001a7a6d1e9965.tar.bz2 rneovim-668f16bac779ac52d7bd9452e6001a7a6d1e9965.zip |
feat(treesitter): upstream query omnifunc from playground (#23394)
and set by default in `ftplugin/query.lua`
Diffstat (limited to 'runtime/doc/treesitter.txt')
-rw-r--r-- | runtime/doc/treesitter.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index 32c97ce3ad..94690f0b7f 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -853,7 +853,7 @@ lint({buf}, {opts}) *vim.treesitter.query.lint()* The found diagnostics are reported using |diagnostic-api|. By default, the parser used for verification is determined by the containing folder of the - query file, e.g., if the path is `**/lua/highlights.scm` , the parser for the `lua` language will be used. + query file, e.g., if the path ends in `/lua/highlights.scm` , the parser for the `lua` language will be used. Parameters: ~ • {buf} (integer) Buffer handle @@ -875,6 +875,13 @@ list_predicates() *vim.treesitter.query.list_predicates()* Return: ~ string[] List of supported predicates. +omnifunc({findstart}, {base}) *vim.treesitter.query.omnifunc()* + Omnifunc for completing node names and predicates in treesitter queries. + + Use via >lua + vim.bo.omnifunc = 'v:lua.vim.treesitter.query.omnifunc' +< + parse({lang}, {query}) *vim.treesitter.query.parse()* Parse {query} as a string. (If the query is in a file, the caller should read the contents into a string before calling). |