Open SolarAquarion opened 6 years ago
upterm actually manually added "competitions" which is kind silly. Final term has their auto completion code in vala + "*.ftmenu" files. Not actually the most natural of auto completion stuff
On Mar 4, 2018 5:06 PM, "Per Bothner" notifications@github.com wrote:
It's tricky, especially if you want to re-use an existing shell program and completion library, which would be preferable. Ideally, you'd want some well-defined communication protocol between domterm and the shell (or other program that wants to do completion). The Language Server Protocol https://langserver.org/ is meant to handle completions, syntax checking, and syntax coloring, but I've only seen it used for editing files. I've thought about using a modified LSP for interactive REPLs, but I haven't gotten very far looking into it. The REPL (i.e. the shell) would need to understand this LSP variant.
If we restrict ourselves to completion for (say) bash, we might be able to leave the shell itself unchanged, but just replace the readline input editor. One could override the readline library (using LD_PRELINK) to do auto-completion and send the resulting suggestions to domterm for display/
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PerBothner/DomTerm/issues/40#issuecomment-370268596, or mute the thread https://github.com/notifications/unsubscribe-auth/AFD6iFyM2ohjg5E18NaSQ2Y2N63REVJgks5tbGVRgaJpZM4SbgCE .
It's tricky, especially if you want to re-use an existing shell program and completion library, which would be preferable. Ideally, you'd want some well-defined communication protocol between domterm and the shell (or other program that wants to do completion). The Language Server Protocol is meant to handle completions, syntax checking, and syntax coloring, but I've only seen it used for editing files. I've thought about using a modified LSP for interactive REPLs, but I haven't gotten very far looking into it. The REPL (i.e. the shell) would need to understand this LSP variant.
If we restrict ourselves to completion for (say) bash, we might be able to leave the shell itself unchanged, but just replace the readline input editor. One could override the readline library (using LD_PRELINK) to do auto-completion and send the resulting suggestions to domterm for display/