v icon indicating copy to clipboard operation
v copied to clipboard

History and AutoCompletion, and Highlighting, and HELP in V REPL

Open milen-prg opened this issue 2 years ago • 4 comments

Describe the feature

I want to can return the last inserted row in REPL by UP arrow button, also the ESC button to clear the row. It will be very nice if there is auto completion and intellisense in REPL, also color highlighting.

And may be the best feature, can be ability to receive function list and help information about the each function, etc.

Use Case

In the interactive sessions , this is very useful features.

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • [ ] I may be able to implement this feature request
  • [ ] This feature might incur a breaking change

Version used

last

Environment details (OS name and version, etc.)

Windows

milen-prg avatar Aug 02 '23 08:08 milen-prg

Some of these (the autocompletion, available function help and fn list), will require the current REPL to be re-implemented, so that it uses an actual V interpreter, that can keep state, instead of collecting a V program composed of all entered lines, and re-compiling/re-running it on each Enter.

spytheman avatar Aug 14 '23 21:08 spytheman

@spytheman

Is there any project currently in development for the new interpreter? I ask because I'm interested in contributing! =)

viniciusfdasilva avatar Jan 16 '24 02:01 viniciusfdasilva

The rather incomplete interpreter is in vlib/v/eval. This old PR was to make changes to it, but it closed without being merged: https://github.com/vlang/v/pull/16235

JalonSolov avatar Jan 16 '24 03:01 JalonSolov

Also, it can be invoked via v interpret <file.v> though it doesn't handle too much at present.

JalonSolov avatar Jan 16 '24 03:01 JalonSolov