You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to format a file absolutely nothing happens. There is no error message, but the code is not changed either. I have looked in the Output window, the Debug Console etc and there is nothing there. I'm not sure how to proceed in debugging this issue further.
With regards to VSC-Prolog settings, the dialect is set to swi and the executable path is set to /usr/bin/swipl (which is indeed the correct path). Prolog linting seems to work properly, just not the formatting.
I pulled out the formatter_swi.pl and ran it myself on swipl:
$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 9.2.3)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.
For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).
?- use_module('formatter_swi').
true.
?- formatter:format_prolog_source(2, 2, "hello.", "").
ERROR: setting `body_indentation' does not exist
ERROR: In:
ERROR: [17] throw(error(existence_error(setting,body_indentation),_15040))
ERROR: [14] formatter:read_and_portray_term(2,2,<stream>(0x55f3dc9eddc0)) at .../prolog/cards/formatter_swi.pl:48
ERROR: [13] setup_call_cleanup(formatter:open_memory_file(<memory_file>(0x55f3dc9edce0),read,<stream>(0x55f3dc9eddc0)),formatter:read_and_portray_term(2,2,<stream>(0x55f3dc9eddc0)),formatter:close(<stream>(0x55f3dc9eddc0))) at /usr/lib/swipl/boot/init.pl:682
ERROR: [12] formatter:format_prolog_source(2,2,'<garbage_collected>','<garbage_collected>') at .../prolog/cards/formatter_swi.pl:11
ERROR: [11] toplevel_call('<garbage_collected>') at /usr/lib/swipl/boot/toplevel.pl:1317
ERROR:
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.
Problem
When I try to format a file absolutely nothing happens. There is no error message, but the code is not changed either. I have looked in the Output window, the Debug Console etc and there is nothing there. I'm not sure how to proceed in debugging this issue further.
With regards to VSC-Prolog settings, the dialect is set to swi and the executable path is set to /usr/bin/swipl (which is indeed the correct path). Prolog linting seems to work properly, just not the formatting.
Versions
VSC-Prolog version: 0.8.23
VS Code version:
SWI-Prolog version:
The text was updated successfully, but these errors were encountered: