Did you know ... Search Documentation:
Pack lsp_server -- prolog/lsp_utils.pl
PublicShow source

Module with a bunch of helper predicates for looking through prolog source and stuff.

author
- James Cash
 called_at(+Path:atom, +Clause:term, -By:term, -Location:term) is nondet
Find the callers and locations of the goal Clause, starting from the file Path. Location will be bound to all the callers and locations that the Clause is called from like Caller-Location.
See also
- find_subclause/4
 name_callable(?Name:functor, ?Callable:term) is det
True when, if Name = Func/Arity, Callable = Func(_, _, ...) with Arity args.
 relative_ref_location(+Path:atom, +Goal:term, +Position:position(int,int), -Location:dict) is semidet
Given Goal found in Path and position Position (from called_at/3), Location is a dictionary suitable for sending as an LSP response indicating the position in a file of Goal.
 help_at_position(+Path:atom, +Line:integer, +Char:integer, -Help:string) is det
Help is the documentation for the term under the cursor at line Line, character Char in the file Path.

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 defined_at(Arg1, Arg2, Arg3)
 clause_in_file_at_position(Arg1, Arg2, Arg3)
 clause_variable_positions(Arg1, Arg2, Arg3)
 seek_to_line(Arg1, Arg2)
 linechar_offset(Arg1, Arg2, Arg3)