From 1c37553476f268d08d290dfee1fa3da4135b54b4 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Tue, 21 Feb 2023 17:00:48 +0100 Subject: test(help): drop treesitter parse error to 0 All parser errors have been fixed; make sure we don't introduce new ones. --- runtime/doc/treesitter. | 0 runtime/doc/treesitter.txt | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 runtime/doc/treesitter. (limited to 'runtime/doc') diff --git a/runtime/doc/treesitter. b/runtime/doc/treesitter. new file mode 100644 index 0000000000..e69de29bb2 diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index 16de49029e..99fe55b6cb 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -528,7 +528,7 @@ get_node_range({node_or_range}) *vim.treesitter.get_node_range()* Returns the node's range or an unpacked range table Parameters: ~ - • {node_or_range} (|TSNode||table) Node or table of positions + • {node_or_range} (|TSNode| | table) Node or table of positions Return: ~ (integer) start_row @@ -1017,7 +1017,7 @@ LanguageTree:named_node_for_range({self}, {range}, {opts}) • {self} Return: ~ - |TSNode||nil Found node + |TSNode| | nil Found node LanguageTree:parse({self}) *LanguageTree:parse()* Parses all defined regions using a treesitter parser for the language this -- cgit From 6dfbeb0d990d24657754463c6ab155c19e7f5f56 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Tue, 21 Feb 2023 17:39:29 +0100 Subject: docs: fix more treesitter parsing errors --- runtime/doc/diagnostic.txt | 8 ++++---- runtime/doc/lua-guide.txt | 2 +- runtime/doc/treesitter. | 0 runtime/doc/treesitter.txt | 7 +++---- 4 files changed, 8 insertions(+), 9 deletions(-) delete mode 100644 runtime/doc/treesitter. (limited to 'runtime/doc') diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index 7066a3739a..c661bf02bf 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -40,15 +40,15 @@ requires a namespace. *diagnostic-structure* A diagnostic is a Lua table with the following keys. Required keys are -indicated with (*): +indicated with (+): bufnr: Buffer number - lnum(*): The starting line of the diagnostic + lnum(+): The starting line of the diagnostic end_lnum: The final line of the diagnostic - col(*): The starting column of the diagnostic + col(+): The starting column of the diagnostic end_col: The final column of the diagnostic severity: The severity of the diagnostic |vim.diagnostic.severity| - message(*): The diagnostic text + message(+): The diagnostic text source: The source of the diagnostic code: The diagnostic code user_data: Arbitrary data plugins or users can add diff --git a/runtime/doc/lua-guide.txt b/runtime/doc/lua-guide.txt index 236905a077..8ea84f8c60 100644 --- a/runtime/doc/lua-guide.txt +++ b/runtime/doc/lua-guide.txt @@ -71,7 +71,7 @@ local keyword are not accessible outside of the command. This won't work: < You can also use `:lua=`, which is the same as `:lua vim.pretty_print(...)`, to conveniently check the value of a variable or a table: ->lua +>vim :lua=package < To run a Lua script in an external file, you can use the |:source| command diff --git a/runtime/doc/treesitter. b/runtime/doc/treesitter. deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index 99fe55b6cb..3f505e5d19 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -505,8 +505,7 @@ get_captures_at_pos({bufnr}, {row}, {col}) • {col} (integer) Position column Return: ~ - table[] List of captures `{ capture = "capture name", metadata = { ... - } }` + table[] List of captures `{ capture = "name", metadata = { ... } }` get_node({opts}) *vim.treesitter.get_node()* Returns the smallest named node at the given position @@ -838,7 +837,7 @@ Query:iter_captures({self}, {node}, {source}, {start}, {stop}) -- typically useful info about the node: local type = node:type() -- type of the captured node local row1, col1, row2, col2 = node:range() -- range of the capture - ... use the info here ... + -- ... use the info here ... end < @@ -871,7 +870,7 @@ Query:iter_matches({self}, {node}, {source}, {start}, {stop}) local node_data = metadata[id] -- Node level metadata - ... use the info here ... + -- ... use the info here ... end end < -- cgit