LS4P icon indicating copy to clipboard operation
LS4P copied to clipboard

[FEATURE] Multiple tab support

Open Efratror opened this issue 2 years ago • 0 comments

Current behavior: Currently the server only compiles the currently opened file on a file change event. Scripts that are divided in multiple files compile with missing symbol errors ect.

Wanted behavior: It would be nice to be able to separate a sketch in to multiple files/tabs to simplify coding a bit.

Suggested implementation: This is based on how the processing pde processes multiple files/tabs

  • Get the contents of all files in the directory and append them together to create one big unprocessed string
  • Keep track of which line in the unprocessed string corresponds to which line in a file/tab in a map
  • Use the map to send the correct filename and line number back to vs-code

As an addition the contents should be updated on every file or workspace change. Doing a file read won't work when the file isn't saved yet.

Efratror avatar Apr 01 '22 19:04 Efratror