-
I'm using vscode-ocaml-platform 1.28.2. This extension displays inline type annotations when I define a function using the "function" keyword, and possibly in other situations too. For example, consider this code:
If I enter it into a file foo.ml and display it in Visual Studio with this extension, the line " | Some x -> 0" appears like this:
The text ': int' is an inline type annotation, and is grayed out so I can't edit it. This feature seems like it could be useful, however I don't always want to see these annotations and it appears that there is no option to disable them. By the way, there's an issue #614 with a similar name ("Make inline type annotations optional") that was closed, but that's not about the same thing. That issue is about CodeLens type annotations, which appear in a smaller font on a separate line (and can be disabled via the "Ocaml > Server: Codelens" option). The type annotations I'm describing here are truly inline, and appear to be relatively new (I don't remember them when using OCaml with this extension about a year ago). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Thanks for your report @medovina. These annotations are called ![]() |
Beta Was this translation helpful? Give feedback.
Thanks for your report @medovina. These annotations are called
inlay-hints
and are a feature of most LSP servers. You can disable them in vscode settings at the workspace or user level.