Replies: 4 comments
-
Sounds interesting, there is only the help(+PI) predicate. It could be
extended to do word completion, also a help/2 to return file info. The
module(-Module) and modules(-List) could be useful.
…On Mon, Jun 5, 2023 at 9:37 PM guregu ***@***.***> wrote:
It would be cool to have a LSP (or IDE plugin) that works with Trealla,
with autocomplete and all that jazz 🤔
There's some prior art for a Prolog LSP, but it looks like it's only SWI
compatible: https://github.com/jamesnvc/lsp_server
Part of it uses the SWI dictionary syntax but that's easy to change.
I wonder how much work it would be. Looks like it relies heavily on this
module: https://www.swi-prolog.org/pldoc/man?section=prologxref so
implementing the equivalent of that should be OK, but not sure how
feasible. If we already have the stuff we need in different predicates,
might be easier to just use those instead.
One interesting angle is that we could (optionally) embed the WebAssembly
Trealla in a VSCode plugin and have a zero-setup Prolog environment.
I plan to look into this soon, and figure out what we might need to add to
implement it.
—
Reply to this email directly, view it on GitHub
<#177>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFNKSERLZICWNXDOS5YQFPLXJXAFZANCNFSM6AAAAAAY223Q6I>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I meant to add help/1 could be extended to actually return the information
rather than just write it out.
…On Mon, Jun 5, 2023 at 9:37 PM guregu ***@***.***> wrote:
It would be cool to have a LSP (or IDE plugin) that works with Trealla,
with autocomplete and all that jazz 🤔
There's some prior art for a Prolog LSP, but it looks like it's only SWI
compatible: https://github.com/jamesnvc/lsp_server
Part of it uses the SWI dictionary syntax but that's easy to change.
I wonder how much work it would be. Looks like it relies heavily on this
module: https://www.swi-prolog.org/pldoc/man?section=prologxref so
implementing the equivalent of that should be OK, but not sure how
feasible. If we already have the stuff we need in different predicates,
might be easier to just use those instead.
One interesting angle is that we could (optionally) embed the WebAssembly
Trealla in a VSCode plugin and have a zero-setup Prolog environment.
I plan to look into this soon, and figure out what we might need to add to
implement it.
—
Reply to this email directly, view it on GitHub
<#177>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFNKSERLZICWNXDOS5YQFPLXJXAFZANCNFSM6AAAAAAY223Q6I>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Also, help/1 is currently only for built-ins. But it could be extended to any predicate. Predicate definitions already have filename, but could add line numbers. |
Beta Was this translation helpful? Give feedback.
0 replies
-
A way to programmatically access the help messages (+ use them for other modules too) would be cool indeed |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be cool to have a LSP (or IDE plugin) that works with Trealla, with autocomplete and all that jazz 🤔
There's some prior art for a Prolog LSP, but it looks like it's only SWI compatible: https://github.com/jamesnvc/lsp_server
Part of it uses the SWI dictionary syntax but that's easy to change.
I wonder how much work it would be. Looks like it relies heavily on this module: https://www.swi-prolog.org/pldoc/man?section=prologxref so implementing the equivalent of that should be OK, but not sure how feasible. If we already have the stuff we need in different predicates, might be easier to just use those instead.
One interesting angle is that we could (optionally) embed the WebAssembly Trealla in a VSCode plugin and have a zero-setup Prolog environment.
I plan to look into this soon, and figure out what we might need to add to implement it.
Beta Was this translation helpful? Give feedback.
All reactions