Skip to content

Communication via StdIn/StdOut #3

Open

Description

@Wosi

I'd like to start a separate VSCode extension (entirely open source) that will use jcf-cli.
Right now, jcf-cli reads a file from the filesystem, formats its contents and writes it back.

That's not the best solution for a code formatter running in the background of a code editor. Biggest drawback is the fact that jcf-cli is unable to format dirty files.

That's why I would like to send the current file content via StdIn to jcf-cli and expect to get the formatted result returned in StdOut.

That way we could format dirty files without running into conflicts with the editor.

Activity

  1. pakLebah commented on Aug 15, 2018

    @pakLebah
    Collaborator

    We can solve the communication part. But making JCF to be able to work on dirty codes is another problem. I'm afraid we can't do it without rewriting many parts of JCF itself. By doing so, we separate this CLI version too far from the original JCF. Something that I'm not ready to do.

  2. Wosi commented on Aug 15, 2018

    @Wosi
    Author

    When I say "dirty files" I'm talking about files with unsaved modifications in the editor.
    I'm aware of the problem with code that can't be parsed.

    Just focus on the communication part.
    I'm going to publish a proof-of-concept-extension here on GitHub that would work with the new version of jcf-cli.

  3. pakLebah commented on Aug 15, 2018

    @pakLebah
    Collaborator

    Ah, sorry. I thought "dirty files" mean "dirty codes" because that's the main problem of JCF.

    Sounds great. Will see your new experimental extension utilizing jcf-cli. Although actually I hope you will work on code outline enhancement. 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions