Skip to content

Commit

Permalink
docs: generate updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rcarriga committed Mar 18, 2024
1 parent b5d60f7 commit 1b15d60
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 28 deletions.
42 changes: 30 additions & 12 deletions doc/neotest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ Default values:
debug_marked = "D",
expand = { "<CR>", "<2-LeftMouse>" },
expand_all = "e",
help = "?",
jumpto = "i",
mark = "m",
next_failed = "J",
Expand All @@ -190,8 +191,14 @@ Default values:
symbol_queries = {
elixir = <function 1>,
go = " ;query\n ;Captures imported types\n (qualified_type name: (type_identifier) @symbol)\n ;Captures package-local and built-in types\n (type_identifier)@symbol\n ;Captures imported function calls and variables/constants\n (selector_expression field: (field_identifier) @symbol)\n ;Captures package-local functions calls\n (call_expression function: (identifier) @symbol)\n ",
haskell = " ;query\n ;explicit import\n ((import_item [(variable)]) @symbol)\n ;symbols that may be imported implicitly\n ((type) @symbol)\n (qualified_variable (variable) @symbol)\n (exp_apply (exp_name (variable) @symbol))\n ((constructor) @symbol)\n ((operator) @symbol)\n ",
javascript = ' ;query\n ;Captures named imports\n (import_specifier name: (identifier) @symbol)\n ;Captures default import\n (import_clause (identifier) @symbol)\n ;Capture require statements\n (variable_declarator \n name: (identifier) @symbol\n value: (call_expression (identifier) @function (#eq? @function "require")))\n ;Capture namespace imports\n (namespace_import (identifier) @symbol)\n',
lua = ' ;query\n ;Captures module names in require calls\n (function_call\n name: ((identifier) @function (#eq? @function "require"))\n arguments: (arguments (string) @symbol))\n ',
python = " ;query\n ;Captures imports and modules they're imported from\n (import_from_statement (_ (identifier) @symbol))\n (import_statement (_ (identifier) @symbol))\n "
python = " ;query\n ;Captures imports and modules they're imported from\n (import_from_statement (_ (identifier) @symbol))\n (import_statement (_ (identifier) @symbol))\n ",
ruby = ' ;query\n ;rspec - class name\n (call\n method: (identifier) @_ (#match? @_ "^(describe|context)")\n arguments: (argument_list (constant) @symbol )\n )\n\n ;rspec - namespaced class name\n (call\n method: (identifier)\n arguments: (argument_list\n (scope_resolution\n name: (constant) @symbol))\n )\n ',
rust = " ;query\n ;submodule import\n (mod_item\n name: (identifier) @symbol)\n ;single import\n (use_declaration\n argument: (scoped_identifier\n name: (identifier) @symbol))\n ;import list\n (use_declaration\n argument: (scoped_use_list\n list: (use_list\n [(scoped_identifier\n path: (identifier)\n name: (identifier) @symbol)\n ((identifier) @symbol)])))\n ;wildcard import\n (use_declaration\n argument: (scoped_use_list\n path: (identifier)\n [(use_list\n [(scoped_identifier\n path: (identifier)\n name: (identifier) @symbol)\n ((identifier) @symbol)\n ])]))\n ",
tsx = ' ;query\n ;Captures named imports\n (import_specifier name: (identifier) @symbol)\n ;Captures default import\n (import_clause (identifier) @symbol)\n ;Capture require statements\n (variable_declarator \n name: (identifier) @symbol\n value: (call_expression (identifier) @function (#eq? @function "require")))\n ;Capture namespace imports\n (namespace_import (identifier) @symbol)\n',
typescript = ' ;query\n ;Captures named imports\n (import_specifier name: (identifier) @symbol)\n ;Captures default import\n (import_clause (identifier) @symbol)\n ;Capture require statements\n (variable_declarator \n name: (identifier) @symbol\n value: (call_expression (identifier) @function (#eq? @function "require")))\n ;Capture namespace imports\n (namespace_import (identifier) @symbol)\n'
}
}
}
Expand Down Expand Up @@ -392,18 +399,19 @@ A consumer that displays the output of test results.

*neotest.consumers.output.OpenArgs*
Fields~
{open_win} `(function)` Function that takes a table with width and height keys
{open_win} `(function?)` Function that takes a table with width and height
keys
and opens a window for the output. If a window ID is not returned, the current
window will be used
{short} `(boolean)` Show shortened output
{enter} `(boolean)` Enter output window
{quiet} `(boolean)` Suppress warnings of no output
{last_run} `(boolean)` Open output for last test run
{position_id} `(string)` Open output for position with this ID, opens nearest
{short} `(boolean?)` Show shortened output
{enter} `(boolean?)` Enter output window
{quiet} `(boolean?)` Suppress warnings of no output
{last_run} `(boolean?)` Open output for last test run
{position_id} `(string?)` Open output for position with this ID, opens nearest
position if not given
{adapter} `(string)` Adapter ID, defaults to first found with matching
{adapter} `(string?)` Adapter ID, defaults to first found with matching
position
{auto_close} `(boolean)` Close output window when leaving it, or when cursor
{auto_close} `(boolean?)` Close output window when leaving it, or when cursor
moves outside of window

*neotest.output.open()*
Expand Down Expand Up @@ -570,15 +578,24 @@ query can be configured through the watch consumer's config. Any captures
named `symbol` will be used. If your language is not present in the default
config, please submit a PR to add support out of the box!

*neotest.watch.WatchArgs:*
Fields~
{run_predicate?} `(fun(bufnr: integer):boolean)` Can be used to check whether
tests should be rerun

*neotest.watch.watch()*
`watch`({args})

Watch a position and run it whenever related files are changed.
Arguments are the same as the `neotest.run.run`, which allows
for custom runner arguments, env vars, strategy etc. If a position is
already being watched, the existing watcher will be stopped.
An additional `run_predicate` function, which takes a buffer handle,
can be passed in to determine whether tests should be rerun.
This can be useful, e.g. for only rerunning if there are no LSP
error diagnostics.
Parameters~
{args?} `(neotest.run.RunArgs|string)`
{args?} `(neotest.watch.WatchArgs|string)`

*neotest.watch.toggle()*
`toggle`({args})
Expand All @@ -592,7 +609,7 @@ Toggle watching the current file
lua require("neotest").watch.toggle(vim.fn.expand("%"))
<
Parameters~
{args?} `(neotest.run.RunArgs|string)`
{args?} `(neotest.watch.WatchArgs|string)`

*neotest.watch.stop()*
`stop`({position_id})
Expand Down Expand Up @@ -1539,7 +1556,7 @@ Return~
`FanoutAccum:subscribe`({cb})

Parameters~
{cb} `(fun(data: T))`
{cb} `(fun(data: T): boolean|nil)`

*neotest.FanoutAccum:push()*
`FanoutAccum:push`({data})
Expand Down Expand Up @@ -1592,6 +1609,7 @@ output
*neotest.StrategyContext*
Fields~
{position} `(neotest.Position)`
{adapter} `(neotest.Adapter)`

*neotest.Strategy*
Alias~
Expand Down
29 changes: 13 additions & 16 deletions doc/nio.txt
Original file line number Diff line number Diff line change
Expand Up @@ -384,25 +384,22 @@ nio.tests *nio.tests*


Async versions of plenary's test functions.
Fields~
{it} `(fun(name: string, async_fun: fun()))`
{before_each} `(fun(async_fun: fun()))`
{after_each} `(fun(async_fun: fun()))`

*nio.tests.it()*
`it`({name}, {async_func})

Parameters~
{name} `(string)`
{async_func} `(function)`

*nio.tests.before_each()*
`before_each`({async_func})

Parameters~
{async_func} `(function)`

*nio.tests.after_each()*
`after_each`({async_func})
*nio.tests.with_async_context()*
`with_async_context`({async_func}, {...})

the given function, applied to the remaining arguments, in an
context. The return value (or values) is the return value of
asynchronous function.
Parameters~
{async_func} `(function)`
{async_func} `(function)` Function to execute
{...} `(any)` Arguments to `async_func`
Return~
`(any)` ... Return values of `async_func`


vim:tw=78:ts=8:noet:ft=help:norl:

0 comments on commit 1b15d60

Please sign in to comment.