Ocaml lsp: when does type-inference / goto-ref work / break?

I can’t do anything about library code, but I am willing to tolerate minor inconveniences in code I write if it ensures that goto-ref / type inference from LSP works ?

Is there a set of rules for dos / donts for playing nice with OCaml LSP ?