I read some factual inaccuracies here.
LSP (the protocol)'s main driving force was for a long time TypeScript rather than JS. FYI TypesSript has a stronger type system than Java at this point, and it's LSP server is the most comprehensive and supported way to write TS with.
Another example of an LSP success story is Rust's rust-analyzer. Not to mention that C++'s clangd also became an LSP server many years ago.
All these are strongly typed and bring extra semantics (templates, lifetimes) way beyond other languages.
"query type of symbol" functionality is provided as an example by the textdocument/hover call [1]
But even if this wasn't implemented, the protocol lets any implementor extend the interface with additional / non-standard methods (and clangd did exactly that[2])
It might be that the not-widely-popular ocaml's LSP support is not there yet. Probably it's an open source project, so you can help with the implementation, or at least vote for missing features to be implemented.
[1]: https://microsoft.github.io/language-server-protocol/specifi...
https://github.com/rust-lang/rust-analyzer/blob/master/docs/...
Works fine in other LSPs.
https://microsoft.github.io/language-server-protocol/specifi...
Traditionally though OCaml editor integrations have also supported not only asking just the type of a symbol, but of an expression. I wonder if LSP can do that, because that function needs some interactive scoping of the query, not just a single point, or I suppose it can work if hovering over parenthesis but if precedency needs to be accounted for, it would be difficult to understand what the user wants to see.
I've _really_ enjoyed the expression type queries in the past, but I haven't coded OCaml for a while :/.