Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better ocamlformat-rpc intergration #495

Closed
4 tasks done
ulugbekna opened this issue Aug 25, 2021 · 5 comments · Fixed by #599 or ocaml/opam-repository#21212
Closed
4 tasks done

Better ocamlformat-rpc intergration #495

ulugbekna opened this issue Aug 25, 2021 · 5 comments · Fixed by #599 or ocaml/opam-repository#21212
Assignees
Labels
discussion discussing a feature/change, roadmap enhancement New feature or request
Milestone

Comments

@ulugbekna
Copy link
Collaborator

ulugbekna commented Aug 25, 2021

Currently, we format code in the hover, we should also be able to

  • format source code (currently, we call ocamlformat binary to format source files, which can be avoided if ocamlformat-rpc is installed)
  • format generated code:
    • destructed code
    • generated intf code

Other suggestions?

@ulugbekna ulugbekna added enhancement New feature or request discussion discussing a feature/change, roadmap labels Sep 2, 2021
@rgrinberg
Copy link
Member

rgrinberg commented Oct 4, 2021

What about replacing using ocamlformat-rpc for user format queries when it's available? Currently we still run the binary ocamlformat binary on every request.

@panglesd
Copy link
Collaborator

I opened PR #549 to fix this issue :)

@rgrinberg
Copy link
Member

@panglesd I assigned this ticket to you.

@rgrinberg
Copy link
Member

@panglesd is formatting generated code possible yet?

@panglesd
Copy link
Collaborator

Yes, formatting destructed code and generated interface is working when #599 is merged.

@rgrinberg rgrinberg linked a pull request Feb 14, 2022 that will close this issue
@rgrinberg rgrinberg added this to the 1.11.0 milestone Feb 14, 2022
rgrinberg added a commit to rgrinberg/opam-repository that referenced this issue Apr 15, 2022
CHANGES:

## Features

- Add support for dune in watch mode. The lsp server will now display build
  errors in the diagnostics and offer promotion code actions.

- Re-introduce ocamlformat-rpc (ocaml/ocaml-lsp#599, fixes ocaml/ocaml-lsp#495)

## Fixes

- Fix workspace symbols that could have a wrong path in some cases
  ([ocaml/ocaml-lsp#675](ocaml/ocaml-lsp#671))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion discussing a feature/change, roadmap enhancement New feature or request
Projects
None yet
3 participants