enable_outside_detected_project=true for rpc#2487
enable_outside_detected_project=true for rpc#2487kohlivarun5 wants to merge 1 commit intoocaml-ppx:mainfrom
enable_outside_detected_project=true for rpc#2487Conversation
Julow
left a comment
There was a problem hiding this comment.
The lsp doesn't know whether formatting should be enabled or not and this will format files that shouldn't be in projects that do not use ocamlformat.
false is the right default for now as we decided not to implement #2092 yet (related #2439).
Instead, this should be an option that the lsp could be configured to pass or the lsp could handle specially projects that do not have a .ocamlformat.
Is it possible for the lsp to control this on the client side ? |
|
The lsp cannot pass this option at the moment and that's what we should fix. |
The rpc api doesn't allow for enabling
ocamlformatoutside detected project.In situations where we want the editor (
ocaml-lsp) to respect the global config (in~/.config/.ocamlformat), it is useful to enable formatting without having a.ocamlformatin the projectThis change enables it for
rpc, with the assumption that if a client is triggering therpcexplicitly for formatting, they expect it to be picked upRelated to #2092